diff --git a/.github/workflows/add-documentation-to-repo.yaml b/.github/workflows/add-documentation-to-repo.yaml index 1ebf6b0b79..8c9c379f3f 100644 --- a/.github/workflows/add-documentation-to-repo.yaml +++ b/.github/workflows/add-documentation-to-repo.yaml @@ -60,12 +60,21 @@ jobs: pushd interfaces yarn run build popd + pushd indexer-interfaces + yarn run build + popd pushd common yarn run build popd + pushd indexer-common + yarn run build + popd pushd api-gateway yarn run build popd + pushd indexer-api-gateway + yarn run build + popd pushd analytics-service yarn run build popd @@ -77,6 +86,9 @@ jobs: pushd api-gateway yarn start & popd + pushd indexer-api-gateway + yarn start & + popd pushd analytics-service yarn start & popd @@ -85,9 +97,12 @@ jobs: - name: Download file run: | rm -fv swagger.yaml + rm -fv swagger-indexer.yaml rm -fv swagger-analytics.yaml curl -o swagger.yaml http://localhost:3002/api-docs-yaml + curl -o swagger-indexer.yaml http://localhost:3021/api-docs-yaml curl -o swagger-analytics.yaml http://localhost:3020/api-docs-yaml git add swagger.yaml + git add swagger-indexer.yaml git add swagger-analytics.yaml git commit -m "[skip ci] Add swagger.yaml" && git push || exit 0 diff --git a/.github/workflows/api-manual.yml b/.github/workflows/api-manual.yml index 1b0d764613..18d23e9d56 100644 --- a/.github/workflows/api-manual.yml +++ b/.github/workflows/api-manual.yml @@ -1,12 +1,16 @@ name: Guardian CI API Tests(Manual) on: workflow_dispatch: + inputs: + tags: + type: string + description: Tags for run(smoke, accounts, firstPool and etc.) + default: 'all' description: 'Manual run' - jobs: buildAndTest: name: Build and Test (Manual) - runs-on: [self-hosted, Linux, medium, ephemeral] + runs-on: ubuntu-latest services: ipfs-node: image: ipfs/kubo:latest @@ -60,6 +64,9 @@ jobs: pushd auth-service yarn run build popd + pushd queue-service + yarn run build + popd pushd guardian-service yarn run build popd @@ -126,7 +133,7 @@ jobs: run: | pushd e2e-tests npm install --force - npx cypress run --env "portApi=3002,operatorId=${{ secrets.CI_HEDERA_ACCOUNT }},operatorKey=${{ secrets.CI_HEDERA_PRIV_KEY }}" --spec cypress/e2e/api-tests/**/*.cy.js + npx cypress run --env "portApi=3002,operatorId=${{ secrets.CI_HEDERA_ACCOUNT }},operatorKey=${{ secrets.CI_HEDERA_PRIV_KEY }},grepTags=${{ inputs.tags }},grepFilterSpecs=true" --spec cypress/e2e/api-tests/**/*.cy.js popd - name: Publish API Test Results diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index d1d55c6ee5..093e8bf230 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -6,7 +6,7 @@ on: jobs: buildAndTest: name: Build and Test - runs-on: [self-hosted, Linux, medium, ephemeral] + runs-on: ubuntu-latest services: ipfs-node: image: ipfs/kubo:latest @@ -62,6 +62,9 @@ jobs: pushd auth-service yarn run build popd + pushd queue-service + yarn run build + popd pushd guardian-service yarn run build popd @@ -98,6 +101,10 @@ jobs: pushd auth-service npm start & sleep 20 + popd + pushd queue-service + npm start & + sleep 20 popd pushd guardian-service npm start & @@ -128,7 +135,7 @@ jobs: run: | pushd e2e-tests npm install --force - npx cypress run --env "portApi=3002,operatorId=${{ secrets.CI_HEDERA_ACCOUNT }},operatorKey=${{ secrets.CI_HEDERA_PRIV_KEY }}" --spec cypress/e2e/api-tests/**/*.cy.js + npx cypress run --env "portApi=3002,operatorId=${{ secrets.CI_HEDERA_ACCOUNT }},operatorKey=${{ secrets.CI_HEDERA_PRIV_KEY }},grepTags=smoke,grepFilterSpecs=true" --spec cypress/e2e/api-tests/**/*.cy.js popd - name: Publish API Test Results diff --git a/.gitignore b/.gitignore index 39f3581024..568ca7bf89 100644 --- a/.gitignore +++ b/.gitignore @@ -17,13 +17,10 @@ tsconfig.tsbuildinfo .pnp.* node_modules runtime-data/ -<<<<<<< HEAD -downloads -test.env.json -======= -000_* ->>>>>>> origin/automation-api-tests # OSX related metadata removal and IDE nonsense .DS_store .idea + +logs/ +**/logs/ \ No newline at end of file diff --git a/Methodology Library/CDM/CDM ACM0018/ACM0018.policy b/Methodology Library/CDM/CDM ACM0018/ACM0018.policy index f929455455..0d8ef129c9 100644 Binary files a/Methodology Library/CDM/CDM ACM0018/ACM0018.policy and b/Methodology Library/CDM/CDM ACM0018/ACM0018.policy differ diff --git a/Methodology Library/CDM/CDM AMS-I.A/CDM AMS-I.A.policy b/Methodology Library/CDM/CDM AMS-I.A/CDM AMS-I.A.policy index cdbcf8b30a..655a6dbea7 100644 Binary files a/Methodology Library/CDM/CDM AMS-I.A/CDM AMS-I.A.policy and b/Methodology Library/CDM/CDM AMS-I.A/CDM AMS-I.A.policy differ diff --git a/Methodology Library/CDM/CDM AMS-I.C/CDM AMS-I.C.policy b/Methodology Library/CDM/CDM AMS-I.C/CDM AMS-I.C.policy index 4d7e2d8537..f0b72b74b2 100644 Binary files a/Methodology Library/CDM/CDM AMS-I.C/CDM AMS-I.C.policy and b/Methodology Library/CDM/CDM AMS-I.C/CDM AMS-I.C.policy differ diff --git a/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E Schema Design with Sample Data.xlsx b/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E Schema Design with Sample Data.xlsx new file mode 100644 index 0000000000..763fe9757b Binary files /dev/null and b/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E Schema Design with Sample Data.xlsx differ diff --git a/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E Schema Design.xlsx b/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E Schema Design.xlsx new file mode 100644 index 0000000000..9d07faaadf Binary files /dev/null and b/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E Schema Design.xlsx differ diff --git a/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E.policy b/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E.policy new file mode 100644 index 0000000000..e8e004bf47 Binary files /dev/null and b/Methodology Library/CDM/CDM AMS-I.E/AMS-I.E.policy differ diff --git a/Methodology Library/CDM/CDM AMS-I.F/CDM AMS-I.F Policy.policy b/Methodology Library/CDM/CDM AMS-I.F/CDM AMS-I.F Policy.policy index 385f86ad2a..b49198915a 100644 Binary files a/Methodology Library/CDM/CDM AMS-I.F/CDM AMS-I.F Policy.policy and b/Methodology Library/CDM/CDM AMS-I.F/CDM AMS-I.F Policy.policy differ diff --git a/Methodology Library/CDM/Tools/Tool 16/Tool 16.tool b/Methodology Library/CDM/Tools/Tool 16/Tool 16.tool index 46677760ed..26d1bb4797 100644 Binary files a/Methodology Library/CDM/Tools/Tool 16/Tool 16.tool and b/Methodology Library/CDM/Tools/Tool 16/Tool 16.tool differ diff --git a/Methodology Library/Hackathon/VMR0006/README.md b/Methodology Library/Hackathon/VMR0006/README.md deleted file mode 100644 index f31c3b61c7..0000000000 --- a/Methodology Library/Hackathon/VMR0006/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# VMR0006-DLT -An Auditable methodology for emission reduction by using sustainable thermal applications in Hedera Guardian - -## Table of contents - -1. Introduction -2. Need and Use for the VMR0006 policy -3. Demo Video -4. Policy Workflow -5. Policy Guide -6. Available Roles -7. Token (Waste Recycling Credit) -8. Sources and References - -### Introduction - -The VCS Methodology VMR0006 provides a structured framework for quantifying greenhouse gas (GHG) emission reductions resulting from energy efficiency enhancements and fuel switch initiatives in thermal applications. With a focus on sustainability and resource conservation, VMR0006 aims to promote environmentally friendly practices in biomass and fossil fuel consumption. - -### Need and use for the VMR0006 policy - -VMR0006 addresses a critical need in mitigating environmental challenges associated with energy consumption in thermal applications, particularly the use of non-renewable biomass and fossil fuels. By providing a structured framework for implementing energy efficiency measures and fuel switch activities, VMR0006 aims to promote sustainability and reduce greenhouse gas emissions. Through its guidelines and procedures, VMR0006 facilitates the adoption of renewable biomass and enhances energy efficiency, contributing to climate change mitigation and resource conservation efforts. Furthermore, VMR0006 promotes transparent reporting and verification processes, ensuring accountability and fostering sustainable development practices. In essence, VMR0006 plays a pivotal role in advancing environmental sustainability and building resilient communities equipped to address the impacts of climate change. - -### Demo video - - - -### Workflow - -![Screenshot from 2024-04-03 23-25-03](https://github.com/Ni8crawler18/VMR0006-DLT/assets/149990456/c6c9baa8-8c52-4558-8246-032895b391e0) - -The project proponent initiates the process by creating a project design document (VMR0006) for Verra, which includes details such as project description, additionality demonstration, baseline scenario, and estimated emission reductions. Verra and the Validation/Verification Body (VVB) review the project design document. Once approved, Emission reduction credits (ERC) are issued by Verra. The project is then added to the registry, and the project activities are monitored as per the VMR0006 guidelines. The monitored parameters are documented in a monitoring report, which is reviewed by the VVB. After successful review, the project is added to the project pipeline for further processing. - -### Policy guide - -This policy is published to Hedera network and can be imported via Github (.policy file) - -### Available roles - -1. **Project Proponent** - The project proponent is responsible for initiating and executing the energy efficiency or fuel switch project. They must follow the requirements outlined in the VMR0006 methodology and provide evidence of the project activities, such as device distribution, biomass consumption, and emission reductions achieved. Upon successful validation and verification, the project proponent receives Emission Reduction Credits (ERC) as an incentive for their emission reductions. - -2. **Validation and Verification Body (VVB)** - The VVB plays a crucial role in independently validating and verifying the project data submitted by the project proponent. They thoroughly assess the project design document, including the baseline scenario, additionality demonstration, and estimated emission reductions. Additionally, the VVB verifies the monitoring reports and evaluates the project's adherence to the VMR0006 guidelines. Based on their evaluation, the VVB either approves or rejects the project for registration and credit issuance. - -3. **Registry (Verra)** – Verra serves as the registry, responsible for project intake, pipeline management, and final review of project design documents and monitoring reports. This process ensures that energy efficiency and fuel switch projects meet the VMR0006 methodology requirements before Emission Reduction Credits (ERC) are issued. Verra also oversees the issuance of ERCs to approved projects. - -### Token issued - -Emission Reduction Credit (ERC), each equivalent to (1) tonne of CO2 saved by sustainable thermal applications. - -### Sources and References - -1. VMR0006 - https://verra.org/documents/vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications-v1-2 -2. CDM-2.G - https://cdm.unfccc.int/methodologies/DB/GNFWB3Y6GM4WPXFRR2SXKS9XR908IO -3. CDM Guidelines - https://cdm.unfccc.int/Reference/Guidclarif/index.html - - - - diff --git a/Methodology Library/Hackathon/VMR0006/VMR0006.policy b/Methodology Library/Hackathon/VMR0006/VMR0006.policy deleted file mode 100644 index 3fbdcdfd75..0000000000 Binary files a/Methodology Library/Hackathon/VMR0006/VMR0006.policy and /dev/null differ diff --git a/Methodology Library/Hackathon/VMR0006/LICENSE b/Methodology Library/Verra/VMR0006/LICENSE similarity index 100% rename from Methodology Library/Hackathon/VMR0006/LICENSE rename to Methodology Library/Verra/VMR0006/LICENSE diff --git a/Methodology Library/Verra/VMR0006/README.md b/Methodology Library/Verra/VMR0006/README.md new file mode 100644 index 0000000000..a79abcbdf2 --- /dev/null +++ b/Methodology Library/Verra/VMR0006/README.md @@ -0,0 +1,179 @@ +# Verra VMR0006: Energy Efficiency and Fuel Switch Measures in Thermal Applications + +## Table of contents + +1. Introduction +2. Need and Use +3. Demo Video +4. Policy Workflow +5. Policy Guide +6. Available Roles +7. Token (Waste Recycling Credit) +8. Sources and References + +### Introduction + +This policy focuses on the VMR0006 methodology, "Energy Efficiency and Fuel Switch Measures in Thermal Applications, v1.2." Developed as an extension of CDM’s AMS-II.G, VMR0006 is particularly relevant for improved cookstove projects. This methodology revision aims to provide monitoring parameters and quantification methods, resulting in emission reductions. It provides alternative methods for monitoring parameters and quantifying emission reductions, largely allowing for the increased use of defaults and less frequent monitoring, therefore, maintaining lower project costs. + +### Need and use + +The VMR0006 methodology can be used by project developers working on improved cookstove projects. By utilizing default values and less frequent monitoring, VMR0006 helps reduce project costs while ensuring reliable data. The methodology focuses on several key areas, including adoption, usage, stacking (the use of multiple types of stoves within the same household), fuel consumption, fraction of non-renewable biomass (fNRB), and emission factors. + +VMR0006 uses short cross-sectional surveys to establish adoption, usage, and stacking rates, similar to AMS-II.G but with more lenient monitoring requirements. Fuel consumption is determined using default values, historical data, or project-led surveys, with options for annual water boil tests to obtain stove efficiency or assume default efficiency depreciation rates. The methodology directs projects to use global averages, CDM’s Tool 33, or CDM's Tool 30 for fNRB, with a 26% emission reduction discount for using Tool 30. Emission factors include point-of-use and upstream emissions for various gases, using IPCC values, which may lead to larger over-crediting compared to AMS-II.G. Rebound effects in the carbon market refer to increased technology usage due to improved energy efficiency, which can lead to higher overall emissions and offset some anticipated savings. In this methodology, rebound effects are not captured, leading to similar over-crediting. Additionality is granted if stoves are free or use the CDM's tool for demonstration, with leakage adjustments like AMS-II.G. + +### Standard Stove Performance Testing + +Monitoring and evaluating improved cookstove performance is crucial for developing effective cookstove programs. There are three main types of stove performance tests: Water Boiling Test (WBT), Controlled Cooking Test (CCT), and Kitchen Performance Test (KPT). + +**Water Boiling Test (WBT)**: WBT is a laboratory test that evaluates stove performance during a controlled task (boiling and simmering water). It is simple, quick, and cost-effective but does not accurately reflect real cooking conditions. WBT is conducted by trained technicians in a controlled environment, revealing technical performance rather than actual household use. + +**Controlled Cooking Test (CCT)**: CCT measures stove performance when a local meal is prepared, either in a lab or field setting. It assesses performance under ideal conditions, simulating local practices. However, CCT still doesn't capture the full range of real-world variables like fuel variability and operator behavior differences. + +**Kitchen Performance Test (KPT)**: KPT is the primary field test used to evaluate stove performance in real-world settings, conducted in users' homes to assess actual impacts on household fuel consumption. KPTs provide the most accurate understanding of stove performance but are labor-intensive and intrusive, with results influenced by the less controlled environment. + +Overall, improved cookstove performance testing involves balancing logistical complexities and realistic reflection of outcomes. While each test type has strengths and weaknesses, a combination of laboratory and field testing is recommended for comprehensive evaluation. This approach ensures that performance testing accounts for local food preparation and real-world usage, enhancing the reliability of results. + + + +### Different Cookstove Methodologies: Pros and Cons + +**VMR0006**: VMR0006 provides a cost-effective solution by utilizing default values and less frequent monitoring, which helps reduce project costs while maintaining reliable data. However, this approach may not capture real-time variations in fuel use and emissions as precisely as continuous monitoring methods. + +**Gold Standard Metered Methodology**: The Gold Standard Metered Methodology offers robust monitoring of stove usage and fuel consumption, ensuring high data accuracy and transparency. However, it involves higher costs due to the need for continuous monitoring equipment and may require more technical expertise to implement. + +**Clean Development Mechanism (CDM) AMS-II.G**: The CDM AMS-II.G methodology is well-established and widely recognized, using conservative estimates to ensure credibility. However, it can be complex and costly to implement due to rigorous data requirements and may not be as flexible as other methodologies in adapting to local conditions. + +The project proponent initiates the process by creating a project design document (VMR0006) for Verra, which includes details such as project description, additionality demonstration, baseline scenario, and estimated emission reductions. Verra and the Validation/Verification Body (VVB) review the project design document. Once approved, Emission reduction credits (ERC) are issued by Verra. The project is then added to the registry, and the project activities are monitored as per the VMR0006 guidelines. The monitored parameters are documented in a monitoring report, which is reviewed by the VVB. After successful review, the project is added to the project pipeline for further processing. + +### Overview of Cookstove Methodologies + +Various methodologies are used to quantify emissions reductions in cookstove projects, each with its own approach to monitoring and verification. These methodologies include cross-sectional surveys, kitchen performance tests (KPTs), and continuous monitoring systems (CMS). Cross-sectional surveys and KPTs are commonly used to gather data on stove adoption, usage, and fuel consumption, while CMS provides real-time data but at a higher cost. The methodologies also address issues such as stove stacking, rebound effects, and leakage to ensure accurate emissions reductions. More details on these methodologies can be found on the [Berkeley Carbon Trading Project's website](https://gspp.berkeley.edu/research-and-impact/centers/cepp/projects/berkeley-carbon-trading-project/cookstoves/how-the-methodologies-work). + +### Policy Workflow + +![image](https://github.com/user-attachments/assets/a3aef3e4-f825-4cce-acfe-48d4e732d348) + +### Policy Import + +This policy is published to Hedera network and can either be imported via Github (.policy file) or IPSF timestamp. + + +### Available roles + +1. **Project Proponent** - The project proponent is responsible for initiating and executing the energy efficiency or fuel switch project. They must follow the requirements outlined in the VMR0006 methodology and provide evidence of the project activities, such as device distribution, biomass consumption, and emission reductions achieved. Upon successful validation and verification, the project proponent receives Emission Reduction Credits (ERC) as an incentive for their emission reductions. + +2. **Validation and Verification Body (VVB)** - The VVB plays a crucial role in independently validating and verifying the project data submitted by the project proponent. They thoroughly assess the project design document, including the baseline scenario, additionality demonstration, and estimated emission reductions. Additionally, the VVB verifies the monitoring reports and evaluates the project's adherence to the VMR0006 guidelines. Based on their evaluation, the VVB either approves or rejects the project for registration and credit issuance. + +3. **Registry (Verra)** – Verra serves as the registry, responsible for project intake, pipeline management, and final review of project design documents and monitoring reports. This process ensures that energy efficiency and fuel switch projects meet the VMR0006 methodology requirements before Emission Reduction Credits (ERC) are issued. Verra also oversees the issuance of ERCs to approved projects. + +### Token (Verified Carbon Unit) + +Verified Carbon Unit (VCU) credits, each equivalent to one tonne of CO2. + +### Step By Step + +1. Import the policy using IPFS or Policy File. Once imported, you will be redirected to the policy configurator. + +![image](https://github.com/user-attachments/assets/8405976a-fb91-404c-8f7a-90b87020d7c6) + +![image](https://github.com/user-attachments/assets/beb72cc5-4974-430a-a0c7-05cda6c21cc8) + +![image](https://github.com/user-attachments/assets/460cafb0-c526-4d5a-8953-330c8629e70b) + +![image](https://github.com/user-attachments/assets/87cd143c-f787-42d6-b4f7-a70ffdc4a104) + +![image](https://github.com/user-attachments/assets/5d345bd6-98b6-48e6-80f2-c2ce87a7d422) + +2. Set the policy to Dry Run or Publish it using the dropdown. Then select “Go” or “Register”. + +![image](https://github.com/user-attachments/assets/781fa162-66b8-40ec-9d09-2ee7193e1eea) + +![image](https://github.com/user-attachments/assets/60929215-ae21-44e4-ab43-0d05dd41646c) + +![image](https://github.com/user-attachments/assets/e6b8b897-b087-4be9-a67b-ea4ee09f6928) + +3. Create a new user and assign their role as the Project Proponent. + +![image](https://github.com/user-attachments/assets/a02610d8-662a-443e-b462-e63272e02d10) + +![image](https://github.com/user-attachments/assets/602d0c31-1cad-4678-92df-f09e6cf27bc3) + +![image](https://github.com/user-attachments/assets/30965b93-0b72-494a-b0e4-1e1ab3ad0cb4) + +4. Create a new project by clicking on the "New Project" button and enter all the required details. + +![image](https://github.com/user-attachments/assets/5017720b-910f-4d76-a6a4-d347bf85baa7) + +5. Once the project details are submitted, Verra can add it to the project pipeline. + +![image](https://github.com/user-attachments/assets/11917d9e-1f42-49b0-b8d9-dac06c6a87c3) + +6. The Standard Registry can now add the project to the project pipeline by selecting “Add”. + +![image](https://github.com/user-attachments/assets/415cdc76-b794-4455-9662-4d51728ced82) + +7. Now, we create a new user and assign its role as the VVB. + +![image](https://github.com/user-attachments/assets/86457b66-84a8-4939-b01a-29dd0b307f48) + +8. The VVB must now give their name. Once the VVB’s name is set, the VVB waits for SR to approve it. + +![image](https://github.com/user-attachments/assets/8649d844-7827-4b1f-b45a-c37f501e48da) + +9. Now we log in as SR and approve the VVB. + +![image](https://github.com/user-attachments/assets/509e4b9f-fa45-454d-9417-309c0fb3c75a) + +10. Log in as the Project Proponent and assign the VVB to the project using the dropdown. + +![image](https://github.com/user-attachments/assets/f9807530-c0a3-4c94-b8e0-32a46267a395) + +11. Once the VVB is assigned, the VVB will now have access to the project for validation/verification. + +![image](https://github.com/user-attachments/assets/fbcbb50c-3f6a-4d4b-9fd7-98c01ef86a28) + +12. Once validated, we log in as Project Proponent and add a monitoring report. + +![image](https://github.com/user-attachments/assets/788b16c1-855c-4b0a-aa5a-0c460a3543e7) + +![image](https://github.com/user-attachments/assets/5c76049c-e87b-4b22-9088-783126332fe4) + +13. Once the report is submitted, we now log in as the VVB and validate the monitoring report by clicking on the “Verify” button. + +![image](https://github.com/user-attachments/assets/0b437ac7-1267-46cc-8113-2a2df5a2f3dd) + +14. Once the monitoring report is validated, we log in as the SR and click on “Mint” to mint the tokens. + +![image](https://github.com/user-attachments/assets/fa3b7fc0-4604-4a4c-bd01-7b6d663681bc) + +15. Once minting is completed, we can view tokens in the “VPs” tab. + +![image](https://github.com/user-attachments/assets/47b23d73-0a35-4c7f-a776-54322b1da2b7) + +16. The Trust Chain can also be viewed by clicking on the “View Trust Chain” button: + +![image](https://github.com/user-attachments/assets/e970cb7e-fe17-4b02-a773-c4cd6190d3d0) + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Methodology Library/Hackathon/VMR0006/VMR0006-equations.pdf b/Methodology Library/Verra/VMR0006/VMR0006-equations.pdf similarity index 100% rename from Methodology Library/Hackathon/VMR0006/VMR0006-equations.pdf rename to Methodology Library/Verra/VMR0006/VMR0006-equations.pdf diff --git a/Methodology Library/Hackathon/VMR0006/VMR0006.pdf b/Methodology Library/Verra/VMR0006/VMR0006.pdf similarity index 100% rename from Methodology Library/Hackathon/VMR0006/VMR0006.pdf rename to Methodology Library/Verra/VMR0006/VMR0006.pdf diff --git a/Methodology Library/Verra/VMR0006/VMR0006.policy b/Methodology Library/Verra/VMR0006/VMR0006.policy new file mode 100644 index 0000000000..226d7f01e0 Binary files /dev/null and b/Methodology Library/Verra/VMR0006/VMR0006.policy differ diff --git a/Methodology Library/Hackathon/VMR0006/VMR0006.xlsx b/Methodology Library/Verra/VMR0006/VMR0006.xlsx similarity index 100% rename from Methodology Library/Hackathon/VMR0006/VMR0006.xlsx rename to Methodology Library/Verra/VMR0006/VMR0006.xlsx diff --git a/Methodology Library/Hackathon/VMR0006/workflow.png b/Methodology Library/Verra/VMR0006/workflow.png similarity index 100% rename from Methodology Library/Hackathon/VMR0006/workflow.png rename to Methodology Library/Verra/VMR0006/workflow.png diff --git a/README.md b/README.md index e49dc4ca7f..f9d332008b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Guardian -[![Apache 2.0 License](https://img.shields.io/hexpm/l/apa)](LICENSE) ![Build results](https://github.com/hashgraph/guardian/actions/workflows/main.yml/badge.svg?branch=main) ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/hashgraph/guardian/master/guardian-service?label=version) [![Discord chat](https://img.shields.io/discord/373889138199494658)](https://discord.com/channels/373889138199494658/898264469786988545) +[![Apache 2.0 License](https://img.shields.io/hexpm/l/apa)](LICENSE) ![Build results](https://github.com/hashgraph/guardian/actions/workflows/main.yml/badge.svg?branch=main) ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/hashgraph/guardian/master/guardian-service?label=version) [![Discord chat](https://img.shields.io/discord/373889138199494658)](https://discord.com/channels/373889138199494658/898264469786988545) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9216/badge)](https://www.bestpractices.dev/projects/9216) ## Overview @@ -266,6 +266,7 @@ If you want to manually build every component with debug information, then build * [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) * [Nats 1.12.2](https://nats.io/) * [Redict 7.3.0](https://redict.io/) +* [Seq 2024.3 - optional for logging](https://datalust.co/seq) ### Build and start each component diff --git a/ai-service/configs/.env.ai-service b/ai-service/configs/.env.ai-service index 51a9621164..6ed9841ef5 100644 --- a/ai-service/configs/.env.ai-service +++ b/ai-service/configs/.env.ai-service @@ -4,4 +4,20 @@ OPENAI_API_KEY=... GPT_VERSION=gpt-3.5-turbo VECTOR_STORAGE_PATH=./faiss-vector DOCS_STORAGE_PATH=./data/generated-data -MQ_ADDRESS="localhost" \ No newline at end of file +MQ_ADDRESS="localhost" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/ai-service/configs/.env.ai-service.develop b/ai-service/configs/.env.ai-service.develop index 51a9621164..6ed9841ef5 100644 --- a/ai-service/configs/.env.ai-service.develop +++ b/ai-service/configs/.env.ai-service.develop @@ -4,4 +4,20 @@ OPENAI_API_KEY=... GPT_VERSION=gpt-3.5-turbo VECTOR_STORAGE_PATH=./faiss-vector DOCS_STORAGE_PATH=./data/generated-data -MQ_ADDRESS="localhost" \ No newline at end of file +MQ_ADDRESS="localhost" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/ai-service/configs/.env.ai-service.template b/ai-service/configs/.env.ai-service.template index 5904b6449a..132f3004fd 100644 --- a/ai-service/configs/.env.ai-service.template +++ b/ai-service/configs/.env.ai-service.template @@ -3,4 +3,20 @@ SERVICE_CHANNEL="ai-service" OPENAI_API_KEY=... GPT_VERSION=gpt-3.5-turbo VECTOR_STORAGE_PATH=./faiss-vector -DOCS_STORAGE_PATH=./data/generated-data \ No newline at end of file +DOCS_STORAGE_PATH=./data/generated-data + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/ai-service/faiss-vector/faiss.index b/ai-service/faiss-vector/faiss.index index 429869eb1b..e69de29bb2 100644 Binary files a/ai-service/faiss-vector/faiss.index and b/ai-service/faiss-vector/faiss.index differ diff --git a/ai-service/package.json b/ai-service/package.json index 7a4333ea51..bec194a560 100644 --- a/ai-service/package.json +++ b/ai-service/package.json @@ -1,11 +1,11 @@ { "name": "ai-service", - "version": "2.26.2", + "version": "2.27.0", "main": "dist/app.js", "license": "Apache-2.0", "dependencies": { - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", "@nestjs/common": "^9.4.1", @@ -21,6 +21,9 @@ "typescript": "^5.2.2", "rxjs": "^7.8.1" }, + "imports": { + "#constants": "./dist/constants/index.js" + }, "scripts": { "build": "tsc", "build:prod": "tsc --project tsconfig.production.json", diff --git a/ai-service/src/ai-manager.ts b/ai-service/src/ai-manager.ts index a91aacc11b..f24a30f233 100644 --- a/ai-service/src/ai-manager.ts +++ b/ai-service/src/ai-manager.ts @@ -7,7 +7,7 @@ import { VectorStorage } from './helpers/vector-storage-helper.js'; import { AISuggestionsDB } from './helpers/ai-suggestions-db.js'; import { PolicyDescription } from './models/models.js'; import * as dotenv from 'dotenv'; -import { Logger, Policy, PolicyCategory } from '@guardian/common'; +import { PinoLogger, Policy, PolicyCategory } from '@guardian/common'; dotenv.config(); @@ -20,9 +20,9 @@ export class AIManager { chain: RetrievalQAChain | null; vector: FaissStore | null; model: OpenAI; - policyDescriptions: PolicyDescription[] + policyDescriptions: PolicyDescription[]; - constructor() { + constructor(private readonly logger: PinoLogger) { this.docPath = process.env.DOCS_STORAGE_PATH || './data/generated-data'; this.versionGPT = process.env.GPT_VERSION || 'gpt-3.5-turbo'; this.vectorPath = process.env.VECTOR_STORAGE_PATH || './faiss-vector'; @@ -56,18 +56,18 @@ export class AIManager { async rebuildVector() { try { - new Logger().info('rebuild vector', ['AI_SERVICE']); + await this.logger.info('rebuild vector', ['AI_SERVICE']); this.vector = null; this.chain = null; await this.loadDBData(); - await FilesManager.generateData(this.docPath, this.policies, this.categories, this.policyDescriptions); - await VectorStorage.create(this.docPath, this.vectorPath); + await FilesManager.generateData(this.docPath, this.policies, this.categories, this.policyDescriptions, this.logger); + await VectorStorage.create(this.docPath, this.vectorPath, this.logger); - new Logger().info('end rebuild vector', ['AI_SERVICE']); + await this.logger.info('end rebuild vector', ['AI_SERVICE']); } catch (e) { - new Logger().error(e.message, ['AI_SERVICE']); + await this.logger.error(e.message, ['AI_SERVICE']); } } @@ -75,13 +75,13 @@ export class AIManager { const dbRequests = new AISuggestionsDB(); this.categories = await dbRequests.getPolicyCategories(); - new Logger().info('fetched categories', ['AI_SERVICE']); + await this.logger.info('fetched categories', ['AI_SERVICE']); this.policies = await dbRequests.getAllPolicies(); - new Logger().info('fetched policies', ['AI_SERVICE']); + await this.logger.info('fetched policies', ['AI_SERVICE']); this.policyDescriptions = await dbRequests.getFieldDescriptions(this.policies); - new Logger().info('fetched fields descriptions', ['AI_SERVICE']); + await this.logger.info('fetched fields descriptions', ['AI_SERVICE']); } } diff --git a/ai-service/src/api/service/ai-suggestions-service.ts b/ai-service/src/api/service/ai-suggestions-service.ts index 19e3c7e65f..cc08176098 100644 --- a/ai-service/src/api/service/ai-suggestions-service.ts +++ b/ai-service/src/api/service/ai-suggestions-service.ts @@ -1,12 +1,12 @@ import { ApiResponse } from '../../helpers/api-response.js'; import { AIManager } from '../../ai-manager.js'; import { MessageAPI } from '@guardian/interfaces'; -import { MessageError, MessageResponse } from '@guardian/common'; +import { MessageError, MessageResponse, PinoLogger } from '@guardian/common'; /** * Connect to the message broker methods of working with artifacts. */ -export async function aiSuggestionsAPI(aiManager: AIManager): Promise { +export async function aiSuggestionsAPI(aiManager: AIManager, logger: PinoLogger): Promise { /** * AI Suggestions * @@ -24,7 +24,7 @@ export async function aiSuggestionsAPI(aiManager: AIManager): Promise { if (aiManager.vector !== null && aiManager.chain !== null) { result = await aiManager.ask(msg.question); } else { - aiManager = new AIManager(); + aiManager = new AIManager(logger); await aiManager.rebuildVector(); result = await aiManager.ask(msg.question); @@ -38,7 +38,7 @@ export async function aiSuggestionsAPI(aiManager: AIManager): Promise { ApiResponse(MessageAPI.VECTOR_REBUILD, async () => { try { - aiManager = new AIManager(); + aiManager = new AIManager(logger); await aiManager.rebuildVector(); return new MessageResponse(true); diff --git a/ai-service/src/app.ts b/ai-service/src/app.ts index a70134bb6f..5a6acb9f64 100644 --- a/ai-service/src/app.ts +++ b/ai-service/src/app.ts @@ -2,27 +2,29 @@ import { AISuggestionService } from './helpers/suggestions.js'; import { aiSuggestionsAPI } from './api/service/ai-suggestions-service.js'; import { AISuggestionsDB } from './helpers/ai-suggestions-db.js'; import { AIManager } from './ai-manager.js'; -import { ApplicationState, Logger, MessageBrokerChannel } from '@guardian/common'; +import { ApplicationState, MessageBrokerChannel, mongoForLoggingInitialization, PinoLogger, pinoLoggerInitialization } from '@guardian/common'; import * as process from 'process'; import { ApplicationStates } from '@guardian/interfaces'; Promise.all([ - MessageBrokerChannel.connect('AI_SERVICE') + MessageBrokerChannel.connect('AI_SERVICE'), + mongoForLoggingInitialization() ]).then(async values => { - const [cn] = values; + const [cn, loggerMongo] = values; + + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); const state = new ApplicationState(); await state.setServiceName('AI_SERVICE').setConnection(cn).init(); - state.updateState(ApplicationStates.INITIALIZING); - new Logger().setConnection(cn); + await state.updateState(ApplicationStates.INITIALIZING); await new AISuggestionService().setConnection(cn).init(); await new AISuggestionsDB().setConnection(cn).init(); try { - const aiManager = new AIManager(); - await aiSuggestionsAPI(aiManager); - state.updateState(ApplicationStates.READY); - new Logger().info('Ai service started', ['AI_SERVICE']); + const aiManager = new AIManager(logger); + await aiSuggestionsAPI(aiManager, logger); + await state.updateState(ApplicationStates.READY); + await logger.info('Ai service started', ['AI_SERVICE']); } catch (error) { console.log(error); console.error(error); diff --git a/ai-service/src/config.ts b/ai-service/src/config.ts index d77b5b36e8..8b87d0837f 100644 --- a/ai-service/src/config.ts +++ b/ai-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false') { } } } -console.log('Charged Environment', process.env, '\r\n___ . ___'); diff --git a/ai-service/src/constants/index.ts b/ai-service/src/constants/index.ts new file mode 100644 index 0000000000..3ddd6b59cd --- /dev/null +++ b/ai-service/src/constants/index.ts @@ -0,0 +1 @@ +export { DEFAULT as DEFAULT_MONGO } from './mongo.js'; diff --git a/ai-service/src/constants/mongo.ts b/ai-service/src/constants/mongo.ts new file mode 100644 index 0000000000..65aef2dde1 --- /dev/null +++ b/ai-service/src/constants/mongo.ts @@ -0,0 +1,5 @@ +export const DEFAULT = { + MIN_POOL_SIZE: '1', + MAX_POOL_SIZE: '5', + MAX_IDLE_TIME_MS: '30000', +}; \ No newline at end of file diff --git a/ai-service/src/helpers/files-manager-helper.ts b/ai-service/src/helpers/files-manager-helper.ts index 53ce508734..d7feb36887 100644 --- a/ai-service/src/helpers/files-manager-helper.ts +++ b/ai-service/src/helpers/files-manager-helper.ts @@ -4,19 +4,19 @@ import * as path from 'path'; import { GroupCategories } from './general-helper.js'; import { PolicyDescription } from '../models/models.js'; import { PolicyCategoryType } from '@guardian/interfaces'; -import { Logger, Policy, PolicyCategory } from '@guardian/common'; +import { PinoLogger, Policy, PolicyCategory } from '@guardian/common'; const MIN_DESCRIPTION_WORDS = 5; export class FilesManager { - static async generateData(dirPath: string, policies: Policy[], categories: PolicyCategory[], policyDescriptions: PolicyDescription[]): Promise { + static async generateData(dirPath: string, policies: Policy[], categories: PolicyCategory[], policyDescriptions: PolicyDescription[], logger: PinoLogger): Promise { FilesManager.checkDir(dirPath); FilesManager.deleteAllFilesInDirectory(dirPath); try { - await FilesManager.generateMethodologyFiles(dirPath, policies, categories, policyDescriptions); - await FilesManager.generateMetadataFile(dirPath, policies, categories); + await FilesManager.generateMethodologyFiles(dirPath, policies, categories, policyDescriptions, logger); + await FilesManager.generateMetadataFile(dirPath, policies, categories, logger); return true; } catch (e) { console.log(e); @@ -24,7 +24,7 @@ export class FilesManager { } } - static async generateMethodologyFiles(dirPath: string, policies: Policy[], categories: PolicyCategory[], policyDescriptions: PolicyDescription[]) { + static async generateMethodologyFiles(dirPath: string, policies: Policy[], categories: PolicyCategory[], policyDescriptions: PolicyDescription[], logger: PinoLogger) { if (!policies) { return false; } @@ -38,17 +38,17 @@ export class FilesManager { const content = FilesManager.getFileData(policy, categories, descriptions); if (content) { - await FilesManager.generateFile(filePath, content); + await FilesManager.generateFile(filePath, content, logger); } } } - static async generateMetadataFile(dirPath: string, policies: Policy[], categories: PolicyCategory[]) { + static async generateMetadataFile(dirPath: string, policies: Policy[], categories: PolicyCategory[], logger: PinoLogger) { const content = FilesManager.getMetadataContent(policies, categories); if (content) { const fileName = `${dirPath}/metadata.txt`; - await FilesManager.generateFile(fileName, content); + await FilesManager.generateFile(fileName, content, logger); } } @@ -159,14 +159,14 @@ export class FilesManager { return ''; } - static async generateFile(filePath: string, content: string) { + static async generateFile(filePath: string, content: string, logger: PinoLogger) { return new Promise((resolve, reject) => { - fs.writeFile(filePath, content, (err) => { + fs.writeFile(filePath, content, async (err) => { if (err) { console.error(err); reject(); } else { - new Logger().info(`File ${filePath} was created`, ['AI_SERVICE']); + await logger.info(`File ${filePath} was created`, ['AI_SERVICE']); resolve(true); } }); diff --git a/ai-service/src/helpers/vector-storage-helper.ts b/ai-service/src/helpers/vector-storage-helper.ts index 6231a145a3..3b6195e786 100644 --- a/ai-service/src/helpers/vector-storage-helper.ts +++ b/ai-service/src/helpers/vector-storage-helper.ts @@ -3,7 +3,8 @@ import { FaissStore } from 'langchain/vectorstores/faiss'; import { DirectoryLoader } from 'langchain/document_loaders/fs/directory'; import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from 'langchain/text_splitter'; -import { Logger } from '@guardian/common'; +import { PinoLogger } from '@guardian/common'; + export class VectorStorage { @@ -13,7 +14,7 @@ export class VectorStorage { return vectorData; } - static async create(docPath: string, vectorPath: string) { + static async create(docPath: string, vectorPath: string, logger: PinoLogger): Promise { try { if (docPath && vectorPath) { const textLoader = new DirectoryLoader(docPath, { @@ -33,14 +34,14 @@ export class VectorStorage { const vectorstore = await FaissStore.fromDocuments(documents, embeddings); await vectorstore.save(vectorPath); - new Logger().info('vector has been successfully created', ['AI_SERVICE']); + await logger.info('vector has been successfully created', ['AI_SERVICE']); } else { - new Logger().warn('there is no data for vector creation', ['AI_SERVICE']); + await logger.warn('there is no data for vector creation', ['AI_SERVICE']); } } } catch (e) { - new Logger().error(e.message, ['AI_SERVICE']); + await logger.error(e.message, ['AI_SERVICE']); } } } diff --git a/ai-service/tsconfig.json b/ai-service/tsconfig.json index bf42554e66..f7fe146a23 100644 --- a/ai-service/tsconfig.json +++ b/ai-service/tsconfig.json @@ -13,7 +13,10 @@ "module": "ESNext", "moduleResolution": "node", "outDir": "dist/", - "target": "es2022" + "target": "es2022", + "paths": { + "#constants/*": ["./src/constants/*"] + } }, "exclude": [ "node_modules", diff --git a/ai-service/tsconfig.production.json b/ai-service/tsconfig.production.json index 9eacd317e1..8556a29eb5 100644 --- a/ai-service/tsconfig.production.json +++ b/ai-service/tsconfig.production.json @@ -13,7 +13,10 @@ "module": "ESNext", "moduleResolution": "node", "outDir": "dist/", - "target": "es2022" + "target": "es2022", + "paths": { + "#constants/*": ["./src/constants/*"] + } }, "exclude": [ "node_modules", diff --git a/analytics-service/configs/.env.analytics b/analytics-service/configs/.env.analytics index cac644eb6a..0c239ace50 100644 --- a/analytics-service/configs/.env.analytics +++ b/analytics-service/configs/.env.analytics @@ -21,3 +21,19 @@ INITIALIZATION_TOPIC_ID="0.0.1960" # ANALYTICS ANALYTICS_SCHEDULER="0 0 * * 1" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/analytics-service/configs/.env.analytics.develop b/analytics-service/configs/.env.analytics.develop index cac644eb6a..0c239ace50 100644 --- a/analytics-service/configs/.env.analytics.develop +++ b/analytics-service/configs/.env.analytics.develop @@ -21,3 +21,19 @@ INITIALIZATION_TOPIC_ID="0.0.1960" # ANALYTICS ANALYTICS_SCHEDULER="0 0 * * 1" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/analytics-service/configs/.env.analytics.template b/analytics-service/configs/.env.analytics.template index bed7228d60..78cb87c97c 100644 --- a/analytics-service/configs/.env.analytics.template +++ b/analytics-service/configs/.env.analytics.template @@ -20,4 +20,20 @@ TRANSACTION_LOG_LEVEL="1" INITIALIZATION_TOPIC_ID="" # ANALYTICS -ANALYTICS_SCHEDULER="0 0 * * 1" \ No newline at end of file +ANALYTICS_SCHEDULER="0 0 * * 1" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/analytics-service/package.json b/analytics-service/package.json index 7337ff8bfe..0981d383bc 100644 --- a/analytics-service/package.json +++ b/analytics-service/package.json @@ -13,8 +13,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/jwt": "^10.0.3", @@ -82,5 +82,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/analytics-service/src/analytics/report.service.ts b/analytics-service/src/analytics/report.service.ts index 99105df05e..145b424870 100644 --- a/analytics-service/src/analytics/report.service.ts +++ b/analytics-service/src/analytics/report.service.ts @@ -1,4 +1,4 @@ -import { DataBaseHelper, Logger, MessageAction } from '@guardian/common'; +import { DataBaseHelper, MessageAction, PinoLogger } from '@guardian/common'; import { GenerateUUIDv4 } from '@guardian/interfaces'; import JSZip from 'jszip'; import xl from 'excel4node'; @@ -104,12 +104,12 @@ export class ReportService { }); if (!report) { - new Logger().error(`Report does not exist`, ['ANALYTICS_SERVICE']); + new PinoLogger().error(`Report does not exist`, ['ANALYTICS_SERVICE']); return report; } if (report.status === ReportStatus.PROGRESS) { - new Logger().error(`Report already started`, ['ANALYTICS_SERVICE']); + new PinoLogger().error(`Report already started`, ['ANALYTICS_SERVICE']); return report; } @@ -117,10 +117,10 @@ export class ReportService { ReportService.update(report).then((result) => { if (result && result.status === ReportStatus.FINISHED) { - new Logger().info(`Update completed`, ['ANALYTICS_SERVICE']); + new PinoLogger().info(`Update completed`, ['ANALYTICS_SERVICE']); } }, (error) => { - new Logger().error(`Update error: ${error?.message}`, ['ANALYTICS_SERVICE']); + new PinoLogger().error(`Update error: ${error?.message}`, ['ANALYTICS_SERVICE']); }); return report; diff --git a/analytics-service/src/app.ts b/analytics-service/src/app.ts index d8bd3805df..b53873f61d 100644 --- a/analytics-service/src/app.ts +++ b/analytics-service/src/app.ts @@ -2,10 +2,12 @@ import { COMMON_CONNECTION_CONFIG, DataBaseHelper, LargePayloadContainer, - Logger, MessageBrokerChannel, Migration, - Workers + mongoForLoggingInitialization, + PinoLogger, + pinoLoggerInitialization, + Workers, } from '@guardian/common'; import { HttpStatus, ValidationPipe } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; @@ -25,21 +27,22 @@ Promise.all([ ...COMMON_CONNECTION_CONFIG, migrations: { path: 'dist/migrations', - transactional: false + transactional: false, }, driverOptions: { - useUnifiedTopology: true + useUnifiedTopology: true, }, - ensureIndexes: true + ensureIndexes: true, }, [ - 'v2-21-0' + 'v2-21-0', ]), NestFactory.create(AppModule, { rawBody: true, - bodyParser: false + bodyParser: false, }), MessageBrokerChannel.connect('ANALYTICS_SERVICE'), -]).then(async ([db, app, cn]) => { + mongoForLoggingInitialization(), +]).then(async ([db, app, cn, loggerMongo]) => { try { DataBaseHelper.orm = db; app.connectMicroservice({ @@ -47,21 +50,22 @@ Promise.all([ options: { name: `${process.env.SERVICE_CHANNEL}`, servers: [ - `nats://${process.env.MQ_ADDRESS}:4222` - ] + `nats://${process.env.MQ_ADDRESS}:4222`, + ], }, }); app.useGlobalPipes(new ValidationPipe({ - errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY + errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY, })); + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); + app.use(express.static('public')); app.use(express.json({ limit: '2mb' })); AnalyticsUtils.DEBUG_LVL = parseInt(process.env.ANALYTICS_DEBUG_LVL || '3', 10); AnalyticsUtils.REQUEST_LIMIT = parseInt(process.env.ANALYTICS_REQUEST_LIMIT || '30', 10); - new Logger().setConnection(cn); const workersHelper = new Workers(); await workersHelper.setConnection(cn).init(); workersHelper.initListeners(); @@ -76,7 +80,7 @@ Promise.all([ const mask: string = process.env.ANALYTICS_SCHEDULER || '0 0 * * 1'; const job = new CronJob(mask, () => { - ReportService.run(ReportService.getRootTopic(), ReportService.getRestartDate()) + ReportService.run(ReportService.getRootTopic(), ReportService.getRestartDate()); }, null, false, 'UTC'); job.start(); @@ -86,7 +90,7 @@ Promise.all([ app.listen(PORT, async () => { const url = await app.getUrl(); console.log(`URL: ${url}`); - new Logger().info(`Started on ${PORT}`, ['ANALYTICS_SERVICE']); + logger.info(`Started on ${PORT}`, ['ANALYTICS_SERVICE']); }); } catch (error) { console.error(error.message); diff --git a/analytics-service/src/config.ts b/analytics-service/src/config.ts index 2fa9d83360..ab6542eed8 100644 --- a/analytics-service/src/config.ts +++ b/analytics-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false') { } } } -// console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/api-gateway/configs/.env.gateway b/api-gateway/configs/.env.gateway index 1012391d33..8ad5139c5d 100644 --- a/api-gateway/configs/.env.gateway +++ b/api-gateway/configs/.env.gateway @@ -1,6 +1,7 @@ # Gateway Service Specialized Variables SERVICE_CHANNEL="api-gateway" DIRECT_MESSAGE_PORT="6555" +DB_DATABASE="api-gateway" # Ecosystem Defined Variables HEDERA_NET="testnet" @@ -8,6 +9,7 @@ PREUSED_HEDERA_NET="testnet" ACCESS_TOKEN_SECRET="youraccesstokensecret" MQ_ADDRESS="localhost" MRV_ADDRESS="http://localhost:3003/mrv" +DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" #LOG_LEVEL="2" #MQ_MESSAGE_CHUNK=5000000 @@ -18,3 +20,19 @@ MQ_MAX_PAYLOAD="1048576" HOST_CACHE='localhost' PORT_CACHE='6379' ENABLE_CACHE='true' + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/api-gateway/configs/.env.gateway.develop b/api-gateway/configs/.env.gateway.develop index 390ce9a37a..9994ee800f 100644 --- a/api-gateway/configs/.env.gateway.develop +++ b/api-gateway/configs/.env.gateway.develop @@ -1,6 +1,7 @@ # Gateway Service Specialized Variables SERVICE_CHANNEL="api-gateway" #DIRECT_MESSAGE_PORT="6555" +DB_DATABASE="api-gateway" # Ecosystem Defined Variables HEDERA_NET="testnet" @@ -8,6 +9,7 @@ PREUSED_HEDERA_NET="testnet" ACCESS_TOKEN_SECRET="youraccesstokensecret" MQ_ADDRESS="localhost" MRV_ADDRESS="http://localhost:3003/mrv" +DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" #LOG_LEVEL="2" #MQ_MESSAGE_CHUNK=5000000 @@ -17,4 +19,20 @@ MQ_MAX_PAYLOAD="1048576" #CACHE HOST_CACHE='localhost' PORT_CACHE='6379' -ENABLE_CACHE='true' \ No newline at end of file +ENABLE_CACHE='true' + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/api-gateway/configs/.env.gateway.template b/api-gateway/configs/.env.gateway.template index cee9d4566f..e02b904872 100644 --- a/api-gateway/configs/.env.gateway.template +++ b/api-gateway/configs/.env.gateway.template @@ -1,6 +1,7 @@ # Gateway Service Specialized Variables SERVICE_CHANNEL="api-gateway" DIRECT_MESSAGE_PORT="6555" +DB_DATABASE="" # Ecosystem Defined Variables HEDERA_NET="" @@ -8,6 +9,7 @@ PREUSED_HEDERA_NET="" ACCESS_TOKEN_SECRET="youraccesstokensecret" MQ_ADDRESS="" MRV_ADDRESS="" +DB_HOST="" MQ_MAX_PAYLOAD="" #LOG_LEVEL="2" #MQ_MESSAGE_CHUNK=5000000 @@ -17,4 +19,20 @@ MQ_MAX_PAYLOAD="" #CACHE HOST_CACHE='' PORT_CACHE='' -ENABLE_CACHE='true' \ No newline at end of file +ENABLE_CACHE='true' + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/api-gateway/environments/environment.prod.ts b/api-gateway/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/api-gateway/environments/environment.prod.ts +++ b/api-gateway/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/api-gateway/package.json b/api-gateway/package.json index 3984587956..bf7f514eab 100644 --- a/api-gateway/package.json +++ b/api-gateway/package.json @@ -4,8 +4,8 @@ "@fastify/formbody": "^7.4.0", "@fastify/multipart": "^8.2.0", "@fastify/static": "^7.0.0", - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/jwt": "^10.0.3", @@ -88,5 +88,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/api-gateway/src/api/service/account.ts b/api-gateway/src/api/service/account.ts index 058baf798e..a0f677cb07 100644 --- a/api-gateway/src/api/service/account.ts +++ b/api-gateway/src/api/service/account.ts @@ -1,4 +1,4 @@ -import { IAuthUser, Logger, NotificationHelper } from '@guardian/common'; +import { IAuthUser, NotificationHelper, PinoLogger } from '@guardian/common'; import { Permissions, PolicyType, SchemaEntity, UserRole } from '@guardian/interfaces'; import { ClientProxy } from '@nestjs/microservices'; import { Body, Controller, Get, Headers, HttpCode, HttpException, HttpStatus, Inject, Post, Req } from '@nestjs/common'; @@ -6,10 +6,10 @@ import { ApiBearerAuth, ApiExtraModels, ApiInternalServerErrorResponse, ApiOkRes import { AccountsResponseDTO, AccountsSessionResponseDTO, AggregatedDTOItem, BalanceResponseDTO, InternalServerErrorDTO, LoginUserDTO, RegisterUserDTO } from '#middlewares'; import { Auth, AuthUser, checkPermission } from '#auth'; import { EntityOwner, Guardians, InternalException, PolicyEngine, UseCache, Users } from '#helpers'; -import { PolicyListResponse } from '../../entities/policy.js'; -import { StandardRegistryAccountResponse } from '../../entities/account.js'; +import { PolicyListResponse } from '../../entities/policy'; +import { StandardRegistryAccountResponse } from '../../entities/account'; import { ApplicationEnvironment } from '../../environment.js'; -import { CACHE } from '../../constants/index.js'; +import { CACHE } from '#constants'; /** * User account route @@ -18,7 +18,7 @@ import { CACHE } from '../../constants/index.js'; @ApiTags('accounts') export class AccountApi { - constructor(@Inject('GUARDIANS') public readonly client: ClientProxy) { + constructor(@Inject('GUARDIANS') public readonly client: ClientProxy, private readonly logger: PinoLogger) { } /** @@ -51,7 +51,7 @@ export class AccountApi { const token = authHeader?.split(' ')[1]; return await users.getUserByToken(token) as any; } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); return null; } } @@ -95,7 +95,7 @@ export class AccountApi { try { await checkPermission(UserRole.STANDARD_REGISTRY)(user); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } try { @@ -108,7 +108,7 @@ export class AccountApi { ); return user; } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error.message.includes('already exists')) { throw new HttpException(error.message, HttpStatus.CONFLICT); } @@ -141,7 +141,7 @@ export class AccountApi { const users = new Users(); return await users.generateNewToken(username, password) as any; } catch (error) { - new Logger().warn(error.message, ['API_GATEWAY']); + await this.logger.warn(error.message, ['API_GATEWAY']); throw new HttpException(error.message, HttpStatus.UNAUTHORIZED); } } @@ -204,7 +204,7 @@ export class AccountApi { try { return await (new Users()).getAllUserAccounts(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -237,7 +237,7 @@ export class AccountApi { try { return await (new Users()).getAllStandardRegistryAccounts(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -293,7 +293,7 @@ export class AccountApi { }, userDid: did }, - EntityOwner.sr(did) + EntityOwner.sr(null, did) ) as PolicyListResponse; return { did, @@ -305,7 +305,7 @@ export class AccountApi { }); return await Promise.all(promises); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -340,7 +340,7 @@ export class AccountApi { try { return await (new Guardians()).getBalance(user.username); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/ai-suggestions.ts b/api-gateway/src/api/service/ai-suggestions.ts index eb1732f0a5..3cde097612 100644 --- a/api-gateway/src/api/service/ai-suggestions.ts +++ b/api-gateway/src/api/service/ai-suggestions.ts @@ -3,6 +3,7 @@ import { Controller, Get, HttpCode, HttpStatus, Inject, Put, Query } from '@nest import { ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags, ApiExtraModels, ApiQuery } from '@nestjs/swagger'; import { AISuggestions, InternalException } from '#helpers'; import { InternalServerErrorDTO } from '#middlewares'; +import { PinoLogger } from '@guardian/common'; /** * AI suggestions route @@ -10,7 +11,7 @@ import { InternalServerErrorDTO } from '#middlewares'; @Controller('ai-suggestions') @ApiTags('ai-suggestions') export class AISuggestionsAPI { - constructor(@Inject('GUARDIANS') public readonly client: ClientProxy) { + constructor(@Inject('GUARDIANS') public readonly client: ClientProxy, private readonly logger: PinoLogger) { } /** @@ -47,7 +48,7 @@ export class AISuggestionsAPI { const aiSuggestions = new AISuggestions(); return await aiSuggestions.getAIAnswer(q); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -74,7 +75,7 @@ export class AISuggestionsAPI { const aiSuggestions = new AISuggestions(); return await aiSuggestions.rebuildAIVector(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/analytics.ts b/api-gateway/src/api/service/analytics.ts index f1ff3052fc..945858d653 100644 --- a/api-gateway/src/api/service/analytics.ts +++ b/api-gateway/src/api/service/analytics.ts @@ -3,7 +3,7 @@ import { ApiInternalServerErrorResponse, ApiBody, ApiOkResponse, ApiOperation, A import { EntityOwner, Permissions } from '@guardian/interfaces'; import { FilterDocumentsDTO, FilterModulesDTO, FilterPoliciesDTO, FilterSchemasDTO, FilterSearchPoliciesDTO, InternalServerErrorDTO, CompareDocumentsDTO, CompareModulesDTO, ComparePoliciesDTO, CompareSchemasDTO, SearchPoliciesDTO, FilterToolsDTO, CompareToolsDTO, FilterSearchBlocksDTO, SearchBlocksDTO, Examples } from '#middlewares'; import { AuthUser, Auth } from '#auth'; -import { IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Guardians, ONLY_SR, InternalException } from '#helpers'; function getPolicyId(filters: FilterPoliciesDTO): { @@ -69,6 +69,9 @@ function getSchemaId(filters: FilterSchemasDTO): { @Controller('analytics') @ApiTags('analytics') export class AnalyticsApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Search policies */ @@ -112,7 +115,7 @@ export class AnalyticsApi { const guardians = new Guardians(); return await guardians.searchPolicies(owner, filters); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -204,7 +207,7 @@ export class AnalyticsApi { filters.idLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -272,7 +275,7 @@ export class AnalyticsApi { idLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -323,7 +326,7 @@ export class AnalyticsApi { const guardians = new Guardians(); return await guardians.compareSchemas(owner, null, schemas, idLvl); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -404,7 +407,7 @@ export class AnalyticsApi { refLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -481,7 +484,7 @@ export class AnalyticsApi { idLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -581,7 +584,7 @@ export class AnalyticsApi { filters.idLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -657,7 +660,7 @@ export class AnalyticsApi { idLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -716,7 +719,7 @@ export class AnalyticsApi { const guardians = new Guardians(); return await guardians.compareSchemas(owner, type, schemas, idLvl); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -804,7 +807,7 @@ export class AnalyticsApi { refLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -888,7 +891,7 @@ export class AnalyticsApi { idLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -941,7 +944,7 @@ export class AnalyticsApi { try { return await guardians.searchBlocks(config, id, user); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/artifact.ts b/api-gateway/src/api/service/artifact.ts index ac2561f414..7d7fe7fca9 100644 --- a/api-gateway/src/api/service/artifact.ts +++ b/api-gateway/src/api/service/artifact.ts @@ -2,7 +2,7 @@ import { Permissions } from '@guardian/interfaces'; import { Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Post, Query, Param, Response, UseInterceptors, Version, Req } from '@nestjs/common'; import { ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags, ApiBody, ApiConsumes, ApiQuery, ApiParam } from '@nestjs/swagger'; import { AuthUser, Auth } from '#auth'; -import { IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Guardians, InternalException, AnyFilesInterceptor, UploadedFiles, EntityOwner, CacheService, UseCache, getCacheKey } from '#helpers'; import { pageHeader, Examples, InternalServerErrorDTO, ArtifactDTOItem } from '#middlewares'; import { ARTIFACT_REQUIRED_PROPS, PREFIXES } from '#constants' @@ -11,7 +11,7 @@ import { ARTIFACT_REQUIRED_PROPS, PREFIXES } from '#constants' @ApiTags('artifacts') export class ArtifactApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } /** * Get artifacts @@ -118,7 +118,7 @@ export class ArtifactApi { return res.header('X-Total-Count', count).send(artifacts); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -227,7 +227,7 @@ export class ArtifactApi { return res.header('X-Total-Count', count).send(artifacts); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -303,7 +303,7 @@ export class ArtifactApi { return uploadedArtifacts; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -348,7 +348,7 @@ export class ArtifactApi { return await guardian.deleteArtifact(artifactId, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/branding.ts b/api-gateway/src/api/service/branding.ts index 2b3875a56d..cfa5c8b8a4 100644 --- a/api-gateway/src/api/service/branding.ts +++ b/api-gateway/src/api/service/branding.ts @@ -4,6 +4,7 @@ import { Auth } from '#auth'; import { Permissions } from '@guardian/interfaces'; import { BrandingDTO, InternalServerErrorDTO } from '#middlewares'; import { ONLY_SR, Guardians, UseCache, InternalException, getCacheKey, CacheService } from '#helpers'; +import { PinoLogger } from '@guardian/common'; /** * Branding route @@ -11,7 +12,7 @@ import { ONLY_SR, Guardians, UseCache, InternalException, getCacheKey, CacheServ @Controller('branding') @ApiTags('branding') export class BrandingApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } /** @@ -71,7 +72,7 @@ export class BrandingApi { await this.cacheService.invalidate(getCacheKey([req.url], req.user)) } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -96,7 +97,7 @@ export class BrandingApi { const brandingDataString = await guardians.getBranding(); return JSON.parse(brandingDataString.config); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/contract.ts b/api-gateway/src/api/service/contract.ts index b251b0274c..43aa6ef3a4 100644 --- a/api-gateway/src/api/service/contract.ts +++ b/api-gateway/src/api/service/contract.ts @@ -1,5 +1,5 @@ import { ContractType, Permissions } from '@guardian/interfaces'; -import { IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query, Req, Response } from '@nestjs/common'; import { ApiInternalServerErrorResponse, ApiOkResponse, ApiCreatedResponse, ApiOperation, ApiExtraModels, ApiTags, ApiBody, ApiQuery, ApiParam, } from '@nestjs/swagger'; import { ContractConfigDTO, ContractDTO, RetirePoolDTO, RetirePoolTokenDTO, RetireRequestDTO, RetireRequestTokenDTO, WiperRequestDTO, InternalServerErrorDTO, pageHeader } from '#middlewares'; @@ -12,7 +12,7 @@ import { Guardians, UseCache, InternalException, EntityOwner, CacheService, getC @Controller('contracts') @ApiTags('contracts') export class ContractsApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } //#region Common contract endpoints @@ -80,7 +80,7 @@ export class ContractsApi { ); return res.header('X-Total-Count', count).send(contracts); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -123,7 +123,7 @@ export class ContractsApi { return await guardians.createContract(owner, description, type); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -175,7 +175,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.importContract(owner, contractId, description); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -218,7 +218,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.checkContractPermissions(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -260,7 +260,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.removeContract(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } //#endregion @@ -328,7 +328,7 @@ export class ContractsApi { ); return res.header('X-Total-Count', count).send(contracts); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -370,7 +370,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.enableWipeRequests(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -412,7 +412,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.disableWipeRequests(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -454,7 +454,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.approveWipeRequest(owner, requestId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -508,7 +508,7 @@ export class ContractsApi { String(ban).toLowerCase() === 'true' ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -550,7 +550,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.clearWipeRequests(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -600,7 +600,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.addWipeAdmin(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -650,7 +650,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.removeWipeAdmin(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -700,7 +700,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.addWipeManager(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -750,7 +750,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.removeWipeManager(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -800,7 +800,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.addWipeWiper(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -850,7 +850,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.removeWipeWiper(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -895,7 +895,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.syncRetirePools(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -962,7 +962,7 @@ export class ContractsApi { ); return res.header('X-Total-Count', count).send(contracts); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1037,7 +1037,7 @@ export class ContractsApi { ); return res.header('X-Total-Count', count).send(contracts); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1079,7 +1079,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.clearRetireRequests(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1121,7 +1121,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.clearRetirePools(owner, contractId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1167,7 +1167,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.setRetirePool(owner, contractId, body); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1209,7 +1209,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.unsetRetirePool(owner, poolId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1251,7 +1251,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.unsetRetireRequest(owner, requestId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1298,7 +1298,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.retire(owner, poolId, body); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1340,7 +1340,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.approveRetire(owner, requestId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1383,7 +1383,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.cancelRetire(owner, requestId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1433,7 +1433,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.addRetireAdmin(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1483,7 +1483,7 @@ export class ContractsApi { const guardians = new Guardians(); return await guardians.removeRetireAdmin(owner, contractId, hederaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1543,7 +1543,7 @@ export class ContractsApi { const [vcs, count] = await guardians.getRetireVCs(owner, pageIndex, pageSize); return res.header('X-Total-Count', count).send(vcs); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } //#endregion diff --git a/api-gateway/src/api/service/demo.ts b/api-gateway/src/api/service/demo.ts index ca51fe805e..88f1d515e5 100644 --- a/api-gateway/src/api/service/demo.ts +++ b/api-gateway/src/api/service/demo.ts @@ -1,4 +1,4 @@ -import { Logger, RunFunctionAsync } from '@guardian/common'; +import { PinoLogger, RunFunctionAsync } from '@guardian/common'; import { Controller, Get, HttpCode, HttpStatus } from '@nestjs/common'; import { ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { Permissions, TaskAction } from '@guardian/interfaces'; @@ -9,6 +9,9 @@ import { Guardians, InternalException, NewTask, ServiceError, TaskManager, Users @Controller('demo') @ApiTags('demo') export class DemoApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Returns list of registered users */ @@ -44,7 +47,7 @@ export class DemoApi { return demoUsers } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -80,7 +83,7 @@ export class DemoApi { return await guardians.generateDemoKey(role, user.id.toString()); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } // try { // const guardians = new Guardians(); @@ -137,7 +140,7 @@ export class DemoApi { const guardians = new Guardians(); await guardians.generateDemoKeyAsync(user?.role, task, user.id.toString()); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; diff --git a/api-gateway/src/api/service/external.ts b/api-gateway/src/api/service/external.ts index d3484d8c13..45488cf52e 100644 --- a/api-gateway/src/api/service/external.ts +++ b/api-gateway/src/api/service/external.ts @@ -2,10 +2,14 @@ import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common'; import { ApiExtraModels, ApiBody, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { InternalServerErrorDTO, ExternalDocumentDTO } from '#middlewares'; import { PolicyEngine, InternalException } from '#helpers'; +import { PinoLogger } from '@guardian/common'; @Controller('external') @ApiTags('external') export class ExternalApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Sends data from an external source */ @@ -35,7 +39,7 @@ export class ExternalApi { const engineService = new PolicyEngine(); return await engineService.receiveExternalData(document); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/ipfs.ts b/api-gateway/src/api/service/ipfs.ts index 63cf928998..9f49c1cf7f 100644 --- a/api-gateway/src/api/service/ipfs.ts +++ b/api-gateway/src/api/service/ipfs.ts @@ -4,10 +4,14 @@ import { Permissions } from '@guardian/interfaces'; import { Auth } from '#auth'; import { Examples, InternalServerErrorDTO } from '#middlewares'; import { Guardians, InternalException } from '#helpers'; +import { PinoLogger } from '@guardian/common'; @Controller('ipfs') @ApiTags('ipfs') export class IpfsApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Add file from ipfs */ @@ -52,7 +56,7 @@ export class IpfsApi { return JSON.stringify(cid); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -105,7 +109,7 @@ export class IpfsApi { return JSON.stringify(cid); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -154,7 +158,7 @@ export class IpfsApi { } return new StreamableFile(Buffer.from(result)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -203,7 +207,7 @@ export class IpfsApi { } return new StreamableFile(Buffer.from(result)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/logger.ts b/api-gateway/src/api/service/logger.ts index 515f97d4cf..e71a18a505 100644 --- a/api-gateway/src/api/service/logger.ts +++ b/api-gateway/src/api/service/logger.ts @@ -6,6 +6,8 @@ import { Auth } from '#auth'; import { InternalServerErrorDTO, LogFilterDTO, LogResultDTO } from '#middlewares'; import { UseCache, InternalException } from '#helpers'; import axios from 'axios'; +import { PinoLogger } from '@guardian/common'; +import process from 'process'; @Injectable() export class LoggerService { @@ -30,7 +32,7 @@ export class LoggerService { @Controller('logs') @ApiTags('logs') export class LoggerApi { - constructor(private readonly loggerService: LoggerService) { + constructor(private readonly loggerService: LoggerService, private readonly logger: PinoLogger) { } /** @@ -103,7 +105,7 @@ export class LoggerApi { logs: logs.data }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -159,9 +161,44 @@ export class LoggerApi { } return await this.loggerService.getAttributes(escapeRegExp(name), attributes); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + + @Get('/seq') + @Auth( + Permissions.LOG_LOG_READ, + ) + @ApiOperation({ + summary: 'Return url on seq store.', + description: 'Return url on seq store. Only users with the Standard Registry role are allowed to make the request.', + }) + @ApiOkResponse({ + description: 'Successful operation.', + schema: { + type: 'object', + properties: { + seq_url: { + type: 'string', + example: 'http://localhost:5341', + }, + }, + }, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @HttpCode(HttpStatus.OK) + async getSeqUrl(): Promise<{ seq_url: string | null }> { + const isSeqTransport = process.env.TRANSPORTS.includes('SEQ'); + + if (isSeqTransport && process.env.SEQ_UI_URL) { + return { seq_url: process.env.SEQ_UI_URL }; + } + + return { seq_url: null }; + } } /** diff --git a/api-gateway/src/api/service/map.ts b/api-gateway/src/api/service/map.ts index 47fd5bb765..f1cdb95df1 100644 --- a/api-gateway/src/api/service/map.ts +++ b/api-gateway/src/api/service/map.ts @@ -3,6 +3,7 @@ import { ApiExtraModels, ApiTags, ApiOperation, ApiOkResponse, ApiInternalServer import { CACHE } from '../../constants/index.js'; import { UseCache, Guardians } from '#helpers'; import { InternalServerErrorDTO } from '#middlewares'; +import { Auth } from '#auth'; @Controller('map') @ApiTags('map') @@ -11,9 +12,10 @@ export class MapApi { * Get map key */ @Get('/key') + @Auth() @ApiOperation({ - summary: 'Return map key.', - description: 'Return map key.', + summary: 'Get map API key.', + description: 'Return map API key.', }) @ApiOkResponse({ description: 'Successful operation.', @@ -35,9 +37,10 @@ export class MapApi { * Get map sh */ @Get('/sh') + @Auth() @ApiOperation({ - summary: 'Return map key.', - description: 'Return map key.', + summary: 'Get sentinel API key.', + description: 'Return sentinel API key.', }) @ApiOkResponse({ description: 'Successful operation.', diff --git a/api-gateway/src/api/service/module.ts b/api-gateway/src/api/service/module.ts index 6e40e8b233..22e5044626 100644 --- a/api-gateway/src/api/service/module.ts +++ b/api-gateway/src/api/service/module.ts @@ -1,4 +1,4 @@ -import { Logger, IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Req, Response, Version } from '@nestjs/common'; import { Permissions, SchemaCategory, SchemaHelper } from '@guardian/interfaces'; import { ApiParam, ApiCreatedResponse, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags, ApiBody, ApiExtraModels, ApiQuery } from '@nestjs/swagger'; @@ -12,7 +12,7 @@ const ONLY_SR = ' Only users with the Standard Registry role are allowed to make @Controller('modules') @ApiTags('modules') export class ModulesApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } /** @@ -54,7 +54,7 @@ export class ModulesApi { return await guardian.createModule(module, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -111,7 +111,7 @@ export class ModulesApi { const { items, count } = await guardians.getModule(options, new EntityOwner(user)); return res.header('X-Total-Count', count).send(items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -171,7 +171,7 @@ export class ModulesApi { const { items, count } = await guardians.getModuleV2(options, new EntityOwner(user)); return res.header('X-Total-Count', count).send(items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -245,7 +245,7 @@ export class ModulesApi { .header('X-Total-Count', count) .send(SchemaUtils.toOld(items)); } catch (error) { - await (new Logger()).error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); throw new HttpException(error.message, HttpStatus.INTERNAL_SERVER_ERROR); } } @@ -298,7 +298,7 @@ export class ModulesApi { return SchemaUtils.toOld(schemas); } catch (error) { - await (new Logger()).error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); throw new HttpException(error.message, HttpStatus.INTERNAL_SERVER_ERROR); } @@ -344,7 +344,7 @@ export class ModulesApi { } return await guardian.deleteModule(uuid, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -381,7 +381,7 @@ export class ModulesApi { const guardians = new Guardians(); return await guardians.getMenuModule(new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -426,7 +426,7 @@ export class ModulesApi { const guardian = new Guardians(); return await guardian.getModuleById(uuid, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -487,7 +487,7 @@ export class ModulesApi { return await guardian.updateModule(uuid, module, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -531,7 +531,7 @@ export class ModulesApi { res.header('Content-type', 'application/zip'); return res.send(file); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -572,7 +572,7 @@ export class ModulesApi { const guardian = new Guardians(); return await guardian.exportModuleMessage(uuid, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -615,7 +615,7 @@ export class ModulesApi { return await guardian.importModuleMessage(messageId, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -652,7 +652,7 @@ export class ModulesApi { try { return await guardian.importModuleFile(body, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -694,7 +694,7 @@ export class ModulesApi { const guardian = new Guardians(); return await guardian.previewModuleMessage(messageId, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -731,7 +731,7 @@ export class ModulesApi { const guardian = new Guardians(); return await guardian.previewModuleFile(body, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -786,7 +786,7 @@ export class ModulesApi { return await guardian.publishModule(uuid, new EntityOwner(user), module); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -824,7 +824,7 @@ export class ModulesApi { const guardian = new Guardians(); return await guardian.validateModule(new EntityOwner(user), module); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/notifications.ts b/api-gateway/src/api/service/notifications.ts index 9e3983a12b..21ddd31595 100644 --- a/api-gateway/src/api/service/notifications.ts +++ b/api-gateway/src/api/service/notifications.ts @@ -1,4 +1,4 @@ -import { IAuthUser, NotificationService } from '@guardian/common'; +import { IAuthUser, NotificationService, PinoLogger } from '@guardian/common'; import { Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query, Response, } from '@nestjs/common'; import { ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiParam, ApiQuery, ApiTags } from '@nestjs/swagger'; import { Examples, InternalServerErrorDTO, NotificationDTO, ProgressDTO, pageHeader } from '#middlewares'; @@ -8,7 +8,7 @@ import { InternalException, parseInteger } from '#helpers'; @Controller('notifications') @ApiTags('notifications') export class NotificationsApi { - constructor(private readonly notifier: NotificationService) { } + constructor(private readonly notifier: NotificationService, private readonly logger: PinoLogger) { } /** * Get all notifications @@ -59,7 +59,7 @@ export class NotificationsApi { ); return res.header('X-Total-Count', count).send(notifications); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -92,7 +92,7 @@ export class NotificationsApi { } return await this.notifier.getNewNotifications(user.id); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -125,7 +125,7 @@ export class NotificationsApi { } return await this.notifier.getProgresses(user.id); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -158,7 +158,7 @@ export class NotificationsApi { } return await this.notifier.readAll(user.id); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -195,7 +195,7 @@ export class NotificationsApi { try { return await this.notifier.deleteUpTo(user.id, notificationId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/permissions.ts b/api-gateway/src/api/service/permissions.ts index ae80525cc7..c07205f7c7 100644 --- a/api-gateway/src/api/service/permissions.ts +++ b/api-gateway/src/api/service/permissions.ts @@ -1,5 +1,5 @@ -import { IAuthUser } from '@guardian/common'; -import { AssignedEntityType, Permissions, UserPermissions } from '@guardian/interfaces'; +import { IAuthUser, PinoLogger } from '@guardian/common'; +import { AssignedEntityType, Permissions, PolicyType, UserPermissions } from '@guardian/interfaces'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Response } from '@nestjs/common'; import { ApiTags, ApiInternalServerErrorResponse, ApiExtraModels, ApiOperation, ApiBody, ApiOkResponse, ApiParam, ApiQuery } from '@nestjs/swagger'; import { AssignPolicyDTO, Examples, InternalServerErrorDTO, PermissionsDTO, PolicyDTO, RoleDTO, UserDTO, pageHeader } from '#middlewares'; @@ -10,6 +10,9 @@ import { WebSocketsService } from './websockets.js'; @Controller('permissions') @ApiTags('permissions') export class PermissionsApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Return a list of all permissions */ @@ -37,7 +40,7 @@ export class PermissionsApi { try { return await (new Users()).getPermissions(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -106,7 +109,7 @@ export class PermissionsApi { const { items, count } = await (new Users()).getRoles(options); return res.header('X-Total-Count', count).send(items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -146,7 +149,7 @@ export class PermissionsApi { await (new Guardians()).createRole(role, owner); return role; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -193,7 +196,7 @@ export class PermissionsApi { try { row = await userService.getRoleById(id); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!row) { throw new HttpException('Role does not exist.', HttpStatus.NOT_FOUND) @@ -203,11 +206,11 @@ export class PermissionsApi { const result = await userService.updateRole(id, role, owner); const users = await userService.refreshUserPermissions(id, user.did); await (new Guardians()).updateRole(result, owner); - const wsService = new WebSocketsService(); + const wsService = new WebSocketsService(this.logger); wsService.updatePermissions(users); return result; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -252,11 +255,11 @@ export class PermissionsApi { const result = await userService.deleteRole(id, owner); const users = await userService.refreshUserPermissions(id, user.did); await (new Guardians()).deleteRole(result, owner); - const wsService = new WebSocketsService(); + const wsService = new WebSocketsService(this.logger); wsService.updatePermissions(users); return result; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -310,7 +313,7 @@ export class PermissionsApi { try { return await (new Users()).setDefaultRole(body?.id, user.did); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -402,7 +405,7 @@ export class PermissionsApi { } return res.header('X-Total-Count', count).send(items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -449,7 +452,7 @@ export class PermissionsApi { } return row as any; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -502,7 +505,7 @@ export class PermissionsApi { try { row = await users.getUserPermissions(username); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!row || row.parent !== user.did || row.did === user.did) { throw new HttpException('User does not exist.', HttpStatus.NOT_FOUND) @@ -511,11 +514,11 @@ export class PermissionsApi { const owner = new EntityOwner(user); const result = await users.updateUserRole(username, body, owner); await (new Guardians()).setRole(result, owner); - const wsService = new WebSocketsService(); + const wsService = new WebSocketsService(this.logger); wsService.updatePermissions(result); return result; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -555,7 +558,7 @@ export class PermissionsApi { @ApiQuery({ name: 'status', type: String, - enum: ['ALL', 'DRAFT', 'DRY-RUN', 'PUBLISH_ERROR', 'DISCONTINUED', 'PUBLISH'], + enum: PolicyType, description: 'Filter by status', required: false, example: 'Active' @@ -585,7 +588,7 @@ export class PermissionsApi { try { target = await (new Users()).getUserPermissions(username); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!target || target.parent !== owner) { throw new HttpException('User does not exist.', HttpStatus.NOT_FOUND) @@ -603,7 +606,7 @@ export class PermissionsApi { const { policies, count } = await (new Guardians()).getAssignedPolicies(options); return res.header('X-Total-Count', count).send(policies); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -650,7 +653,7 @@ export class PermissionsApi { try { row = await users.getUserPermissions(username); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!row || row.parent !== user.did || row.did === user.did) { throw new HttpException('User does not exist.', HttpStatus.NOT_FOUND) @@ -665,7 +668,7 @@ export class PermissionsApi { user.did ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -715,7 +718,7 @@ export class PermissionsApi { try { row = await users.getUserPermissions(username); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!row || row.parent !== user.parent || row.did === user.did) { throw new HttpException('User does not exist.', HttpStatus.NOT_FOUND) @@ -724,11 +727,11 @@ export class PermissionsApi { const owner = new EntityOwner(user); const result = await users.delegateUserRole(username, body, owner); await (new Guardians()).setRole(result, owner); - const wsService = new WebSocketsService(); + const wsService = new WebSocketsService(this.logger); wsService.updatePermissions(result); return result; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -775,7 +778,7 @@ export class PermissionsApi { try { row = await users.getUserPermissions(username); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!row || row.parent !== user.parent || row.did === user.did) { throw new HttpException('User does not exist.', HttpStatus.NOT_FOUND) @@ -790,7 +793,7 @@ export class PermissionsApi { user.did ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } \ No newline at end of file diff --git a/api-gateway/src/api/service/policy.ts b/api-gateway/src/api/service/policy.ts index de4a0338f2..3404113078 100644 --- a/api-gateway/src/api/service/policy.ts +++ b/api-gateway/src/api/service/policy.ts @@ -1,11 +1,11 @@ import { Auth, AuthUser } from '#auth'; -import { IAuthUser, Logger, RunFunctionAsync } from '@guardian/common'; -import { DocumentType, Permissions, PolicyType, TaskAction, UserRole } from '@guardian/interfaces'; +import { IAuthUser, PinoLogger, RunFunctionAsync } from '@guardian/common'; +import { DocumentType, Permissions, PolicyHelper, TaskAction, UserRole } from '@guardian/interfaces'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Req, Response, UseInterceptors, Version } from '@nestjs/common'; import { ApiAcceptedResponse, ApiBody, ApiConsumes, ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiParam, ApiQuery, ApiTags } from '@nestjs/swagger'; -import { CACHE, POLICY_REQUIRED_PROPS, PREFIXES } from '#constants'; -import { BlockDTO, Examples, ExportMessageDTO, ImportMessageDTO, InternalServerErrorDTO, MigrationConfigDTO, pageHeader, PoliciesValidationDTO, PolicyCategoryDTO, PolicyDTO, PolicyPreviewDTO, PolicyValidationDTO, TaskDTO } from '#middlewares'; +import { BlockDTO, Examples, ExportMessageDTO, ImportMessageDTO, InternalServerErrorDTO, MigrationConfigDTO, pageHeader, PoliciesValidationDTO, PolicyCategoryDTO, PolicyDTO, PolicyPreviewDTO, PolicyTestDTO, PolicyValidationDTO, RunningDetailsDTO, TaskDTO } from '#middlewares'; import { AnyFilesInterceptor, CacheService, EntityOwner, getCacheKey, InternalException, ONLY_SR, PolicyEngine, ProjectService, ServiceError, TaskManager, UploadedFiles, UseCache } from '#helpers'; +import { CACHE, POLICY_REQUIRED_PROPS, PREFIXES } from '#constants'; async function getOldResult(user: IAuthUser): Promise { const options: any = {}; @@ -17,9 +17,11 @@ async function getOldResult(user: IAuthUser): Promise { @Controller('policies') @ApiTags('policies') export class PolicyApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } + //#region Common + /** * Return a list of all policies */ @@ -82,7 +84,7 @@ export class PolicyApi { const { policies, count } = await engineService.getPolicies(options, owner); return res.header('X-Total-Count', count).send(policies); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -150,7 +152,7 @@ export class PolicyApi { const { policies, count } = await engineService.getPoliciesV2(options, owner); return res.header('X-Total-Count', count).send(policies); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -190,7 +192,7 @@ export class PolicyApi { await engineService.createPolicy(body, new EntityOwner(user)); return await getOldResult(user); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -241,7 +243,7 @@ export class PolicyApi { try { return await engineService.migrateData(new EntityOwner(user), body as any); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -281,7 +283,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); await engineService.migrateDataAsync(new EntityOwner(user), body as any, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: 'Unknown error: ' + error.message }); }); return task; @@ -323,7 +325,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); await engineService.createPolicyAsync(body, new EntityOwner(user), task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -373,7 +375,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); await engineService.clonePolicyAsync(policyId, body, new EntityOwner(user), task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -418,7 +420,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); await engineService.deletePolicyAsync(policyId, new EntityOwner(user), task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -468,7 +470,7 @@ export class PolicyApi { userDid: user.did, }, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -531,10 +533,14 @@ export class PolicyApi { model.projectSchema = policy.projectSchema; return await engineService.savePolicy(model, new EntityOwner(user), policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + //#endregion + + //#region Status + /** * Publish policy */ @@ -575,7 +581,7 @@ export class PolicyApi { result.policies = await getOldResult(user); return result; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -623,7 +629,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); await engineService.publishPolicyAsync(body, new EntityOwner(user), policyId, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message || error }); }); return task; @@ -668,7 +674,7 @@ export class PolicyApi { result.policies = await getOldResult(user); return result; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -723,7 +729,7 @@ export class PolicyApi { await engineService.discontinuePolicy(policyId, new EntityOwner(user), body?.date); return await getOldResult(user); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -766,7 +772,7 @@ export class PolicyApi { await engineService.draft(policyId, new EntityOwner(user)); return await getOldResult(user); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -805,10 +811,14 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.validatePolicy(body, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + //#endregion + + //#region Other + /** * Policy navigation */ @@ -850,7 +860,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.getNavigation(user, policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -895,7 +905,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.getGroups(user, policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -985,10 +995,14 @@ export class PolicyApi { ); return res.header('X-Total-Count', count).send(documents); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + //#endregion + + //#region Data + /** * Get policy data */ @@ -1039,7 +1053,7 @@ export class PolicyApi { res.header('Content-Type', 'application/policy-data'); return res.send(downloadResult); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1082,50 +1096,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.uploadPolicyData(new EntityOwner(user), body); } catch (error) { - await InternalException(error); - } - } - - /** - * Get policy tag map - */ - @Get('/:policyId/tag-block-map') - @Auth( - Permissions.POLICIES_MIGRATION_CREATE, - // UserRole.STANDARD_REGISTRY, - ) - @ApiOperation({ - summary: 'Get policy tag block map.', - description: 'Get policy tag block map.' + ONLY_SR, - }) - @ApiParam({ - name: 'policyId', - type: String, - description: 'Policy Id', - required: true, - example: Examples.DB_ID - }) - @ApiOkResponse({ - description: 'Policy tag block map.', - schema: { - type: 'object' - } - }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO, - }) - @ApiExtraModels(InternalServerErrorDTO) - @HttpCode(HttpStatus.OK) - async getTagBlockMap( - @AuthUser() user: IAuthUser, - @Param('policyId') policyId: string, - ): Promise { - try { - const engineService = new PolicyEngine(); - return await engineService.getTagBlockMap(policyId, new EntityOwner(user)); - } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1178,7 +1149,7 @@ export class PolicyApi { res.header('Content-Type', 'application/virtual-keys'); return res.send(downloadResult); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1226,7 +1197,54 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.uploadVirtualKeys(new EntityOwner(user), body, policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); + } + } + + //#endregion + + //#region Blocks + + /** + * Get policy tag map + */ + @Get('/:policyId/tag-block-map') + @Auth( + Permissions.POLICIES_MIGRATION_CREATE, + // UserRole.STANDARD_REGISTRY, + ) + @ApiOperation({ + summary: 'Get policy tag block map.', + description: 'Get policy tag block map.' + ONLY_SR, + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Policy tag block map.', + schema: { + type: 'object' + } + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async getTagBlockMap( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + ): Promise { + try { + const engineService = new PolicyEngine(); + return await engineService.getTagBlockMap(policyId, new EntityOwner(user)); + } catch (error) { + await InternalException(error, this.logger); } } @@ -1273,7 +1291,7 @@ export class PolicyApi { try { return await engineService.selectGroup(user, policyId, body?.uuid); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1315,7 +1333,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.getPolicyBlocks(user, policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1359,13 +1377,14 @@ export class PolicyApi { async getBlockData( @AuthUser() user: IAuthUser, @Param('policyId') policyId: string, - @Param('uuid') uuid: string + @Param('uuid') uuid: string, + @Query() query: any ): Promise { try { const engineService = new PolicyEngine(); - return await engineService.getBlockData(user, policyId, uuid); + return await engineService.getBlockData(user, policyId, uuid, query); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1420,7 +1439,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.setBlockData(user, policyId, uuid, body); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1475,7 +1494,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.setBlockDataByTag(user, policyId, tagName, body); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1519,13 +1538,13 @@ export class PolicyApi { async getBlockByTagName( @AuthUser() user: IAuthUser, @Param('policyId') policyId: string, - @Param('tagName') tagName: string + @Param('tagName') tagName: string, ): Promise { try { const engineService = new PolicyEngine(); return await engineService.getBlockByTagName(user, policyId, tagName); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1570,12 +1589,13 @@ export class PolicyApi { @AuthUser() user: IAuthUser, @Param('policyId') policyId: string, @Param('tagName') tagName: string, + @Query() query: any ): Promise { try { const engineService = new PolicyEngine(); - return await engineService.getBlockDataByTag(user, policyId, tagName); + return await engineService.getBlockDataByTag(user, policyId, tagName, query); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1626,10 +1646,47 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.getBlockParents(user, policyId, uuid); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); + } + } + + /** + * About + */ + @Get('/blocks/about') + @Auth( + Permissions.POLICIES_POLICY_UPDATE, + Permissions.MODULES_MODULE_UPDATE, + Permissions.TOOLS_TOOL_UPDATE + // UserRole.STANDARD_REGISTRY, + ) + @ApiOperation({ + summary: 'Returns block descriptions.', + description: 'Returns block descriptions.' + ONLY_SR, + }) + @ApiOkResponse({ + description: 'Block descriptions.', + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(InternalServerErrorDTO) + @UseCache({ ttl: CACHE.LONG_TTL }) + @HttpCode(HttpStatus.OK) + async getBlockAbout() { + try { + const engineService = new PolicyEngine(); + return await engineService.blockAbout(); + } catch (error) { + await InternalException(error, this.logger); } } + //#endregion + + //#region Export + /** * Export policy in a zip file. */ @@ -1676,7 +1733,7 @@ export class PolicyApi { res.header('Content-type', 'application/zip'); return res.send(policyFile); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1717,7 +1774,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.exportMessage(policyId, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1767,10 +1824,14 @@ export class PolicyApi { res.header('Content-type', 'application/zip'); return res.send(policyFile); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + //#endregion + + //#region Import + /** * Imports policy */ @@ -1790,6 +1851,13 @@ export class PolicyApi { required: false, example: '0.0.00000001' }) + @ApiQuery({ + name: 'demo', + type: Boolean, + description: 'Import policy in demo mode.', + required: false, + example: true + }) @ApiBody({ description: 'Message.', type: ImportMessageDTO, @@ -1808,7 +1876,8 @@ export class PolicyApi { async importPolicyFromMessage( @AuthUser() user: IAuthUser, @Body() body: ImportMessageDTO, - @Query('versionOfTopicId') versionOfTopicId?: string + @Query('versionOfTopicId') versionOfTopicId?: string, + @Query('demo') demo?: boolean ): Promise { const messageId = body?.messageId; if (!messageId) { @@ -1821,11 +1890,11 @@ export class PolicyApi { new EntityOwner(user), versionOfTopicId, body.metadata, - user.id.toString() + demo ); return await getOldResult(user); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1848,6 +1917,13 @@ export class PolicyApi { required: false, example: '0.0.00000001' }) + @ApiQuery({ + name: 'demo', + type: Boolean, + description: 'Import policy in demo mode.', + required: false, + example: true + }) @ApiBody({ description: 'Message.', type: ImportMessageDTO, @@ -1865,7 +1941,8 @@ export class PolicyApi { async importPolicyFromMessageAsync( @AuthUser() user: IAuthUser, @Body() body: ImportMessageDTO, - @Query('versionOfTopicId') versionOfTopicId?: string + @Query('versionOfTopicId') versionOfTopicId?: string, + @Query('demo') demo?: boolean ): Promise { const messageId = body?.messageId; if (!messageId) { @@ -1879,14 +1956,14 @@ export class PolicyApi { await engineService.importMessageAsync( messageId, new EntityOwner(user), - versionOfTopicId, task, + versionOfTopicId, body.metadata, - user.id.toString() + demo ); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: 'Unknown error: ' + error.message, @@ -1934,7 +2011,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.importMessagePreview(messageId, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1978,7 +2055,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); await engineService.importMessagePreviewAsync(messageId, new EntityOwner(user), task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: 'Unknown error: ' + error.message }); }); return task; @@ -2003,6 +2080,13 @@ export class PolicyApi { required: false, example: '0.0.00000001' }) + @ApiQuery({ + name: 'demo', + type: Boolean, + description: 'Import policy in demo mode.', + required: false, + example: true + }) @ApiBody({ description: 'A zip file containing policy config.', required: true, @@ -2024,18 +2108,18 @@ export class PolicyApi { @Body() file: any, @Req() req, @Query('versionOfTopicId') versionOfTopicId?: string, + @Query('demo') demo?: boolean ): Promise { try { const engineService = new PolicyEngine(); - - await engineService.importFile(file, new EntityOwner(user), versionOfTopicId); + await engineService.importFile(file, new EntityOwner(user), versionOfTopicId, null, demo); const invalidedCacheTags = [PREFIXES.ARTIFACTS]; await this.cacheService.invalidate(getCacheKey([req.url, ...invalidedCacheTags], req.user)); return await getOldResult(user); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2058,6 +2142,13 @@ export class PolicyApi { required: false, example: '0.0.00000001' }) + @ApiQuery({ + name: 'demo', + type: Boolean, + description: 'Import policy in demo mode.', + required: false, + example: true + }) @ApiConsumes('multipart/form-data') @ApiBody({ description: 'Form data with policy file and metadata.', @@ -2090,29 +2181,28 @@ export class PolicyApi { @HttpCode(HttpStatus.CREATED) async importPolicyFromFileWithMetadata( @AuthUser() user: IAuthUser, - @UploadedFiles() files: any, - @Query('versionOfTopicId') versionOfTopicId?: string + @UploadedFiles() files: any[], + @Query('versionOfTopicId') versionOfTopicId?: string, + @Query('demo') demo?: boolean ): Promise { try { - const policyFile = files.find( - (item) => item.fieldname === 'policyFile' - ); + const policyFile = files.find((item) => item.fieldname === 'policyFile'); + const metadataFile = files.find((item) => item.fieldname === 'metadata'); if (!policyFile) { throw new Error('There is no policy file'); } - const metadata = files.find( - (item) => item.fieldname === 'metadata' - ); + const metadata = metadataFile?.buffer && JSON.parse(metadataFile.buffer.toString()); const engineService = new PolicyEngine(); await engineService.importFile( policyFile.buffer, new EntityOwner(user), versionOfTopicId, - metadata?.buffer && JSON.parse(metadata.buffer.toString()) + metadata, + demo ); return await getOldResult(user) } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2135,6 +2225,13 @@ export class PolicyApi { required: false, example: '0.0.00000001' }) + @ApiQuery({ + name: 'demo', + type: Boolean, + description: 'Import policy in demo mode.', + required: false, + example: true + }) @ApiBody({ description: 'A zip file containing policy config.', required: true, @@ -2153,15 +2250,16 @@ export class PolicyApi { async importPolicyFromFileAsync( @AuthUser() user: IAuthUser, @Body() file: any, - @Query('versionOfTopicId') versionOfTopicId?: string + @Query('versionOfTopicId') versionOfTopicId?: string, + @Query('demo') demo?: boolean ): Promise { const taskManager = new TaskManager(); const task = taskManager.start(TaskAction.IMPORT_POLICY_FILE, user.id); RunFunctionAsync(async () => { const engineService = new PolicyEngine(); - await engineService.importFileAsync(file, new EntityOwner(user), versionOfTopicId, task); + await engineService.importFileAsync(file, new EntityOwner(user), task, versionOfTopicId, null, demo); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: 'Unknown error: ' + error.message }); }); return task; @@ -2186,6 +2284,13 @@ export class PolicyApi { required: false, example: '0.0.00000001' }) + @ApiQuery({ + name: 'demo', + type: Boolean, + description: 'Import policy in demo mode.', + required: false, + example: true + }) @ApiConsumes('multipart/form-data') @ApiBody({ description: 'Form data with policy file and metadata.', @@ -2217,33 +2322,32 @@ export class PolicyApi { @HttpCode(HttpStatus.ACCEPTED) async importPolicyFromFileWithMetadataAsync( @AuthUser() user: IAuthUser, - @UploadedFiles() files: any, - @Query('versionOfTopicId') versionOfTopicId?: string + @UploadedFiles() files: any[], + @Query('versionOfTopicId') versionOfTopicId?: string, + @Query('demo') demo?: boolean ): Promise { const taskManager = new TaskManager(); const task = taskManager.start(TaskAction.IMPORT_POLICY_FILE, user.id); RunFunctionAsync( async () => { - const policyFile = files.find( - (item) => item.fieldname === 'policyFile' - ); + const policyFile = files.find((item) => item.fieldname === 'policyFile'); + const metadataFile = files.find((item) => item.fieldname === 'metadata'); if (!policyFile) { throw new Error('There is no policy file'); } - const metadata = files.find( - (item) => item.fieldname === 'metadata' - ); + const metadata = metadataFile?.buffer && JSON.parse(metadataFile.buffer.toString()); const engineService = new PolicyEngine(); await engineService.importFileAsync( policyFile.buffer, new EntityOwner(user), - versionOfTopicId, task, - metadata?.buffer && JSON.parse(metadata.buffer.toString()) + versionOfTopicId, + metadata, + demo ); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: 'Unknown error: ' + error.message, @@ -2291,7 +2395,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.importFilePreview(file, new EntityOwner(user)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2343,7 +2447,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.importXlsx(file, new EntityOwner(user), policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2395,7 +2499,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); await engineService.importXlsxAsync(file, new EntityOwner(user), policyId, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: 'Unknown error: ' + error.message }); }); return task; @@ -2441,40 +2545,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.importXlsxPreview(file, new EntityOwner(user)); } catch (error) { - await InternalException(error); - } - } - - /** - * About - */ - @Get('/blocks/about') - @Auth( - Permissions.POLICIES_POLICY_UPDATE, - Permissions.MODULES_MODULE_UPDATE, - Permissions.TOOLS_TOOL_UPDATE - // UserRole.STANDARD_REGISTRY, - ) - @ApiOperation({ - summary: 'Returns block descriptions.', - description: 'Returns block descriptions.' + ONLY_SR, - }) - @ApiOkResponse({ - description: 'Block descriptions.', - }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO, - }) - @ApiExtraModels(InternalServerErrorDTO) - @UseCache({ ttl: CACHE.LONG_TTL }) - @HttpCode(HttpStatus.OK) - async getBlockAbout() { - try { - const engineService = new PolicyEngine(); - return await engineService.blockAbout(); - } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2516,7 +2587,7 @@ export class PolicyApi { try { return await engineService.getVirtualUsers(policyId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2558,7 +2629,7 @@ export class PolicyApi { try { return await engineService.createVirtualUser(policyId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2605,7 +2676,7 @@ export class PolicyApi { try { return await engineService.loginVirtualUser(policyId, body.did, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2648,13 +2719,13 @@ export class PolicyApi { const engineService = new PolicyEngine(); const owner = new EntityOwner(user); const policy = await engineService.accessPolicy(policyId, owner, 'read'); - if (policy.status !== PolicyType.DRY_RUN) { + if (!PolicyHelper.isDryRunMode(policy)) { throw new HttpException('Invalid status.', HttpStatus.FORBIDDEN) } try { return await engineService.restartDryRun(body, owner, policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2717,7 +2788,7 @@ export class PolicyApi { const [data, count] = await engineService.getVirtualDocuments(policyId, 'transactions', owner, pageIndex, pageSize) return res.header('X-Total-Count', count).send(data); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2780,7 +2851,7 @@ export class PolicyApi { const [data, count] = await engineService.getVirtualDocuments(policyId, 'artifacts', owner, pageIndex, pageSize); return res.header('X-Total-Count', count).send(data); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2843,10 +2914,14 @@ export class PolicyApi { const [data, count] = await engineService.getVirtualDocuments(policyId, 'ipfs', owner, pageIndex, pageSize) return res.header('X-Total-Count', count).send(data); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + //#endregion + + //#region Multiple + /** * Get policy links */ @@ -2885,7 +2960,7 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.getMultiPolicy(new EntityOwner(user), policyId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2932,10 +3007,316 @@ export class PolicyApi { const engineService = new PolicyEngine(); return await engineService.setMultiPolicy(new EntityOwner(user), policyId, body); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + //#endregion + + //#region Tests + + /** + * Add policy test + */ + @Post('/:policyId/test/') + @Auth(Permissions.POLICIES_POLICY_UPDATE) + @ApiOperation({ + summary: 'Add policy test.', + description: `Add policy test. ${ONLY_SR}`, + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiConsumes('multipart/form-data') + @ApiBody({ + description: 'Form data with tests.', + required: true, + schema: { + type: 'array', + items: { + type: 'object', + properties: { + 'tests': { + type: 'string', + format: 'binary', + } + } + } + } + }) + @ApiOkResponse({ + description: 'Successful operation.', + isArray: true, + type: PolicyTestDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(PolicyTestDTO, InternalServerErrorDTO) + @UseInterceptors(AnyFilesInterceptor()) + @HttpCode(HttpStatus.CREATED) + async addPolicyTest( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @UploadedFiles() files: any, + ) { + try { + if (!files) { + throw new HttpException('There are no files to upload', HttpStatus.BAD_REQUEST) + } + const uploadedTests = []; + const engineService = new PolicyEngine(); + for (const file of files) { + if (file) { + const result = await engineService.addPolicyTest(policyId, file, new EntityOwner(user)); + uploadedTests.push(result); + } + } + return uploadedTests; + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Get test + */ + @Get('/:policyId/test/:testId') + @Auth(Permissions.POLICIES_POLICY_UPDATE) + @ApiOperation({ + summary: 'Get policy test.', + description: `Get policy test. ${ONLY_SR}`, + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiParam({ + name: 'testId', + type: String, + description: 'Test Id', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: PolicyTestDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async getPolicyTest( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @Param('testId') testId: string + ) { + try { + const engineService = new PolicyEngine(); + return await engineService.getPolicyTest(policyId, testId, new EntityOwner(user)); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Start test + */ + @Post('/:policyId/test/:testId/start') + @Auth(Permissions.POLICIES_POLICY_UPDATE) + @ApiOperation({ + summary: 'Start policy test.', + description: `Start policy test. ${ONLY_SR}`, + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiParam({ + name: 'testId', + type: String, + description: 'Test Id', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: PolicyTestDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async startPolicyTest( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @Param('testId') testId: string + ) { + try { + const engineService = new PolicyEngine(); + return await engineService.startPolicyTest(policyId, testId, new EntityOwner(user)); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Stop test + */ + @Post('/:policyId/test/:testId/stop') + @Auth(Permissions.POLICIES_POLICY_UPDATE) + @ApiOperation({ + summary: 'Stop policy test.', + description: `Stop policy test. ${ONLY_SR}`, + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiParam({ + name: 'testId', + type: String, + description: 'Test Id', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: PolicyTestDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async stopPolicyTest( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @Param('testId') testId: string + ) { + try { + const engineService = new PolicyEngine(); + return await engineService.stopPolicyTest(policyId, testId, new EntityOwner(user)); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Delete test + */ + @Delete('/:policyId/test/:testId') + @Auth(Permissions.POLICIES_POLICY_UPDATE) + @ApiOperation({ + summary: 'Delete policy test.', + description: `Delete policy test. ${ONLY_SR}`, + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiParam({ + name: 'testId', + type: String, + description: 'Test Id', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: Boolean, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO, + }) + @ApiExtraModels(InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async deletePolicyTest( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @Param('testId') testId: string + ) { + try { + const engineService = new PolicyEngine(); + return await engineService.deletePolicyTest(policyId, testId, new EntityOwner(user)); + } catch (error) { + await InternalException(error, this.logger); + } + } + + /** + * Get test details + */ + @Get('/:policyId/test/:testId/details') + @Auth(Permissions.POLICIES_POLICY_UPDATE) + @ApiOperation({ + summary: 'Get test details.', + description: 'Get test details.' + ONLY_SR, + }) + @ApiParam({ + name: 'policyId', + type: String, + description: 'Policy Id', + required: true, + example: Examples.DB_ID + }) + @ApiParam({ + name: 'testId', + type: String, + description: 'Test Id', + required: true, + example: Examples.DB_ID + }) + @ApiOkResponse({ + description: 'Successful operation.', + type: RunningDetailsDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error.', + type: InternalServerErrorDTO + }) + @ApiExtraModels(RunningDetailsDTO, InternalServerErrorDTO) + @HttpCode(HttpStatus.OK) + async getTestDetails( + @AuthUser() user: IAuthUser, + @Param('policyId') policyId: string, + @Param('testId') testId: string + ) { + try { + const engineService = new PolicyEngine(); + return await engineService.getTestDetails(policyId, testId, new EntityOwner(user)); + } catch (error) { + await InternalException(error, this.logger); + } + } + + //#endregion + + //#region Methodologies + /** * Get all categories */ @@ -2961,7 +3342,7 @@ export class PolicyApi { const projectService = new ProjectService(); return await projectService.getPolicyCategories(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -3003,7 +3384,9 @@ export class PolicyApi { const engineService = new PolicyEngine(); return engineService.getPoliciesByCategoriesAndText(body.categoryIds, body.text); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } + + //#endregion } diff --git a/api-gateway/src/api/service/profile.ts b/api-gateway/src/api/service/profile.ts index ec091eb03d..82eab4bfda 100644 --- a/api-gateway/src/api/service/profile.ts +++ b/api-gateway/src/api/service/profile.ts @@ -1,5 +1,5 @@ import { DidDocumentStatus, Permissions, SchemaEntity, TaskAction, TopicType } from '@guardian/interfaces'; -import { IAuthUser, Logger, RunFunctionAsync } from '@guardian/common'; +import { IAuthUser, PinoLogger, RunFunctionAsync } from '@guardian/common'; import { Body, Controller, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Req } from '@nestjs/common'; import { ApiBody, ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiParam, ApiTags } from '@nestjs/swagger'; import { CredentialsDTO, DidDocumentDTO, DidDocumentStatusDTO, DidDocumentWithKeyDTO, DidKeyStatusDTO, InternalServerErrorDTO, ProfileDTO, TaskDTO } from '#middlewares'; @@ -10,7 +10,7 @@ import { CACHE } from '#constants'; @Controller('profiles') @ApiTags('profiles') export class ProfileApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } /** @@ -107,7 +107,7 @@ export class ProfileApi { vcDocument }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -208,7 +208,7 @@ export class ProfileApi { const guardians = new Guardians(); await guardians.createUserProfileCommonAsync(username, profile, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -307,7 +307,7 @@ export class ProfileApi { const guardians = new Guardians(); await guardians.restoreUserProfileCommonAsync(username, profile, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -358,7 +358,7 @@ export class ProfileApi { const guardians = new Guardians(); await guardians.getAllUserTopicsAsync(username, profile, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -403,7 +403,7 @@ export class ProfileApi { const guardians = new Guardians(); return await guardians.validateDidDocument(document); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -453,7 +453,7 @@ export class ProfileApi { const guardians = new Guardians(); return await guardians.validateDidKeys(document, keys); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/project.ts b/api-gateway/src/api/service/project.ts index 457df4e1b9..6ae0b12651 100644 --- a/api-gateway/src/api/service/project.ts +++ b/api-gateway/src/api/service/project.ts @@ -4,6 +4,7 @@ import { ApiBody, ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, import { ProjectDTO, PropertiesDTO, CompareDocumentsDTO, CompareDocumentsV2DTO, FilterDocumentsDTO, InternalServerErrorDTO, Examples } from '#middlewares'; import { CACHE } from '#constants'; import { UseCache, Guardians, InternalException, ProjectService } from '#helpers'; +import { PinoLogger } from '@guardian/common'; /** * Projects route @@ -11,7 +12,7 @@ import { UseCache, Guardians, InternalException, ProjectService } from '#helpers @Controller('projects') @ApiTags('projects') export class ProjectsAPI { - constructor(@Inject('GUARDIANS') public readonly client: ClientProxy) { + constructor(@Inject('GUARDIANS') public readonly client: ClientProxy, private readonly logger: PinoLogger) { } /** @@ -52,7 +53,7 @@ export class ProjectsAPI { const projectService = new ProjectService(); return await projectService.search(categoryIds, policyIds); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -139,7 +140,7 @@ export class ProjectsAPI { refLvl ); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -245,7 +246,7 @@ export class ProjectsAPI { presentations: comparationVpArray } } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -273,7 +274,7 @@ export class ProjectsAPI { const projectService = new ProjectService(); return await projectService.getPolicyProperties(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/record.ts b/api-gateway/src/api/service/record.ts index 79540af66e..16252941ec 100644 --- a/api-gateway/src/api/service/record.ts +++ b/api-gateway/src/api/service/record.ts @@ -1,6 +1,6 @@ import { Permissions } from '@guardian/interfaces'; -import { EntityOwner, Guardians, InternalException, ONLY_SR, checkPolicy } from '#helpers'; -import { IAuthUser } from '@guardian/common'; +import { EntityOwner, Guardians, InternalException, ONLY_SR, checkPolicyByRecord } from '#helpers'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Controller, Get, HttpCode, HttpStatus, Post, Response, Param, Body } from '@nestjs/common'; import { ApiBody, ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiParam, ApiTags } from '@nestjs/swagger'; import { AuthUser, Auth } from '#auth'; @@ -9,6 +9,9 @@ import { InternalServerErrorDTO, RecordActionDTO, RecordStatusDTO, RunningDetail @Controller('record') @ApiTags('record') export class RecordApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Get recording or running status */ @@ -43,12 +46,12 @@ export class RecordApi { @Param('policyId') policyId: string, ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.getRecordStatus(policyId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -92,12 +95,12 @@ export class RecordApi { @Body() options: any ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.startRecording(policyId, owner, options); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -145,7 +148,7 @@ export class RecordApi { @Response() res: any ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); const result = await guardians.stopRecording(policyId, owner, options); @@ -153,7 +156,7 @@ export class RecordApi { res.header('Content-type', 'application/zip'); return res.send(result); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -192,12 +195,12 @@ export class RecordApi { @Param('policyId') policyId: string, ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.getRecordedActions(policyId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -226,8 +229,8 @@ export class RecordApi { type: String }) @ApiOkResponse({ - description: 'Successful operation.', - type: Boolean + description: 'Record UUID.', + type: String }) @ApiInternalServerErrorResponse({ description: 'Internal server error.', @@ -241,13 +244,13 @@ export class RecordApi { @Body() file: any ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const options = { file }; const guardians = new Guardians(); return await guardians.runRecord(policyId, owner, options); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -291,12 +294,12 @@ export class RecordApi { @Body() options: any ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.stopRunning(policyId, owner, options); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -334,12 +337,12 @@ export class RecordApi { @Param('policyId') policyId: string, ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.getRecordResults(policyId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -377,12 +380,12 @@ export class RecordApi { @Param('policyId') policyId: string ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.getRecordDetails(policyId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -426,12 +429,12 @@ export class RecordApi { @Body() options: any ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.fastForward(policyId, owner, options); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -475,12 +478,12 @@ export class RecordApi { @Body() options: any ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.retryStep(policyId, owner, options); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -524,12 +527,12 @@ export class RecordApi { @Body() options: any ) { const owner = new EntityOwner(user); - await checkPolicy(policyId, owner); + await checkPolicyByRecord(policyId, owner); try { const guardians = new Guardians(); return await guardians.skipStep(policyId, owner, options); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/schema.ts b/api-gateway/src/api/service/schema.ts index ae7713064e..2f41e96618 100644 --- a/api-gateway/src/api/service/schema.ts +++ b/api-gateway/src/api/service/schema.ts @@ -1,5 +1,5 @@ import { ISchema, Permissions, SchemaCategory, SchemaEntity, SchemaHelper, SchemaStatus, StatusType, TaskAction } from '@guardian/interfaces'; -import { IAuthUser, Logger, RunFunctionAsync, SchemaImportExport } from '@guardian/common'; +import { IAuthUser, PinoLogger, RunFunctionAsync, SchemaImportExport } from '@guardian/common'; import { ApiParam, ApiQuery, ApiBody, ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Req, Response, Version } from '@nestjs/common'; import { AuthUser, Auth } from '#auth'; @@ -12,6 +12,9 @@ import process from 'process'; @Controller('schema') @ApiTags('schema') export class SingleSchemaApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Returns schema by schema ID. */ @@ -59,7 +62,7 @@ export class SingleSchemaApi { SchemaHelper.updatePermission([schema], owner); return SchemaUtils.toOld(schema); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -104,7 +107,7 @@ export class SingleSchemaApi { const schemas = await guardians.getSchemaParents(schemaId, owner); return SchemaUtils.toOld(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -163,7 +166,7 @@ export class SingleSchemaApi { const owner = new EntityOwner(user); return await guardians.getSchemaTree(schemaId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } @@ -171,7 +174,7 @@ export class SingleSchemaApi { @Controller('schemas') @ApiTags('schemas') export class SchemaApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } @Client({ @@ -299,7 +302,7 @@ export class SchemaApi { SchemaHelper.updatePermission(items, owner); return res.header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -422,7 +425,7 @@ export class SchemaApi { return res.header('X-Total-Count', count).send(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -507,7 +510,7 @@ export class SchemaApi { SchemaHelper.updatePermission(items, owner); return res.header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -565,7 +568,7 @@ export class SchemaApi { contextURL: schema.contextURL, }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -608,7 +611,7 @@ export class SchemaApi { return []; } } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -666,7 +669,7 @@ export class SchemaApi { const owner = new EntityOwner(user); return await guardians.getSubSchemas(category, topicId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -716,7 +719,7 @@ export class SchemaApi { @Query('category') category: string, @Query('topicId') topicId: string, @Query('schemaId') schemaId: string, - ): Promise<{schema: SchemaDTO, subSchemas: SchemaDTO[]} | {}> { + ): Promise<{ schema: SchemaDTO, subSchemas: SchemaDTO[] } | {}> { try { const guardians = new Guardians(); if (!user.did) { @@ -726,7 +729,7 @@ export class SchemaApi { let promiseSchema: Promise = new Promise(resolve => resolve()) - if(schemaId) { + if (schemaId) { promiseSchema = guardians.getSchemaById(schemaId) } @@ -735,7 +738,7 @@ export class SchemaApi { return { schema, subSchemas }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -796,7 +799,7 @@ export class SchemaApi { return SchemaUtils.toOld(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -838,7 +841,7 @@ export class SchemaApi { taskManager.addStatus(task.taskId, 'Check schema version', StatusType.PROCESSING); await guardians.copySchemaAsync(iri, topicId, name, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -897,7 +900,7 @@ export class SchemaApi { await guardians.createSchemaAsync(newSchema, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -950,6 +953,9 @@ export class SchemaApi { if (schema.status === SchemaStatus.PUBLISHED) { throw new HttpException('Schema is published.', HttpStatus.UNPROCESSABLE_ENTITY) } + if (schema.status === SchemaStatus.DEMO) { + throw new HttpException('Schema imported in demo mode.', HttpStatus.UNPROCESSABLE_ENTITY) + } SchemaUtils.fromOld(newSchema); SchemaHelper.checkSchemaKey(newSchema); @@ -963,7 +969,7 @@ export class SchemaApi { return SchemaUtils.toOld(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1009,7 +1015,7 @@ export class SchemaApi { try { schema = await guardians.getSchemaById(schemaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!schema) { throw new HttpException('Schema not found.', HttpStatus.NOT_FOUND) @@ -1021,6 +1027,9 @@ export class SchemaApi { if (schema.status === SchemaStatus.PUBLISHED) { throw new HttpException('Schema is published.', HttpStatus.UNPROCESSABLE_ENTITY) } + if (schema.status === SchemaStatus.DEMO) { + throw new HttpException('Schema imported in demo mode.', HttpStatus.UNPROCESSABLE_ENTITY) + } try { const schemas = (await guardians.deleteSchema(schemaId, owner, true) as ISchema[]); SchemaHelper.updatePermission(schemas, owner); @@ -1029,7 +1038,7 @@ export class SchemaApi { return SchemaUtils.toOld(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1091,7 +1100,7 @@ export class SchemaApi { try { schema = await guardians.getSchemaById(schemaId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } if (!schema) { throw new HttpException('Schema not found.', HttpStatus.NOT_FOUND) @@ -1099,7 +1108,7 @@ export class SchemaApi { try { allVersion = await guardians.getSchemasByUUID(schema.uuid); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } const error = SchemaUtils.checkPermission(schema, owner, SchemaCategory.POLICY); if (error) { @@ -1108,6 +1117,9 @@ export class SchemaApi { if (schema.status === SchemaStatus.PUBLISHED) { throw new HttpException('Schema is published.', HttpStatus.UNPROCESSABLE_ENTITY) } + if (schema.status === SchemaStatus.DEMO) { + throw new HttpException('Schema imported in demo mode.', HttpStatus.UNPROCESSABLE_ENTITY) + } if (allVersion.findIndex(s => s.version === version) !== -1) { throw new HttpException('Version already exists.', HttpStatus.UNPROCESSABLE_ENTITY) } @@ -1124,7 +1136,7 @@ export class SchemaApi { return res.header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1193,6 +1205,10 @@ export class SchemaApi { taskManager.addError(task.taskId, { code: 500, message: 'Schema is published.' }); return; } + if (schema.status === SchemaStatus.DEMO) { + taskManager.addError(task.taskId, { code: 500, message: 'Schema imported in demo mode.' }); + return; + } const allVersion = await guardians.getSchemasByUUID(schema.uuid); if (allVersion.findIndex(s => s.version === version) !== -1) { taskManager.addError(task.taskId, { code: 500, message: 'Version already exists.' }); @@ -1200,7 +1216,7 @@ export class SchemaApi { } await guardians.publishSchemaAsync(schemaId, version, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); @@ -1257,7 +1273,7 @@ export class SchemaApi { const guardians = new Guardians(); return await guardians.previewSchemasByMessages([messageId]); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1309,7 +1325,7 @@ export class SchemaApi { const guardians = new Guardians(); await guardians.previewSchemasByMessagesAsync([messageId], task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -1353,7 +1369,7 @@ export class SchemaApi { const { schemas } = await SchemaImportExport.parseZipFile(zip); return await guardians.previewSchemasByFile(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1420,7 +1436,7 @@ export class SchemaApi { SchemaHelper.updatePermission(items, owner); return res.status(201).header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1481,7 +1497,7 @@ export class SchemaApi { const guardians = new Guardians(); await guardians.importSchemasByMessagesAsync([messageId], owner, topicId, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -1542,7 +1558,7 @@ export class SchemaApi { SchemaHelper.updatePermission(items, owner); return res.status(201).header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1595,7 +1611,7 @@ export class SchemaApi { const guardians = new Guardians(); await guardians.importSchemasByFileAsync(files, owner, topicId, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; @@ -1651,7 +1667,7 @@ export class SchemaApi { owner: scheme.owner }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1710,7 +1726,7 @@ export class SchemaApi { res.header('Content-type', 'application/zip'); return res.send(arcStream); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1776,7 +1792,7 @@ export class SchemaApi { return SchemaUtils.toOld(schema); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1840,7 +1856,7 @@ export class SchemaApi { items.forEach((s) => { s.readonly = s.readonly || s.owner !== owner.owner }); return res.header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1906,7 +1922,7 @@ export class SchemaApi { items.forEach((s) => { s.readonly = s.readonly || s.owner !== owner.owner }); return res.header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1958,7 +1974,7 @@ export class SchemaApi { } await guardians.deleteSchema(schemaId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2029,7 +2045,7 @@ export class SchemaApi { return SchemaUtils.toOld(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2086,7 +2102,7 @@ export class SchemaApi { return null; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2136,7 +2152,7 @@ export class SchemaApi { contextURL: schema.contextURL, }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2186,7 +2202,7 @@ export class SchemaApi { res.header('Content-type', 'application/zip'); return res.send(file); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2245,7 +2261,7 @@ export class SchemaApi { SchemaHelper.updatePermission(items, owner); return res.status(201).header('X-Total-Count', count).send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2301,7 +2317,7 @@ export class SchemaApi { const owner = new EntityOwner(user); await guardians.importSchemasByXlsxAsync(owner, topicId, file, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: 'Unknown error: ' + error.message }); }); return res.status(202).send(task); @@ -2348,7 +2364,7 @@ export class SchemaApi { const owner = new EntityOwner(user); return await guardians.previewSchemasByFileXlsx(owner, file); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -2392,7 +2408,7 @@ export class SchemaApi { res.locals.data = fileBuffer return res.send(fileBuffer); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/settings.ts b/api-gateway/src/api/service/settings.ts index 70695fcf9d..3ab430e6cb 100644 --- a/api-gateway/src/api/service/settings.ts +++ b/api-gateway/src/api/service/settings.ts @@ -5,10 +5,14 @@ import { SettingsDTO, InternalServerErrorDTO } from '#middlewares'; import { Auth } from '#auth'; import { Guardians, InternalException } from '#helpers'; import process from 'process'; +import { PinoLogger } from '@guardian/common'; @Controller('settings') @ApiTags('settings') export class SettingsApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Set settings */ @@ -44,7 +48,7 @@ export class SettingsApi { await Promise.all([guardians.updateSettings(settings)]); return null; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -76,7 +80,7 @@ export class SettingsApi { const [guardiansSettings] = await Promise.all([guardians.getSettings()]); return { ...guardiansSettings } as any; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -104,7 +108,7 @@ export class SettingsApi { const guardians = new Guardians(); return await guardians.getEnvironment(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } diff --git a/api-gateway/src/api/service/tags.ts b/api-gateway/src/api/service/tags.ts index 3c77b8f440..797d78fa4b 100644 --- a/api-gateway/src/api/service/tags.ts +++ b/api-gateway/src/api/service/tags.ts @@ -1,4 +1,4 @@ -import { IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Permissions, SchemaCategory, SchemaHelper } from '@guardian/interfaces'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Req, Response, Version } from '@nestjs/common'; import { ApiTags, ApiInternalServerErrorResponse, ApiExtraModels, ApiOperation, ApiBody, ApiOkResponse, ApiParam, ApiCreatedResponse, ApiQuery } from '@nestjs/swagger'; @@ -11,7 +11,7 @@ import { SCHEMA_REQUIRED_PROPS } from '#constants'; @ApiTags('tags') export class TagsApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } /** @@ -51,7 +51,7 @@ export class TagsApi { const guardian = new Guardians(); return await guardian.createTag(body, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -150,7 +150,7 @@ export class TagsApi { } return tagMap; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -196,7 +196,7 @@ export class TagsApi { const guardian = new Guardians(); return await guardian.deleteTag(uuid, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -257,7 +257,7 @@ export class TagsApi { refreshDate: (new Date()).toISOString(), }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -318,7 +318,7 @@ export class TagsApi { .header('X-Total-Count', count) .send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -380,7 +380,7 @@ export class TagsApi { .header('X-Total-Count', count) .send(SchemaUtils.toOld(items)); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -433,7 +433,7 @@ export class TagsApi { return SchemaUtils.toOld(schemas); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -481,7 +481,7 @@ export class TagsApi { await guardians.deleteSchema(schemaId, owner); return true; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -537,7 +537,7 @@ export class TagsApi { SchemaHelper.updateOwner(newSchema, owner); return await guardians.updateSchema(newSchema, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -586,7 +586,7 @@ export class TagsApi { const version = '1.0.0'; return await guardians.publishTagSchema(schemaId, version, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -614,7 +614,7 @@ export class TagsApi { const guardians = new Guardians(); return await guardians.getPublishedTagSchemas(); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/task.ts b/api-gateway/src/api/service/task.ts index c8a71f98e4..1a250f1850 100644 --- a/api-gateway/src/api/service/task.ts +++ b/api-gateway/src/api/service/task.ts @@ -1,4 +1,4 @@ -import { IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Controller, Get, HttpCode, HttpStatus, Param } from '@nestjs/common'; import { ApiTags, ApiParam, ApiOperation, ApiExtraModels, ApiOkResponse, ApiInternalServerErrorResponse } from '@nestjs/swagger'; import { AuthUser, Auth } from '#auth'; @@ -8,6 +8,9 @@ import { InternalException, TaskManager } from '#helpers'; @Controller('tasks') @ApiTags('tasks') export class TaskApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Get status */ @@ -42,7 +45,7 @@ export class TaskApi { const taskManager = new TaskManager(); return taskManager.getState(user.id, taskId); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/themes.ts b/api-gateway/src/api/service/themes.ts index b4a640dd29..464938a4fd 100644 --- a/api-gateway/src/api/service/themes.ts +++ b/api-gateway/src/api/service/themes.ts @@ -1,4 +1,4 @@ -import { IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { CacheService, EntityOwner, getCacheKey, Guardians, InternalException, ONLY_SR, UseCache } from '#helpers'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Req, Response } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiBody, ApiOkResponse, ApiInternalServerErrorResponse, ApiExtraModels, ApiParam } from '@nestjs/swagger'; @@ -11,7 +11,7 @@ import { PREFIXES } from '#constants'; @ApiTags('themes') export class ThemesApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } /** @@ -58,7 +58,7 @@ export class ThemesApi { return await guardians.createTheme(theme, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -122,7 +122,7 @@ export class ThemesApi { return await guardians.updateTheme(themeId, theme, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -176,7 +176,7 @@ export class ThemesApi { return await guardians.deleteTheme(themeId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -216,7 +216,7 @@ export class ThemesApi { return []; } } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -263,7 +263,7 @@ export class ThemesApi { return await guardian.importThemeFile(zip, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -309,7 +309,7 @@ export class ThemesApi { res.header('Content-type', 'application/zip'); return res.send(file); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/tokens.ts b/api-gateway/src/api/service/tokens.ts index 99ec350349..9da931df4f 100644 --- a/api-gateway/src/api/service/tokens.ts +++ b/api-gateway/src/api/service/tokens.ts @@ -1,6 +1,6 @@ import { Guardians, PolicyEngine, TaskManager, ServiceError, InternalException, ONLY_SR, parseInteger, EntityOwner, getCacheKey, CacheService } from '#helpers'; import { IOwner, IToken, Permissions, TaskAction, UserPermissions } from '@guardian/interfaces'; -import { IAuthUser, Logger, RunFunctionAsync } from '@guardian/common'; +import { IAuthUser, PinoLogger, RunFunctionAsync } from '@guardian/common'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Req, Response, Version } from '@nestjs/common'; import { AuthUser, Auth } from '#auth'; import { ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiExtraModels, ApiTags, ApiParam, ApiBody, ApiQuery } from '@nestjs/swagger'; @@ -72,7 +72,8 @@ async function setDynamicTokenPolicy( @ApiTags('tokens') export class TokensApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { + } /** @@ -164,7 +165,7 @@ export class TokensApi { .header('X-Total-Count', tokensAndCount.count) .send(tokensAndCount.items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -259,7 +260,7 @@ export class TokensApi { .header('X-Total-Count', tokensAndCount.count) .send(tokensAndCount.items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -302,7 +303,7 @@ export class TokensApi { return tokenByIdWithPolicies; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -353,7 +354,7 @@ export class TokensApi { return tokens; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -398,7 +399,7 @@ export class TokensApi { const guardians = new Guardians(); await guardians.setTokenAsync(token, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); @@ -462,7 +463,7 @@ export class TokensApi { return await guardians.updateToken(token, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -523,13 +524,13 @@ export class TokensApi { RunFunctionAsync(async () => { await guardians.updateTokenAsync(token, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -592,13 +593,13 @@ export class TokensApi { RunFunctionAsync(async () => { await guardians.deleteTokenAsync(tokenId, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -643,7 +644,7 @@ export class TokensApi { const guardians = new Guardians(); return await guardians.associateToken(tokenId, owner); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not found.', HttpStatus.NOT_FOUND) } @@ -698,7 +699,7 @@ export class TokensApi { const guardians = new Guardians(); await guardians.associateTokenAsync(tokenId, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); @@ -746,7 +747,7 @@ export class TokensApi { const guardians = new Guardians(); return await guardians.dissociateToken(tokenId, owner); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not found.', HttpStatus.NOT_FOUND) } @@ -800,7 +801,7 @@ export class TokensApi { const guardians = new Guardians(); await guardians.dissociateTokenAsync(tokenId, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -855,7 +856,7 @@ export class TokensApi { const guardians = new Guardians(); return await guardians.grantKycToken(tokenId, username, owner); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not found.', HttpStatus.NOT_FOUND) } @@ -917,7 +918,7 @@ export class TokensApi { const guardians = new Guardians(); await guardians.grantKycTokenAsync(tokenId, username, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -972,7 +973,7 @@ export class TokensApi { const owner = new EntityOwner(user); return await guardians.revokeKycToken(tokenId, username, owner); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not found.', HttpStatus.NOT_FOUND) } @@ -1034,7 +1035,7 @@ export class TokensApi { const guardians = new Guardians(); await guardians.revokeKycTokenAsync(tokenId, username, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -1089,7 +1090,7 @@ export class TokensApi { const guardians = new Guardians(); return await guardians.freezeToken(tokenId, username, owner); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not registered.', HttpStatus.NOT_FOUND); } @@ -1149,7 +1150,7 @@ export class TokensApi { const guardians = new Guardians(); return await guardians.unfreezeToken(tokenId, username, owner); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not registered.', HttpStatus.NOT_FOUND); } @@ -1211,7 +1212,7 @@ export class TokensApi { const guardians = new Guardians(); await guardians.freezeTokenAsync(tokenId, username, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -1268,7 +1269,7 @@ export class TokensApi { const guardians = new Guardians(); await guardians.unfreezeTokenAsync(tokenId, username, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: error.code || 500, message: error.message }); }); return task; @@ -1323,7 +1324,7 @@ export class TokensApi { const guardians = new Guardians(); return await guardians.getInfoToken(tokenId, username, owner); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not registered.', HttpStatus.NOT_FOUND); } @@ -1373,7 +1374,7 @@ export class TokensApi { const guardians = new Guardians(); return await guardians.getTokenSerials(tokenId, user.did); } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); if (error?.message?.toLowerCase().includes('user not found')) { throw new HttpException('User not registered.', HttpStatus.NOT_FOUND); } @@ -1422,7 +1423,7 @@ export class TokensApi { items = setTokensPolicies(items, map, null, false); return items; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/tool.ts b/api-gateway/src/api/service/tool.ts index b6690e4936..5919093acc 100644 --- a/api-gateway/src/api/service/tool.ts +++ b/api-gateway/src/api/service/tool.ts @@ -1,4 +1,4 @@ -import { IAuthUser, Logger, RunFunctionAsync } from '@guardian/common'; +import { IAuthUser, PinoLogger, RunFunctionAsync } from '@guardian/common'; import { Body, Controller, Delete, Get, HttpCode, HttpException, HttpStatus, Param, Post, Put, Query, Req, Response, UseInterceptors, Version } from '@nestjs/common'; import { Permissions, TaskAction } from '@guardian/interfaces'; import { ApiBody, ApiConsumes, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags, ApiQuery, ApiExtraModels, ApiParam } from '@nestjs/swagger'; @@ -10,7 +10,7 @@ import { PREFIXES, TOOL_REQUIRED_PROPS } from '#constants'; @Controller('tools') @ApiTags('tools') export class ToolsApi { - constructor(private readonly cacheService: CacheService) { + constructor(private readonly cacheService: CacheService, private readonly logger: PinoLogger) { } /** * Creates a new tool @@ -56,7 +56,7 @@ export class ToolsApi { return await guardian.createTool(tool, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -102,7 +102,7 @@ export class ToolsApi { RunFunctionAsync(async () => { await guardian.createToolAsync(tool, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); @@ -111,7 +111,7 @@ export class ToolsApi { return task; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -169,7 +169,7 @@ export class ToolsApi { }, owner); return res.header('X-Total-Count', count).send(items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -229,7 +229,7 @@ export class ToolsApi { }, owner); return res.header('X-Total-Count', count).send(items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -279,7 +279,7 @@ export class ToolsApi { return await guardian.deleteTool(id, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -325,7 +325,7 @@ export class ToolsApi { const guardian = new Guardians(); return await guardian.getToolById(id, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -384,7 +384,7 @@ export class ToolsApi { return await guardian.updateTool(id, tool, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -440,7 +440,7 @@ export class ToolsApi { return await guardian.publishTool(id, owner, tool); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -494,7 +494,7 @@ export class ToolsApi { const guardian = new Guardians(); await guardian.publishToolAsync(id, owner, tool, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message || error }); }); @@ -541,7 +541,7 @@ export class ToolsApi { const guardian = new Guardians(); return await guardian.validateTool(owner, tool); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -588,7 +588,7 @@ export class ToolsApi { res.header('Content-type', 'application/zip'); return res.send(file); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -633,7 +633,7 @@ export class ToolsApi { const guardian = new Guardians(); return await guardian.exportToolMessage(id, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -676,7 +676,7 @@ export class ToolsApi { const guardian = new Guardians(); return await guardian.previewToolMessage(messageId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -720,7 +720,7 @@ export class ToolsApi { try { return await guardian.importToolMessage(messageId, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -758,7 +758,7 @@ export class ToolsApi { const guardian = new Guardians(); return await guardian.previewToolFile(body, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -798,7 +798,7 @@ export class ToolsApi { return await guardian.importToolFile(body, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -865,7 +865,7 @@ export class ToolsApi { return tool; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -909,13 +909,13 @@ export class ToolsApi { RunFunctionAsync(async () => { await guardian.importToolFileAsync(zip, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -989,7 +989,7 @@ export class ToolsApi { ); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message, @@ -999,7 +999,7 @@ export class ToolsApi { return task; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1045,12 +1045,12 @@ export class ToolsApi { RunFunctionAsync(async () => { await guardian.importToolMessageAsync(messageId, owner, task); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message }); }); return task; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -1088,7 +1088,7 @@ export class ToolsApi { const guardians = new Guardians(); return await guardians.getMenuTool(owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/trust-chains.ts b/api-gateway/src/api/service/trust-chains.ts index b8d2cf567f..184e7d85cb 100644 --- a/api-gateway/src/api/service/trust-chains.ts +++ b/api-gateway/src/api/service/trust-chains.ts @@ -1,4 +1,4 @@ -import { IAuthUser } from '@guardian/common'; +import { IAuthUser, PinoLogger } from '@guardian/common'; import { Controller, Get, HttpCode, HttpStatus, Param, Query, Response } from '@nestjs/common'; import { Permissions } from '@guardian/interfaces'; import { ApiTags, ApiOperation, ApiOkResponse, ApiInternalServerErrorResponse, ApiExtraModels, ApiParam, ApiQuery } from '@nestjs/swagger'; @@ -9,6 +9,9 @@ import { Examples, InternalServerErrorDTO, VpDocumentDTO, pageHeader } from '#mi @Controller('trust-chains') @ApiTags('trust-chains') export class TrustChainsApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Get VP Document */ @@ -79,7 +82,7 @@ export class TrustChainsApi { const { items, count } = await guardians.getVpDocuments({ filters, pageIndex, pageSize }); return res.header('X-Total-Count', count).send(items); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -205,7 +208,7 @@ export class TrustChainsApi { return { chain, userMap }; } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/api/service/websockets.ts b/api-gateway/src/api/service/websockets.ts index 81181ff4ca..c6bd6dd06c 100644 --- a/api-gateway/src/api/service/websockets.ts +++ b/api-gateway/src/api/service/websockets.ts @@ -1,9 +1,8 @@ import WebSocket, { WebSocketServer } from 'ws' import { IncomingMessage, Server } from 'http'; import { ExternalProviders, GenerateUUIDv4, MessageAPI, NotifyAPI, UserRole } from '@guardian/interfaces'; -import { generateNumberFromString, IAuthUser, Logger, MeecoApprovedSubmission, MessageResponse, NatsService, NotificationHelper, Singleton } from '@guardian/common'; +import { generateNumberFromString, IAuthUser, MeecoApprovedSubmission, MessageResponse, NatsService, NotificationHelper, PinoLogger, Singleton } from '@guardian/common'; import { NatsConnection } from 'nats'; -// import { Injectable } from '@nestjs/common'; import { MeecoAuth, Users } from '#helpers'; import { Mutex } from 'async-mutex'; @@ -39,6 +38,9 @@ export class WebSocketsServiceChannel extends NatsService { // @Injectable() @Singleton export class WebSocketsService { + constructor(private readonly logger: PinoLogger) { + } + /** * Channel * @private @@ -102,7 +104,7 @@ export class WebSocketsService { * @param user */ public updatePermissions(users: IAuthUser | IAuthUser[]): void { - if(!users) { + if (!users) { return; } @@ -210,7 +212,7 @@ export class WebSocketsService { const channel = new WebSocketsServiceChannel(); const statuses = { - LOGGER_SERVICE: [], + // LOGGER_SERVICE: [], GUARDIAN_SERVICE: [], AUTH_SERVICE: [], WORKER: [], @@ -286,6 +288,19 @@ export class WebSocketsService { return new MessageResponse({}); }); + this.channel.subscribe('update-test', + async (msg: any) => { + this.wss.clients.forEach((client: any) => { + if (this.checkUserByDid(client, msg)) { + this.send(client, { + type: MessageAPI.UPDATE_TEST_EVENT, + data: msg, + }); + } + }); + return new MessageResponse({}); + }); + this.channel.subscribe('update-block', async (msg) => { updateArray.push(msg); return new MessageResponse({}); @@ -488,7 +503,7 @@ export class WebSocketsService { break; } } catch (error) { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); } } @@ -502,7 +517,7 @@ export class WebSocketsService { try { ws.send(JSON.stringify(message)); } catch (error) { - new Logger().error(error, ['API_GATEWAY', 'websocket', 'send']); + this.logger.error(error, ['API_GATEWAY', 'websocket', 'send']); } } @@ -520,7 +535,7 @@ export class WebSocketsService { } return null; } catch (error) { - new Logger().warn(error.message || error, ['API_GATEWAY']); + await this.logger.warn(error.message || error, ['API_GATEWAY']); return null; } } diff --git a/api-gateway/src/api/service/wizard.ts b/api-gateway/src/api/service/wizard.ts index 3de6b7e1ab..1bb6475053 100644 --- a/api-gateway/src/api/service/wizard.ts +++ b/api-gateway/src/api/service/wizard.ts @@ -1,5 +1,5 @@ import { Guardians, TaskManager, ServiceError, ONLY_SR, InternalException, EntityOwner } from '#helpers'; -import { IAuthUser, Logger, RunFunctionAsync, } from '@guardian/common'; +import { IAuthUser, PinoLogger, RunFunctionAsync } from '@guardian/common'; import { Body, Controller, HttpCode, HttpStatus, Param, Post } from '@nestjs/common'; import { Permissions, TaskAction } from '@guardian/interfaces'; import { ApiBody, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags, ApiParam, ApiExtraModels } from '@nestjs/swagger'; @@ -9,6 +9,9 @@ import { AuthUser, Auth } from '#auth'; @Controller('wizard') @ApiTags('wizard') export class WizardApi { + constructor(private readonly logger: PinoLogger) { + } + /** * Creates a new policy */ @@ -45,7 +48,7 @@ export class WizardApi { const guardians = new Guardians(); return await guardians.wizardPolicyCreate(wizardConfig, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } @@ -95,7 +98,7 @@ export class WizardApi { ); }, async (error) => { - new Logger().error(error, ['API_GATEWAY']); + await this.logger.error(error, ['API_GATEWAY']); taskManager.addError(task.taskId, { code: 500, message: error.message, @@ -149,7 +152,7 @@ export class WizardApi { const owner = new EntityOwner(user); return await guardians.wizardGetPolicyConfig(policyId, wizardConfig, owner); } catch (error) { - await InternalException(error); + await InternalException(error, this.logger); } } } diff --git a/api-gateway/src/app.module.ts b/api-gateway/src/app.module.ts index e5c51d9e92..ad812e3061 100644 --- a/api-gateway/src/app.module.ts +++ b/api-gateway/src/app.module.ts @@ -36,10 +36,11 @@ import { RolesGuard } from './auth/roles-guard.js'; import { RecordApi } from './api/service/record.js'; import { ProjectsAPI } from './api/service/project.js'; import { AISuggestionsAPI } from './api/service/ai-suggestions.js'; -import { cacheProvider } from './helpers/cache-provider.js'; +import { cacheProvider } from './helpers/providers/cache-provider.js'; import { CacheService } from './helpers/cache-service.js'; import { PermissionsApi } from './api/service/permissions.js'; import { WorkerTasksController } from './api/service/worker-tasks.js'; +import { loggerMongoProvider, pinoLoggerProvider } from './helpers/providers/index.js'; // const JSON_REQUEST_LIMIT = process.env.JSON_REQUEST_LIMIT || '1mb'; // const RAW_REQUEST_LIMIT = process.env.RAW_REQUEST_LIMIT || '1gb'; @@ -101,7 +102,10 @@ import { WorkerTasksController } from './api/service/worker-tasks.js'; UsersService, cacheProvider, CacheService, - ] + loggerMongoProvider, + pinoLoggerProvider, + ], + exports: [pinoLoggerProvider], }) export class AppModule { configure(consumer: MiddlewareConsumer) { diff --git a/api-gateway/src/app.ts b/api-gateway/src/app.ts index 8bc8e1a711..fc33065903 100644 --- a/api-gateway/src/app.ts +++ b/api-gateway/src/app.ts @@ -4,7 +4,7 @@ import { PolicyEngine } from './helpers/policy-engine.js'; import { WebSocketsService } from './api/service/websockets.js'; import { Users } from './helpers/users.js'; import { Wallet } from './helpers/wallet.js'; -import { LargePayloadContainer, Logger, MessageBrokerChannel } from '@guardian/common'; +import { LargePayloadContainer, MessageBrokerChannel, PinoLogger } from '@guardian/common'; import { TaskManager } from './helpers/task-manager.js'; import { AppModule } from './app.module.js'; import { NestFactory } from '@nestjs/core'; @@ -50,13 +50,14 @@ Promise.all([ errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY })); + const logger: PinoLogger= app.get(PinoLogger); + await app.register(fastifyFormbody); await app.register(fastifyMultipart); app.useBodyParser('json', { bodyLimit: BODY_LIMIT }); app.useBodyParser('binary/octet-stream', { bodyLimit: BODY_LIMIT }); - new Logger().setConnection(cn); await new Guardians().setConnection(cn).init(); await new IPFS().setConnection(cn).init(); await new PolicyEngine().setConnection(cn).init(); @@ -69,7 +70,7 @@ Promise.all([ await new MeecoAuth().registerListeners(); const server = app.getHttpServer(); - const wsService = new WebSocketsService(); + const wsService = new WebSocketsService(logger); wsService.setConnection(server, cn).init(); new TaskManager().setDependencies(wsService, cn); @@ -94,7 +95,7 @@ Promise.all([ new LargePayloadContainer().runServer(); } app.listen(PORT, '0.0.0.0', async () => { - new Logger().info(`Started on ${PORT}`, ['API_GATEWAY']); + await logger.info(`Started on ${PORT}`, ['API_GATEWAY']); }); } catch (error) { console.error(error.message); diff --git a/api-gateway/src/auth/authorization-helper.ts b/api-gateway/src/auth/authorization-helper.ts index f61b8a2dde..43e008864b 100644 --- a/api-gateway/src/auth/authorization-helper.ts +++ b/api-gateway/src/auth/authorization-helper.ts @@ -1,6 +1,6 @@ import { NextFunction, Response } from 'express'; import { Users } from '../helpers/users.js'; -import { AuthenticatedRequest, IAuthUser, Logger } from '@guardian/common'; +import { AuthenticatedRequest, IAuthUser, PinoLogger } from '@guardian/common'; import { createParamDecorator, ExecutionContext, HttpException, HttpStatus, Injectable, NestMiddleware } from '@nestjs/common'; export const AuthUser = createParamDecorator((data: string = 'user', ctx: ExecutionContext) => { @@ -30,8 +30,9 @@ export class PermissionMiddleware implements NestMiddleware { * @param req * @param res * @param next + * @param logger */ -export async function authorizationHelper(req: AuthenticatedRequest, res: Response, next: Function): Promise { +export async function authorizationHelper(req: AuthenticatedRequest, res: Response, next: Function, logger: PinoLogger): Promise { const authHeader = req.headers.authorization; if (!authHeader) { next(); @@ -45,7 +46,7 @@ export async function authorizationHelper(req: AuthenticatedRequest, res: Respon next(); return; } catch (error) { - new Logger().warn(error.message, ['API_GATEWAY']); + await logger.warn(error.message, ['API_GATEWAY']); } } throw new HttpException('Unauthorized', HttpStatus.UNAUTHORIZED) diff --git a/api-gateway/src/constants/index.ts b/api-gateway/src/constants/index.ts index ffab59675b..e6a8eebade 100644 --- a/api-gateway/src/constants/index.ts +++ b/api-gateway/src/constants/index.ts @@ -15,3 +15,5 @@ export { REQUIRED_PROPS as POLICY_REQUIRED_PROPS } from './policy.js'; export { REQUIRED_PROPS as TOOL_REQUIRED_PROPS } from './tool.js'; export { REQUIRED_PROPS as TOKEN_REQUIRED_PROPS } from './token.js'; + +export { DEFAULT as DEFAULT_MONGO, LOGGER_PROVIDER as LOGGER_MONGO_PROVIDER } from './mongo.js'; \ No newline at end of file diff --git a/api-gateway/src/constants/mongo.ts b/api-gateway/src/constants/mongo.ts new file mode 100644 index 0000000000..bdb9bef6d4 --- /dev/null +++ b/api-gateway/src/constants/mongo.ts @@ -0,0 +1,7 @@ +export const DEFAULT = { + MIN_POOL_SIZE: '1', + MAX_POOL_SIZE: '5', + MAX_IDLE_TIME_MS: '30000', +}; + +export const LOGGER_PROVIDER = 'LOGGER_MONGO_PROVIDER'; \ No newline at end of file diff --git a/api-gateway/src/helpers/cache-service.ts b/api-gateway/src/helpers/cache-service.ts index 5a033cb526..7dda65fa3c 100644 --- a/api-gateway/src/helpers/cache-service.ts +++ b/api-gateway/src/helpers/cache-service.ts @@ -1,7 +1,7 @@ import { Inject, Injectable } from '@nestjs/common'; //helpers -import { CACHE_CLIENT, CacheClient } from './cache-provider.js'; +import { CACHE_CLIENT, CacheClient } from './providers/cache-provider.js'; @Injectable() export class CacheService { diff --git a/api-gateway/src/helpers/index.ts b/api-gateway/src/helpers/index.ts index 1c320963f9..dc83746545 100644 --- a/api-gateway/src/helpers/index.ts +++ b/api-gateway/src/helpers/index.ts @@ -1,5 +1,4 @@ export * from './ai-suggestions.js'; -export * from './cache-provider.js'; export * from './cache-service.js'; export * from './guardians.js'; export * from './ipfs.js'; diff --git a/api-gateway/src/helpers/policy-engine.ts b/api-gateway/src/helpers/policy-engine.ts index 517f41b077..bf958924e0 100644 --- a/api-gateway/src/helpers/policy-engine.ts +++ b/api-gateway/src/helpers/policy-engine.ts @@ -260,13 +260,15 @@ export class PolicyEngine extends NatsService { * @param user * @param policyId * @param blockId + * @param params */ public async getBlockData( user: IAuthUser, policyId: string, - blockId: string + blockId: string, + params?: any ): Promise { - return await this.sendMessage(PolicyEngineEvents.GET_BLOCK_DATA, { user, blockId, policyId }); + return await this.sendMessage(PolicyEngineEvents.GET_BLOCK_DATA, { user, blockId, policyId, params }); } /** @@ -274,13 +276,15 @@ export class PolicyEngine extends NatsService { * @param user * @param policyId * @param tag + * @param params */ public async getBlockDataByTag( user: IAuthUser, policyId: string, - tag: string + tag: string, + params?: any ): Promise { - return await this.sendMessage(PolicyEngineEvents.GET_BLOCK_DATA_BY_TAG, { user, tag, policyId }); + return await this.sendMessage(PolicyEngineEvents.GET_BLOCK_DATA_BY_TAG, { user, tag, policyId, params }); } /** @@ -387,18 +391,21 @@ export class PolicyEngine extends NatsService { * @param owner * @param versionOfTopicId * @param metadata + * @param demo */ public async importFile( zip: Buffer, owner: IOwner, versionOfTopicId?: string, - metadata?: PolicyToolMetadata + metadata?: PolicyToolMetadata, + demo?: boolean ): Promise { return await this.sendMessage(PolicyEngineEvents.POLICY_IMPORT_FILE, { zip, owner, versionOfTopicId, metadata, + demo }); } @@ -406,20 +413,22 @@ export class PolicyEngine extends NatsService { * Async load policy file for import * @param zip * @param owner - * @param versionOfTopicId * @param task + * @param versionOfTopicId * @param metadata + * @param demo */ public async importFileAsync( zip: Buffer, owner: IOwner, - versionOfTopicId: string, task: NewTask, - metadata?: PolicyToolMetadata + versionOfTopicId?: string, + metadata?: PolicyToolMetadata, + demo?: boolean ) { return await this.sendMessage( PolicyEngineEvents.POLICY_IMPORT_FILE_ASYNC, - { zip, owner, versionOfTopicId, task, metadata } + { zip, owner, task, versionOfTopicId, metadata, demo } ); } @@ -429,18 +438,18 @@ export class PolicyEngine extends NatsService { * @param owner * @param versionOfTopicId * @param metadata - * @param userId + * @param demo */ public async importMessage( messageId: string, owner: IOwner, - versionOfTopicId: string, + versionOfTopicId?: string, metadata?: PolicyToolMetadata, - userId?: string + demo?: boolean ): Promise { return await this.sendMessage( PolicyEngineEvents.POLICY_IMPORT_MESSAGE, - {messageId, owner, versionOfTopicId, metadata, userId} + { messageId, owner, versionOfTopicId, metadata, demo } ); } @@ -451,19 +460,19 @@ export class PolicyEngine extends NatsService { * @param versionOfTopicId * @param task * @param metadata - * @param userId + * @param demo */ public async importMessageAsync( messageId: string, owner: IOwner, - versionOfTopicId: string, task: NewTask, + versionOfTopicId?: string, metadata?: PolicyToolMetadata, - userId?: string + demo?: boolean ) { return await this.sendMessage( PolicyEngineEvents.POLICY_IMPORT_MESSAGE_ASYNC, - {messageId, owner, versionOfTopicId, task, metadata, userId} + { messageId, owner, versionOfTopicId, task, metadata, demo } ); } @@ -850,4 +859,112 @@ export class PolicyEngine extends NatsService { owner, }) } + + /** + * Add policy test + * @param policyId + * @param zip + * @param owner + */ + public async addPolicyTest( + policyId: string, + file: any, + owner: IOwner + ): Promise { + return await this.sendMessage(PolicyEngineEvents.ADD_POLICY_TEST, { + policyId, + file, + owner + }); + } + + /** + * Start policy test + * @param policyId + * @param testId + * @param owner + */ + public async getPolicyTest( + policyId: string, + testId: string, + owner: IOwner + ): Promise { + return await this.sendMessage(PolicyEngineEvents.GET_POLICY_TEST, { + policyId, + testId, + owner + }); + } + + /** + * Start policy test + * @param policyId + * @param testId + * @param owner + */ + public async startPolicyTest( + policyId: string, + testId: string, + owner: IOwner + ): Promise { + return await this.sendMessage(PolicyEngineEvents.START_POLICY_TEST, { + policyId, + testId, + owner + }); + } + + /** + * Stop policy test + * @param policyId + * @param testId + * @param owner + */ + public async stopPolicyTest( + policyId: string, + testId: string, + owner: IOwner + ): Promise { + return await this.sendMessage(PolicyEngineEvents.STOP_POLICY_TEST, { + policyId, + testId, + owner + }); + } + + /** + * Delete policy test + * @param policyId + * @param testId + * @param owner + */ + public async deletePolicyTest( + policyId: string, + testId: string, + owner: IOwner + ): Promise { + return await this.sendMessage(PolicyEngineEvents.DELETE_POLICY_TEST, { + policyId, + testId, + owner + }); + } + + /** + * Get test details + * @param policyId + * @param testId + * @param owner + */ + public async getTestDetails( + policyId: string, + testId: string, + owner: IOwner + ): Promise { + return await this.sendMessage(PolicyEngineEvents.GET_POLICY_TEST_DETAILS, { + policyId, + testId, + owner + }); + } } diff --git a/api-gateway/src/helpers/cache-provider.ts b/api-gateway/src/helpers/providers/cache-provider.ts similarity index 100% rename from api-gateway/src/helpers/cache-provider.ts rename to api-gateway/src/helpers/providers/cache-provider.ts diff --git a/api-gateway/src/helpers/providers/index.ts b/api-gateway/src/helpers/providers/index.ts new file mode 100644 index 0000000000..84fe69109f --- /dev/null +++ b/api-gateway/src/helpers/providers/index.ts @@ -0,0 +1,3 @@ +export * from './cache-provider.js'; +export * from './logger-mongo-provider.js'; +export * from './pino-logger-provider.js'; \ No newline at end of file diff --git a/api-gateway/src/helpers/providers/logger-mongo-provider.ts b/api-gateway/src/helpers/providers/logger-mongo-provider.ts new file mode 100644 index 0000000000..8550a94151 --- /dev/null +++ b/api-gateway/src/helpers/providers/logger-mongo-provider.ts @@ -0,0 +1,9 @@ +import { mongoForLoggingInitialization } from '@guardian/common'; + +//constants +import { LOGGER_MONGO_PROVIDER } from '#constants'; + +export const loggerMongoProvider = { + provide: LOGGER_MONGO_PROVIDER, + useFactory: async () => mongoForLoggingInitialization() +}; \ No newline at end of file diff --git a/api-gateway/src/helpers/providers/pino-logger-provider.ts b/api-gateway/src/helpers/providers/pino-logger-provider.ts new file mode 100644 index 0000000000..0b9520ba06 --- /dev/null +++ b/api-gateway/src/helpers/providers/pino-logger-provider.ts @@ -0,0 +1,13 @@ +import { MikroORM } from '@mikro-orm/core'; +import { MongoDriver } from '@mikro-orm/mongodb'; + +import { PinoLogger, pinoLoggerInitialization } from '@guardian/common'; + +//constants +import { LOGGER_MONGO_PROVIDER } from '#constants'; + +export const pinoLoggerProvider = { + provide: PinoLogger, + useFactory: (db: MikroORM) => pinoLoggerInitialization(db), + inject: [LOGGER_MONGO_PROVIDER], +}; \ No newline at end of file diff --git a/api-gateway/src/helpers/task-manager.ts b/api-gateway/src/helpers/task-manager.ts index 382e7410e4..082e1f65c8 100644 --- a/api-gateway/src/helpers/task-manager.ts +++ b/api-gateway/src/helpers/task-manager.ts @@ -61,8 +61,8 @@ export class TaskManager { [TaskAction.CREATE_POLICY, 8], [TaskAction.WIZARD_CREATE_POLICY, 8], [TaskAction.PUBLISH_POLICY, 13], - [TaskAction.IMPORT_POLICY_FILE, 10], - [TaskAction.IMPORT_POLICY_MESSAGE, 12], + [TaskAction.IMPORT_POLICY_FILE, 15], + [TaskAction.IMPORT_POLICY_MESSAGE, 17], [TaskAction.PUBLISH_SCHEMA, 8], [TaskAction.IMPORT_SCHEMA_FILE, 3], [TaskAction.IMPORT_SCHEMA_MESSAGE, 3], diff --git a/api-gateway/src/helpers/utils.ts b/api-gateway/src/helpers/utils.ts index 8de87c4019..892328db3b 100644 --- a/api-gateway/src/helpers/utils.ts +++ b/api-gateway/src/helpers/utils.ts @@ -1,6 +1,6 @@ import { HttpException, HttpStatus } from '@nestjs/common'; -import { IAuthUser, Logger } from '@guardian/common'; -import { IOwner, PolicyType, UserRole } from '@guardian/interfaces'; +import { IAuthUser, PinoLogger } from '@guardian/common'; +import { IOwner, PolicyHelper, UserRole } from '@guardian/interfaces'; import { PolicyEngine } from './policy-engine.js'; /** @@ -89,9 +89,10 @@ export const ONLY_SR = ' Only users with the Standard Registry role are allowed /** * Generate HttpException * @param error + * @param logger */ -export async function InternalException(error: HttpException | Error | string) { - await (new Logger()).error(error, ['API_GATEWAY']); +export async function InternalException(error: HttpException | Error | string, logger: PinoLogger) { + await logger.error(error, ['API_GATEWAY']); if (error instanceof HttpException) { throw error; } else if (typeof error === 'string') { @@ -106,9 +107,9 @@ export async function InternalException(error: HttpException | Error | string) { * @param policyId * @param owner */ -export async function checkPolicy(policyId: string, owner: IOwner): Promise { +export async function checkPolicyByRecord(policyId: string, owner: IOwner): Promise { const policy = await (new PolicyEngine().accessPolicy(policyId, owner, 'read')); - if (policy.status !== PolicyType.DRY_RUN) { + if (!PolicyHelper.isDryRunMode(policy)) { throw new HttpException('Invalid status.', HttpStatus.FORBIDDEN) } return policy; diff --git a/api-gateway/src/middlewares/validation/schemas/policies.dto.ts b/api-gateway/src/middlewares/validation/schemas/policies.dto.ts index 48600714a6..450a651a9d 100644 --- a/api-gateway/src/middlewares/validation/schemas/policies.dto.ts +++ b/api-gateway/src/middlewares/validation/schemas/policies.dto.ts @@ -1,9 +1,111 @@ import { ApiExtraModels, ApiProperty } from '@nestjs/swagger'; -import { IsArray, IsBoolean, IsObject, IsOptional, IsString } from 'class-validator'; -import { PolicyType } from '@guardian/interfaces'; +import { IsArray, IsBoolean, IsNumber, IsObject, IsOptional, IsString } from 'class-validator'; +import { PolicyType, PolicyTestStatus } from '@guardian/interfaces'; import { Examples } from '../examples.js'; import { ValidationErrorsDTO } from './blocks.js'; +export class PolicyTestDTO { + @ApiProperty({ + type: 'string', + description: 'Test ID', + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + id?: string; + + @ApiProperty({ + type: 'string', + description: 'Test UUID', + example: Examples.UUID + }) + @IsOptional() + @IsString() + uuid?: string; + + @ApiProperty({ + type: 'string', + description: 'Test Name', + example: 'Test Name' + }) + @IsOptional() + @IsString() + name?: string; + + @ApiProperty({ + type: 'string', + description: 'Policy ID', + example: Examples.DB_ID + }) + @IsOptional() + @IsString() + policyId?: string; + + @ApiProperty({ + type: 'string', + description: 'Test owner', + example: Examples.DID + }) + @IsOptional() + @IsString() + owner?: string; + + @ApiProperty({ + type: 'string', + description: 'Test status', + enum: PolicyTestStatus, + example: PolicyTestStatus.New + }) + @IsOptional() + @IsString() + status?: string; + + @ApiProperty({ + type: 'string', + description: 'Last start date', + example: Examples.DATE + }) + @IsOptional() + @IsString() + date?: string; + + @ApiProperty({ + type: 'string', + description: 'Test duration', + example: 0 + }) + @IsOptional() + @IsNumber() + duration?: number; + + @ApiProperty({ + type: 'string', + description: 'Test progress', + example: 0 + }) + @IsOptional() + @IsNumber() + progress?: number; + + @ApiProperty({ + type: 'string', + description: 'Test result', + example: Examples.UUID + }) + @IsOptional() + @IsString() + resultId?: string; + + @ApiProperty({ + type: 'string', + description: 'Test result', + }) + @IsOptional() + @IsObject() + result?: any; +} + +@ApiExtraModels(PolicyTestDTO) export class PolicyDTO { @ApiProperty({ type: 'string', @@ -261,6 +363,14 @@ export class PolicyDTO { @IsOptional() @IsString() projectSchema?: string; + + @ApiProperty({ + type: () => PolicyTestDTO, + isArray: true + }) + @IsOptional() + @IsArray() + tests?: PolicyTestDTO[]; } @ApiExtraModels(PolicyDTO) @@ -371,4 +481,4 @@ export class PolicyCategoryDTO { }) @IsString() type: string; -} \ No newline at end of file +} diff --git a/api-tests/package.json b/api-tests/package.json index 3c3762dec4..cc6ec94205 100644 --- a/api-tests/package.json +++ b/api-tests/package.json @@ -1,6 +1,6 @@ { "name": "api-tests", - "version": "2.26.2", + "version": "2.27.0", "description": "API Tests", "main": "index.js", "type": "module", diff --git a/auth-service/configs/.env.auth b/auth-service/configs/.env.auth index 68d24acf78..8fa67b399c 100644 --- a/auth-service/configs/.env.auth +++ b/auth-service/configs/.env.auth @@ -43,7 +43,18 @@ HASHICORP_ENCRIPTION_ALG="sha512" ACCESS_TOKEN_UPDATE_INTERVAL=60000 REFRESH_TOKEN_UPDATE_INTERVAL=31536000000 -# Mongo init +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/auth-service/configs/.env.auth.develop b/auth-service/configs/.env.auth.develop index 24d853bfea..5ef21c262c 100644 --- a/auth-service/configs/.env.auth.develop +++ b/auth-service/configs/.env.auth.develop @@ -42,7 +42,18 @@ AZURE_VAULT_NAME=guardianVault ACCESS_TOKEN_UPDATE_INTERVAL=60000 REFRESH_TOKEN_UPDATE_INTERVAL=31536000000 -# Mongo init +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" \ No newline at end of file +MAX_IDLE_TIME_MS="30000" diff --git a/auth-service/configs/.env.auth.template b/auth-service/configs/.env.auth.template index a1d4758c79..26318c154e 100644 --- a/auth-service/configs/.env.auth.template +++ b/auth-service/configs/.env.auth.template @@ -42,7 +42,18 @@ AZURE_VAULT_NAME= ACCESS_TOKEN_UPDATE_INTERVAL=60000 REFRESH_TOKEN_UPDATE_INTERVAL=31536000000 -# Mongo init -MIN_POOL_SIZE="1" -MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" \ No newline at end of file +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/auth-service/environments/environment.prod.ts b/auth-service/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/auth-service/environments/environment.prod.ts +++ b/auth-service/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/auth-service/package.json b/auth-service/package.json index b8334cc333..c1bbae79b4 100644 --- a/auth-service/package.json +++ b/auth-service/package.json @@ -10,8 +10,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@meeco/cryppo": "^2.0.2", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", @@ -79,5 +79,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/auth-service/src/api/account-service.ts b/auth-service/src/api/account-service.ts index 54e2c3ecfc..35e768b08a 100644 --- a/auth-service/src/api/account-service.ts +++ b/auth-service/src/api/account-service.ts @@ -5,7 +5,7 @@ import { User } from '../entity/user.js'; import { DynamicRole } from '../entity/dynamic-role.js'; import * as util from 'util'; import crypto from 'crypto'; -import { DataBaseHelper, Logger, MessageError, MessageResponse, NatsService, ProviderAuthUser, SecretManager, Singleton } from '@guardian/common'; +import { DataBaseHelper, MessageError, MessageResponse, NatsService, PinoLogger, ProviderAuthUser, SecretManager, Singleton } from '@guardian/common'; import { AuditDefaultPermission, AuthEvents, @@ -115,7 +115,7 @@ export class AccountService extends NatsService { /** * Register listeners */ - registerListeners(): void { + registerListeners(logger: PinoLogger): void { /** * Get user by access token @@ -148,7 +148,7 @@ export class AccountService extends NatsService { const user = await new DataBaseHelper(User).findOne({ did }) return new MessageResponse(setDefaultPermissions(user)); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -163,7 +163,7 @@ export class AccountService extends NatsService { const user = await new DataBaseHelper(User).findOne({ username }) return new MessageResponse(setDefaultPermissions(user)); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -178,7 +178,7 @@ export class AccountService extends NatsService { const user = await new DataBaseHelper(User).findOne({ hederaAccountId: account }) return new MessageResponse(setDefaultPermissions(user)); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -194,7 +194,7 @@ export class AccountService extends NatsService { const user = await new DataBaseHelper(User).findOne({ providerId, provider }) return new MessageResponse(setDefaultPermissions(user)); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -208,7 +208,7 @@ export class AccountService extends NatsService { const { did } = msg; return new MessageResponse(await new DataBaseHelper(User).find({ parent: did })); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -222,7 +222,7 @@ export class AccountService extends NatsService { try { return new MessageResponse(await new DataBaseHelper(User).find({ did: { $in: dids } })); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -236,7 +236,7 @@ export class AccountService extends NatsService { try { return new MessageResponse(await new DataBaseHelper(User).find({ role })); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -255,7 +255,7 @@ export class AccountService extends NatsService { })); return new MessageResponse(userAccounts); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -273,7 +273,7 @@ export class AccountService extends NatsService { })); return new MessageResponse(userAccounts); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -293,7 +293,7 @@ export class AccountService extends NatsService { })); return new MessageResponse(userAccounts); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -322,7 +322,7 @@ export class AccountService extends NatsService { return new MessageResponse(getRequiredProps(user, REGISTER_REQUIRED_PROPS)); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error) } }); @@ -342,7 +342,7 @@ export class AccountService extends NatsService { const user = await (new DataBaseHelper(User)).save(row); return new MessageResponse(user); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error) } }); @@ -378,7 +378,7 @@ export class AccountService extends NatsService { accessToken }) } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error) } }); @@ -418,7 +418,7 @@ export class AccountService extends NatsService { } } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -474,7 +474,7 @@ export class AccountService extends NatsService { const result = await new DataBaseHelper(User).update(user); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -484,7 +484,7 @@ export class AccountService extends NatsService { try { return new MessageResponse(await new DataBaseHelper(User).save(user)); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -532,7 +532,7 @@ export class AccountService extends NatsService { const [items, count] = await new DataBaseHelper(User).findAndCount(options, otherOptions); return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/auth-service/src/api/meeco-service.ts b/auth-service/src/api/meeco-service.ts index 19fb0ce8a2..999792a313 100644 --- a/auth-service/src/api/meeco-service.ts +++ b/auth-service/src/api/meeco-service.ts @@ -1,240 +1,241 @@ -import { DataBaseHelper, MessageResponse, NatsService, Singleton, Vc, VerifiableCredential } from '@guardian/common'; +import { DataBaseHelper, MessageResponse, NatsService, PinoLogger, Singleton, Vc, VerifiableCredential } from '@guardian/common'; import { AuthEvents, ExternalProviders, GenerateUUIDv4 } from '@guardian/interfaces'; import { MeecoService } from '../meeco/meeco.service.js'; -import { Logger } from '@nestjs/common'; import { MeecoIssuerWhitelist } from '../entity/meeco-issuer-whitelist.js'; const MeecoConfig = { - baseUrl: process.env.MEECO_BASE_URL, - oauth: { - url: process.env.MEECO_OAUTH_URL, - clientId: process.env.MEECO_OAUTH_CLIENT_ID, - clientSecret: process.env.MEECO_OAUTH_SECRET_ID, - scope: process.env.MEECO_OAUTH_SCOPE, - grantType: process.env.MEECO_OAUTH_GRANT_TYPE, - }, - meecoOrganizationId: process.env.MEECO_ORGANIZATION_ID, -} + baseUrl: process.env.MEECO_BASE_URL, + oauth: { + url: process.env.MEECO_OAUTH_URL, + clientId: process.env.MEECO_OAUTH_CLIENT_ID, + clientSecret: process.env.MEECO_OAUTH_SECRET_ID, + scope: process.env.MEECO_OAUTH_SCOPE, + grantType: process.env.MEECO_OAUTH_GRANT_TYPE, + }, + meecoOrganizationId: process.env.MEECO_ORGANIZATION_ID, +}; const MeecoPassphrase = process.env.MEECO_PASSPHRASE; @Singleton export class MeecoAuthService extends NatsService { - private readonly logger = new Logger('MeecoAuthService'); - - /** - * Message queue name - */ - public messageQueueName = 'meeco-auth-queue'; - - /** - * Reply subject - * @private - */ - public replySubject = 'meeco-auth-queue-reply-' + GenerateUUIDv4(); - - /** - * Meeco service instance - */ - meecoService: MeecoService; - - constructor() { - super(); - this.migrateMeecoIssuerWhitelist().then(); - this.meecoService = new MeecoService(MeecoConfig, MeecoPassphrase); - } - - async migrateMeecoIssuerWhitelist(): Promise { - if (!process.env.MEECO_ISSUER_ORGANIZATION_ID || !process.env.MEECO_ISSUER_ORGANIZATION_NAME) { - console.log('MEECO_ISSUER_ORGANIZATION_ID and/or MEECO_ISSUER_ORGANIZATION_NAME are not set'); - return; - } - - const issuerWhitelistRepository = new DataBaseHelper(MeecoIssuerWhitelist); - const issuerWhitelist = await issuerWhitelistRepository.findOne({ - issuerId: process.env.MEECO_ISSUER_ORGANIZATION_ID, name: process.env.MEECO_ISSUER_ORGANIZATION_NAME }); - - if (!issuerWhitelist) { - const _issuerWhitelist = new MeecoIssuerWhitelist(); - _issuerWhitelist.issuerId = process.env.MEECO_ISSUER_ORGANIZATION_ID; - _issuerWhitelist.name = process.env.MEECO_ISSUER_ORGANIZATION_NAME; - issuerWhitelistRepository.save(_issuerWhitelist); - } - } - /** - * Register listeners - */ - registerListeners(): void { /** - * Subscribe to MEECO_AUTH_START event - * Request a new VP presentation request from Meeco and return the redirect URI + * Message queue name */ - this.getMessages(AuthEvents.MEECO_AUTH_START, async (msg) => { - // generate a random UUID as the request name - const requestName = GenerateUUIDv4(); - - const clientDID = process.env.MEECO_ISSUER_ORGANIZATION_ID; - const clientName = process.env.MEECO_ISSUER_ORGANIZATION_NAME; - const presentationDefinitionId = process.env.MEECO_PRESENTATION_DEFINITION_ID; - - try { - // create a new VP presentation request from Meeco - const vpRequest = await this.meecoService.createPresentationRequest( - requestName, - clientDID, - clientName, - presentationDefinitionId, - ); - - // sign the VP request token - const signVPRequest = await this.meecoService.signPresentationRequestToken(vpRequest.presentation_request.id, vpRequest.presentation_request.tokens.unsigned_request_jwt); - const redirectUri = await this.meecoService.getVPSubmissionRedirectUri(signVPRequest.presentation_request.id); - - // start polling for VP submission - await this.getVPSubmissions(signVPRequest.presentation_request.id, msg.cid); - - // return the redirect URI to client - return new MessageResponse({redirectUri, cid: msg.cid}); - } catch(ex) { - // return the error to client - this.logger.error(ex.message, ex.stack); - return new MessageResponse({error: ex.message, cid: msg.cid}); - } - }); + public messageQueueName = 'meeco-auth-queue'; /** - * Subscribe to MEECO_APPROVE_SUBMISSION event from user - * Approves the VP presented by user - * @param msg + * Reply subject + * @private */ - this.getMessages(AuthEvents.MEECO_APPROVE_SUBMISSION, async (msg: any) => { - const vpRequest = await this.meecoService.approveVPSubmission(msg.presentation_request_id, msg.submission_id, true); - return new MessageResponse({vpRequest, cid: msg.cid, role: msg.role}); - }); + public replySubject = 'meeco-auth-queue-reply-' + GenerateUUIDv4(); /** - * Subscribe to MEECO_APPROVE_SUBMISSION event from user - * Verify the VP presented by user - * @param msg + * Meeco service instance */ - this.getMessages(AuthEvents.MEECO_REJECT_SUBMISSION, async (msg: any) => { - const vpRequest = await this.meecoService.approveVPSubmission(msg.presentation_request_id, msg.submission_id, false); - return new MessageResponse({vpRequest, cid: msg.cid}); - }); - } - - /** - * getVPSubmission Queries the Meeco API for the Verifiable Presentation Submission if submitted by user. - * @param requestId presentation request id - * @param cid client connection id - */ - private async getVPSubmissions(requestId: string, cid: string): Promise { - // poll for VP submission for 60 seconds every 3 seconds - let userProviderFound; - let maxIterations = 20; - const interval = setInterval(async () => { - try { - const submissions = await this.meecoService.getVPSubmissions(requestId); - - if (submissions.submissions.length > 0) { - const { id: submissionId, id_token, vp_token, presentation_request_id } = submissions.submissions[0]; - - await this.verifyVP(vp_token); - - const verified = await this.meecoService.verifyVP(id_token, requestId, vp_token); - if (!verified) { - throw new Error('VP verification failed by Meeco'); - } - - const verifiableCredential: VerifiableCredential = this.meecoService.decodeVPToken(vp_token); - const { success, message } = await this.validateCredentials(verifiableCredential.vc); - if (!success) { - throw new Error(message); - } - - if (!userProviderFound) { - userProviderFound = await this.sendMessage( - AuthEvents.GET_USER_BY_PROVIDER_USER_DATA, - { - providerId: verifiableCredential.vc.credentialSubject.id, - provider: ExternalProviders.MEECO, - } - ); - } - - this.sendMessage( - AuthEvents.MEECO_VERIFY_VP, - { - vc: verifiableCredential.vc.credentialSubject, - presentation_request_id, - submission_id: submissionId, - cid, - role: userProviderFound?.role || null, - } - ); - clearInterval(interval); + meecoService: MeecoService; + + constructor() { + super(); + this.migrateMeecoIssuerWhitelist().then(); + this.meecoService = new MeecoService(MeecoConfig, MeecoPassphrase); + } + + async migrateMeecoIssuerWhitelist(): Promise { + if (!process.env.MEECO_ISSUER_ORGANIZATION_ID || !process.env.MEECO_ISSUER_ORGANIZATION_NAME) { + console.log('MEECO_ISSUER_ORGANIZATION_ID and/or MEECO_ISSUER_ORGANIZATION_NAME are not set'); + return; + } + + const issuerWhitelistRepository = new DataBaseHelper(MeecoIssuerWhitelist); + const issuerWhitelist = await issuerWhitelistRepository.findOne({ + issuerId: process.env.MEECO_ISSUER_ORGANIZATION_ID, name: process.env.MEECO_ISSUER_ORGANIZATION_NAME, + }); + + if (!issuerWhitelist) { + const _issuerWhitelist = new MeecoIssuerWhitelist(); + _issuerWhitelist.issuerId = process.env.MEECO_ISSUER_ORGANIZATION_ID; + _issuerWhitelist.name = process.env.MEECO_ISSUER_ORGANIZATION_NAME; + issuerWhitelistRepository.save(_issuerWhitelist); } - } catch (ex) { - this.logger.error(ex); - clearInterval(interval); - this.sendMessage( - AuthEvents.MEECO_VERIFY_VP_FAILED, - { - error: ex.message, - cid, - } - ); - } - - maxIterations--; - if (maxIterations === 0) { - clearInterval(interval); - this.sendMessage( - AuthEvents.MEECO_VERIFY_VP_FAILED, - { - error: 'VP submission timeout', - cid, - } - ); - } - }, 3000) - } - - async verifyVP(vpToken: string) { - const verifiableCredential = this.meecoService.decodeVPToken(vpToken); - if (new Date(verifiableCredential.vc.expirationDate).getTime() < Date.now()) { - throw new Error('VP expired'); } - const { id: issuerId, name: issuerName } = verifiableCredential.vc.issuer; - const issuerWhitelistRepository = new DataBaseHelper(MeecoIssuerWhitelist); - const issuerWhitelist = await issuerWhitelistRepository.findOne({ issuerId, name: issuerName }); - if (!issuerWhitelist) { - throw new Error(`Issuer ${issuerName} is not whitelisted`); + /** + * Register listeners + * @param logger + */ + registerListeners(logger: PinoLogger): void { + /** + * Subscribe to MEECO_AUTH_START event + * Request a new VP presentation request from Meeco and return the redirect URI + */ + this.getMessages(AuthEvents.MEECO_AUTH_START, async (msg) => { + // generate a random UUID as the request name + const requestName = GenerateUUIDv4(); + + const clientDID = process.env.MEECO_ISSUER_ORGANIZATION_ID; + const clientName = process.env.MEECO_ISSUER_ORGANIZATION_NAME; + const presentationDefinitionId = process.env.MEECO_PRESENTATION_DEFINITION_ID; + + try { + // create a new VP presentation request from Meeco + const vpRequest = await this.meecoService.createPresentationRequest( + requestName, + clientDID, + clientName, + presentationDefinitionId, + ); + + // sign the VP request token + const signVPRequest = await this.meecoService.signPresentationRequestToken(vpRequest.presentation_request.id, vpRequest.presentation_request.tokens.unsigned_request_jwt); + const redirectUri = await this.meecoService.getVPSubmissionRedirectUri(signVPRequest.presentation_request.id); + + // start polling for VP submission + await this.getVPSubmissions(signVPRequest.presentation_request.id, msg.cid, logger); + + // return the redirect URI to client + return new MessageResponse({ redirectUri, cid: msg.cid }); + } catch (ex) { + // return the error to client + await logger.error(ex.message, ex.stack); + return new MessageResponse({ error: ex.message, cid: msg.cid }); + } + }); + + /** + * Subscribe to MEECO_APPROVE_SUBMISSION event from user + * Approves the VP presented by user + * @param msg + */ + this.getMessages(AuthEvents.MEECO_APPROVE_SUBMISSION, async (msg: any) => { + const vpRequest = await this.meecoService.approveVPSubmission(msg.presentation_request_id, msg.submission_id, true); + return new MessageResponse({ vpRequest, cid: msg.cid, role: msg.role }); + }); + + /** + * Subscribe to MEECO_APPROVE_SUBMISSION event from user + * Verify the VP presented by user + * @param msg + */ + this.getMessages(AuthEvents.MEECO_REJECT_SUBMISSION, async (msg: any) => { + const vpRequest = await this.meecoService.approveVPSubmission(msg.presentation_request_id, msg.submission_id, false); + return new MessageResponse({ vpRequest, cid: msg.cid }); + }); } - } - async validateCredentials(vc: Vc): Promise<{success: boolean; message?: string}> { - if (vc.expirationDate && this.isCredentialExpired(vc.expirationDate)) { - return { success: false, message: 'Credentials expired' }; + /** + * getVPSubmission Queries the Meeco API for the Verifiable Presentation Submission if submitted by user. + * @param requestId presentation request id + * @param cid client connection id + * @param logger pino logger + */ + private async getVPSubmissions(requestId: string, cid: string, logger: PinoLogger): Promise { + // poll for VP submission for 60 seconds every 3 seconds + let userProviderFound; + let maxIterations = 20; + const interval = setInterval(async () => { + try { + const submissions = await this.meecoService.getVPSubmissions(requestId); + + if (submissions.submissions.length > 0) { + const { id: submissionId, id_token, vp_token, presentation_request_id } = submissions.submissions[0]; + + await this.verifyVP(vp_token); + + const verified = await this.meecoService.verifyVP(id_token, requestId, vp_token); + if (!verified) { + throw new Error('VP verification failed by Meeco'); + } + + const verifiableCredential: VerifiableCredential = this.meecoService.decodeVPToken(vp_token); + const { success, message } = await this.validateCredentials(verifiableCredential.vc); + if (!success) { + throw new Error(message); + } + + if (!userProviderFound) { + userProviderFound = await this.sendMessage( + AuthEvents.GET_USER_BY_PROVIDER_USER_DATA, + { + providerId: verifiableCredential.vc.credentialSubject.id, + provider: ExternalProviders.MEECO, + }, + ); + } + + this.sendMessage( + AuthEvents.MEECO_VERIFY_VP, + { + vc: verifiableCredential.vc.credentialSubject, + presentation_request_id, + submission_id: submissionId, + cid, + role: userProviderFound?.role || null, + }, + ); + clearInterval(interval); + } + } catch (ex) { + await logger.error(ex); + clearInterval(interval); + this.sendMessage( + AuthEvents.MEECO_VERIFY_VP_FAILED, + { + error: ex.message, + cid, + }, + ); + } + + maxIterations--; + if (maxIterations === 0) { + clearInterval(interval); + this.sendMessage( + AuthEvents.MEECO_VERIFY_VP_FAILED, + { + error: 'VP submission timeout', + cid, + }, + ); + } + }, 3000); } - if (vc.credentialStatus) { - return await this.meecoService.validateCredentials(vc); + async verifyVP(vpToken: string) { + const verifiableCredential = this.meecoService.decodeVPToken(vpToken); + if (new Date(verifiableCredential.vc.expirationDate).getTime() < Date.now()) { + throw new Error('VP expired'); + } + + const { id: issuerId, name: issuerName } = verifiableCredential.vc.issuer; + const issuerWhitelistRepository = new DataBaseHelper(MeecoIssuerWhitelist); + const issuerWhitelist = await issuerWhitelistRepository.findOne({ issuerId, name: issuerName }); + if (!issuerWhitelist) { + throw new Error(`Issuer ${issuerName} is not whitelisted`); + } } - return { success: true }; - } + async validateCredentials(vc: Vc): Promise<{ success: boolean; message?: string }> { + if (vc.expirationDate && this.isCredentialExpired(vc.expirationDate)) { + return { success: false, message: 'Credentials expired' }; + } + + if (vc.credentialStatus) { + return await this.meecoService.validateCredentials(vc); + } - isCredentialExpired(expirationDate: string): boolean { - const currentDate = new Date(); - const timestamp = Date.parse(expirationDate); - if (isNaN(timestamp)) { - throw new Error('Invalid expiration date from Meeco API credentials'); + return { success: true }; } - const expiresIn = new Date(expirationDate); - return currentDate > expiresIn - } + isCredentialExpired(expirationDate: string): boolean { + const currentDate = new Date(); + const timestamp = Date.parse(expirationDate); + if (isNaN(timestamp)) { + throw new Error('Invalid expiration date from Meeco API credentials'); + } + + const expiresIn = new Date(expirationDate); + return currentDate > expiresIn; + } } diff --git a/auth-service/src/api/role-service.ts b/auth-service/src/api/role-service.ts index d6ae6d7cf9..13d4ac3685 100644 --- a/auth-service/src/api/role-service.ts +++ b/auth-service/src/api/role-service.ts @@ -1,4 +1,4 @@ -import { DataBaseHelper, Logger, MessageError, MessageResponse, NatsService, Singleton } from '@guardian/common'; +import { DataBaseHelper, MessageError, MessageResponse, NatsService, PinoLogger, Singleton } from '@guardian/common'; import { AuthEvents, GenerateUUIDv4, IGroup, IOwner, PermissionsArray } from '@guardian/interfaces'; import { DynamicRole } from '../entity/dynamic-role.js'; import { User } from '../entity/user.js'; @@ -99,7 +99,7 @@ export class RoleService extends NatsService { /** * Register listeners */ - registerListeners(): void { + registerListeners(logger: PinoLogger): void { /** * Get permissions * @@ -109,7 +109,7 @@ export class RoleService extends NatsService { try { return new MessageResponse(permissionList); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -178,7 +178,7 @@ export class RoleService extends NatsService { return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -212,7 +212,7 @@ export class RoleService extends NatsService { item = await new DataBaseHelper(DynamicRole).save(item); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -247,7 +247,7 @@ export class RoleService extends NatsService { const result = await new DataBaseHelper(DynamicRole).update(item); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -269,7 +269,7 @@ export class RoleService extends NatsService { const item = await new DataBaseHelper(DynamicRole).findOne({ id }); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -298,7 +298,7 @@ export class RoleService extends NatsService { await new DataBaseHelper(DynamicRole).remove(item); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -325,7 +325,7 @@ export class RoleService extends NatsService { const result = items.find((role) => role.default); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -374,7 +374,7 @@ export class RoleService extends NatsService { const result = await new DataBaseHelper(User).update(target); return new MessageResponse(getRequiredProps(result, USER_REQUIRED_PROPS)); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -440,7 +440,7 @@ export class RoleService extends NatsService { const result = await new DataBaseHelper(User).update(target); return new MessageResponse(getRequiredProps(result, USER_REQUIRED_PROPS)); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -484,7 +484,7 @@ export class RoleService extends NatsService { const result = users?.map((row) => getRequiredProps(row, USER_REQUIRED_PROPS)); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -559,7 +559,7 @@ export class RoleService extends NatsService { await new DataBaseHelper(User).update(target); return new MessageResponse(getRequiredProps(target, USER_REQUIRED_PROPS)); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -574,7 +574,7 @@ export class RoleService extends NatsService { const user = await new DataBaseHelper(User).findOne({ username }) return new MessageResponse(getRequiredProps(user, USER_REQUIRED_PROPS)); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); diff --git a/auth-service/src/api/wallet-service.ts b/auth-service/src/api/wallet-service.ts index 93329169aa..7ca4e83c2b 100644 --- a/auth-service/src/api/wallet-service.ts +++ b/auth-service/src/api/wallet-service.ts @@ -1,5 +1,5 @@ import { User } from '../entity/user.js'; -import { DataBaseHelper, Logger, MessageError, MessageResponse, NatsService, Singleton, } from '@guardian/common'; +import { DataBaseHelper, MessageError, MessageResponse, NatsService, PinoLogger, Singleton } from '@guardian/common'; import { GenerateUUIDv4, IGetGlobalApplicationKey, IGetKeyMessage, IGetKeyResponse, ISetGlobalApplicationKey, ISetKeyMessage, WalletEvents } from '@guardian/interfaces'; import { IVault } from '../vaults/index.js'; @@ -38,7 +38,7 @@ export class WalletService extends NatsService { /** * Register listeners */ - registerListeners(): void { + registerListeners(logger: PinoLogger): void { this.getMessages(WalletEvents.GET_KEY, async (msg) => { const { token, type, key } = msg; @@ -46,7 +46,7 @@ export class WalletService extends NatsService { const value = await this.vault.getKey(token, type, key); return new MessageResponse({ key: value }); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error) } }); @@ -58,7 +58,7 @@ export class WalletService extends NatsService { await this.vault.setKey(token, type, key, value); return new MessageResponse(null); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -74,7 +74,7 @@ export class WalletService extends NatsService { const value = await this.vault.getKey(user.walletToken, type, key); return new MessageResponse({ key: value }); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error) } }); @@ -90,7 +90,7 @@ export class WalletService extends NatsService { await this.vault.setKey(user.walletToken, type, key, value); return new MessageResponse(null); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -102,7 +102,7 @@ export class WalletService extends NatsService { const key = await this.vault.getGlobalApplicationKey(type); return new MessageResponse({key}); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); @@ -114,7 +114,7 @@ export class WalletService extends NatsService { await this.vault.setGlobalApplicationKey(type, key); return new MessageResponse(null); } catch (error) { - new Logger().error(error, ['AUTH_SERVICE']); + await logger.error(error, ['AUTH_SERVICE']); return new MessageError(error); } }); diff --git a/auth-service/src/app.ts b/auth-service/src/app.ts index e5ca6fdae6..3749ffe27d 100644 --- a/auth-service/src/app.ts +++ b/auth-service/src/app.ts @@ -1,6 +1,19 @@ import { AccountService } from './api/account-service.js'; import { WalletService } from './api/wallet-service.js'; -import { ApplicationState, COMMON_CONNECTION_CONFIG, DataBaseHelper, LargePayloadContainer, Logger, MessageBrokerChannel, Migration, OldSecretManager, SecretManager } from '@guardian/common'; +import { + ApplicationState, + COMMON_CONNECTION_CONFIG, + DataBaseHelper, + LargePayloadContainer, + MessageBrokerChannel, + Migration, + mongoForLoggingInitialization, + OldSecretManager, + PinoLogger, + pinoLoggerInitialization, + SecretManager, + ValidateConfiguration, +} from '@guardian/common'; import { ApplicationStates } from '@guardian/interfaces'; import { MikroORM } from '@mikro-orm/core'; import { MongoDriver } from '@mikro-orm/mongodb'; @@ -20,7 +33,7 @@ Promise.all([ ...COMMON_CONNECTION_CONFIG, migrations: { path: 'dist/migrations', - transactional: false + transactional: false, }, }), MikroORM.init({ @@ -28,8 +41,8 @@ Promise.all([ driverOptions: { useUnifiedTopology: true, minPoolSize: parseInt(process.env.MIN_POOL_SIZE ?? DEFAULT_MONGO.MIN_POOL_SIZE, 10), - maxPoolSize: parseInt(process.env.MAX_POOL_SIZE ?? DEFAULT_MONGO.MAX_POOL_SIZE, 10), - maxIdleTimeMS: parseInt(process.env.MAX_IDLE_TIME_MS ?? DEFAULT_MONGO.MAX_IDLE_TIME_MS, 10) + maxPoolSize: parseInt(process.env.MAX_POOL_SIZE ?? DEFAULT_MONGO.MAX_POOL_SIZE, 10), + maxIdleTimeMS: parseInt(process.env.MAX_IDLE_TIME_MS ?? DEFAULT_MONGO.MAX_IDLE_TIME_MS, 10), }, ensureIndexes: true, }), @@ -44,61 +57,81 @@ Promise.all([ ], }, }), - InitializeVault(process.env.VAULT_PROVIDER) -]).then(async ([_, db, cn, app, vault]) => { + InitializeVault(process.env.VAULT_PROVIDER), + mongoForLoggingInitialization(), +]).then(async ([_, db, cn, app, vault, loggerMongo]) => { DataBaseHelper.orm = db; const state = new ApplicationState(); await state.setServiceName('AUTH_SERVICE').setConnection(cn).init(); - state.updateState(ApplicationStates.INITIALIZING); - try { - if (!ApplicationEnvironment.demoMode) { - import('./helpers/fixtures.demo.js').then(async (module) => { - await module.fixtures(); - }); - } - // Include accounts for demo builds only - if (ApplicationEnvironment.demoMode) { - import('./helpers/fixtures.demo.js').then(async (module) => { - await module.fixtures(); - }); - } + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); + state.updateState(ApplicationStates.INITIALIZING); + try { app.listen(); - new Logger().setConnection(cn); await new AccountService().setConnection(cn).init(); - new AccountService().registerListeners(); + new AccountService().registerListeners(logger); await new WalletService().setConnection(cn).init(); new WalletService().registerVault(vault); - new WalletService().registerListeners(); + new WalletService().registerListeners(logger); await new RoleService().setConnection(cn).init(); - new RoleService().registerListeners(); + new RoleService().registerListeners(logger); + + const validator = new ValidateConfiguration(); if (parseInt(process.env.MEECO_AUTH_PROVIDER_ACTIVE, 10)) { await new MeecoAuthService().setConnection(cn).init(); - new MeecoAuthService().registerListeners(); + new MeecoAuthService().registerListeners(logger); } if (process.env.IMPORT_KEYS_FROM_DB) { - await ImportKeysFromDatabase(vault); + await ImportKeysFromDatabase(vault, logger); } await new OldSecretManager().setConnection(cn).init(); - const secretManager = SecretManager.New(); - let { ACCESS_TOKEN_SECRET } = await secretManager.getSecrets('secretkey/auth'); - if (!ACCESS_TOKEN_SECRET) { - ACCESS_TOKEN_SECRET = process.env.ACCESS_TOKEN_SECRET; - await secretManager.setSecrets('secretkey/auth', { ACCESS_TOKEN_SECRET }); - } - state.updateState(ApplicationStates.READY); - const maxPayload = parseInt(process.env.MQ_MAX_PAYLOAD, 10); - if (Number.isInteger(maxPayload)) { - new LargePayloadContainer().runServer(); - } - new Logger().info('auth service started', ['AUTH_SERVICE']); + validator.setValidator(async () => { + if (!ApplicationEnvironment.demoMode) { + if (!process.env.SR_INITIAL_PASSWORD) { + console.log('Empty SR_INITIAL_PASSWORD setting'); + return false; + } + if (process.env.SR_INITIAL_PASSWORD.length < 6) { + console.log('SR_INITIAL_PASSWORD length is less than 6'); + return false; + } + } + const secretManager = SecretManager.New(); + let { ACCESS_TOKEN_SECRET } = await secretManager.getSecrets('secretkey/auth'); + if (!ACCESS_TOKEN_SECRET) { + ACCESS_TOKEN_SECRET = process.env.ACCESS_TOKEN_SECRET; + await secretManager.setSecrets('secretkey/auth', { ACCESS_TOKEN_SECRET }); + } + return true; + }) + + validator.setValidAction(async () => { + import( + `./helpers/fixtures${ + ApplicationEnvironment.demoMode ? '.demo' : '' + }.js` + ).then(async (module) => { + await module.fixtures(); + }); + state.updateState(ApplicationStates.READY); + const maxPayload = parseInt(process.env.MQ_MAX_PAYLOAD, 10); + if (Number.isInteger(maxPayload)) { + new LargePayloadContainer().runServer(); + } + await logger.info('auth service started', ['AUTH_SERVICE']); + }) + validator.setInvalidAction(async () => { + await state.updateState(ApplicationStates.BAD_CONFIGURATION); + await logger.error('Auth service not configured', ['AUTH_SERVICE']); + }) + await validator.validate(); } catch (error) { console.error(error.message); process.exit(1); diff --git a/auth-service/src/config.ts b/auth-service/src/config.ts index 7a5152a61b..85980ceb8f 100644 --- a/auth-service/src/config.ts +++ b/auth-service/src/config.ts @@ -22,4 +22,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false'){ } } } -console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/auth-service/src/helpers/fixtures.ts b/auth-service/src/helpers/fixtures.ts index 896f0e8105..778091d049 100644 --- a/auth-service/src/helpers/fixtures.ts +++ b/auth-service/src/helpers/fixtures.ts @@ -9,12 +9,16 @@ import { DataBaseHelper } from '@guardian/common'; export async function fixtures(): Promise { const usersRepository = new DataBaseHelper(User); // Fixture user - if (await usersRepository.count() === 0) { + if ((await usersRepository.count()) === 0) { const user = usersRepository.create({ username: 'StandardRegistry', - password: crypto.createHash('sha256').update('test').digest('hex'), - walletToken: crypto.createHash('sha1').update(Math.random().toString()).digest('hex'), - role: UserRole.STANDARD_REGISTRY + password: crypto + .createHash('sha256') + .update(process.env.SR_INITIAL_PASSWORD) + .digest('hex'), + //walletToken: crypto.createHash('sha1').update(Math.random().toString()).digest('hex'), + walletToken: '', + role: UserRole.STANDARD_REGISTRY, }); await usersRepository.save(user); } diff --git a/auth-service/src/helpers/import-keys-from-database.ts b/auth-service/src/helpers/import-keys-from-database.ts index 4425d67695..8c5c9ec736 100644 --- a/auth-service/src/helpers/import-keys-from-database.ts +++ b/auth-service/src/helpers/import-keys-from-database.ts @@ -1,22 +1,20 @@ import { WalletAccount } from '../entity/wallet-account.js'; -import { DataBaseHelper, Logger } from '@guardian/common'; +import { DataBaseHelper, PinoLogger } from '@guardian/common'; import { IVault } from '../vaults/index.js'; /** * Migration function * @constructor */ -export async function ImportKeysFromDatabase(vault: IVault): Promise { - const logger = new Logger(); - +export async function ImportKeysFromDatabase(vault: IVault, logger: PinoLogger): Promise { if (process.env.VAULT_PROVIDER === 'database') { - logger.error('Cannot import to database provider', ['AUTH_SERVICE']); + await logger.error('Cannot import to database provider', ['AUTH_SERVICE']); return; } const re = /^(.*KEY)\|(.+)$/; - logger.info('Start import keys', ['AUTH_SERVICE']); + await logger.info('Start import keys', ['AUTH_SERVICE']); const walletRepository = new DataBaseHelper(WalletAccount) const databaseWallets = await walletRepository.find({ type: re @@ -30,15 +28,15 @@ export async function ImportKeysFromDatabase(vault: IVault): Promise { } }) - logger.info(`found ${walletAccounts.length} keys`, ['AUTH_SERVICE']); + await logger.info(`found ${walletAccounts.length} keys`, ['AUTH_SERVICE']); try { for (const {token, type, key, value} of walletAccounts) { await vault.setKey(token, type, key, value); } - logger.info(`${walletAccounts.length} keys was added to ${vault.constructor.name.toUpperCase()}`, ['AUTH_SERVICE']); + await logger.info(`${walletAccounts.length} keys was added to ${vault.constructor.name.toUpperCase()}`, ['AUTH_SERVICE']); } catch (e) { - logger.error(`${vault.constructor.name.toUpperCase()} vault import error: ${e.message}`, ['AUTH_SERVICE']); + await logger.error(`${vault.constructor.name.toUpperCase()} vault import error: ${e.message}`, ['AUTH_SERVICE']); } } diff --git a/common/package.json b/common/package.json index c71b94d636..750e854b50 100644 --- a/common/package.json +++ b/common/package.json @@ -5,7 +5,7 @@ "@azure/identity": "^3.2.2", "@azure/keyvault-secrets": "^4.7.0", "@google-cloud/secret-manager": "^4.2.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/interfaces": "^2.27.0", "@hashgraph/sdk": "2.46.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "^2.0.2", @@ -48,11 +48,11 @@ "nats": "^2.6.1", "node-vault": "^0.9.22", "reflect-metadata": "^0.1.13", - "winston": "^3.8.1", "ws": "^8.2.1", "zlib": "^1.0.5", "@formulajs/formulajs": "^4.4.0", - "prom-client": "^14.1.1" + "prom-client": "^14.1.1", + "seq-logging": "^2.2.0" }, "description": "Common package share cross all services", "devDependencies": { @@ -61,7 +61,6 @@ "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", "@types/node": "^18.16.0", - "@types/winston": "^2.4.4", "mocha-junit-reporter": "^2.0.2", "tslint": "^6.1.3", "typescript": "^4.5.5" @@ -88,5 +87,5 @@ "test:stability": "mocha tests/stability.test.js" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/common/src/database-modules/database-server.ts b/common/src/database-modules/database-server.ts index 443c65622d..b5cb29f675 100644 --- a/common/src/database-modules/database-server.ts +++ b/common/src/database-modules/database-server.ts @@ -36,6 +36,7 @@ import { PolicyCacheData, RetirePool, AssignEntity, + PolicyTest, } from '../entity/index.js'; import { Binary } from 'bson'; import { @@ -43,6 +44,7 @@ import { GenerateUUIDv4, IVC, MintTransactionStatus, + PolicyTestStatus, SchemaEntity, TokenType, TopicType, @@ -53,6 +55,7 @@ import { Theme } from '../entity/theme.js'; import { GetConditionsPoliciesByCategories } from '../helpers/policy-category.js'; import { PolicyTool } from '../entity/tool.js'; import { PolicyProperty } from '../entity/policy-property.js'; +import { ObjectId } from '@mikro-orm/mongodb'; /** * Database server @@ -64,6 +67,12 @@ export class DatabaseServer { */ private dryRun: string = null; + /** + * Dry-run + * @private + */ + private systemMode: boolean = false; + /** * Dry-run * @private @@ -129,33 +138,52 @@ export class DatabaseServer { } /** - * Clear Dry Run table + * Set Dry Run id + * @param id + */ + public setSystemMode(systemMode: boolean): void { + this.systemMode = systemMode; + } + + /** + * Set Dry Run id + * @param id */ - public async clearDryRun(): Promise { - console.log(this); - await DatabaseServer.clearDryRun(this.dryRun); - // Clear files - const files = await new DataBaseHelper(DryRunFiles).find({ policyId: this.dryRun }); - await Promise.all(files.map(file => new DataBaseHelper(DryRunFiles).remove(file))); + public static async setSystemMode(dryRunId: string, systemMode: boolean): Promise { + const items = await new DataBaseHelper(DryRun).find({ dryRunId }); + for (const item of items) { + item.systemMode = systemMode; + } + await new DataBaseHelper(DryRun).update(items); } /** * Clear Dry Run table + * @param systemMode */ - public static async clearDryRun(dryRunId: string): Promise { - const amount = await new DataBaseHelper(DryRun).count({ dryRunId }); - const naturalCount = Math.floor( - amount / DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE - ); + public async clear(all: boolean) { + await DatabaseServer.clearDryRun(this.dryRun, all); + } + + /** + * Clear Dry Run table + * @param dryRunId + * @param systemMode + */ + public static async clearDryRun(dryRunId: string, all: boolean): Promise { + const filter = all ? { dryRunId } : { dryRunId, systemMode: { $ne: true } }; + const limit = { limit: DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE }; + const amount = await new DataBaseHelper(DryRun).count(filter); + const naturalCount = Math.floor(amount / DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE); for (let i = 0; i < naturalCount; i++) { - const items = await new DataBaseHelper(DryRun).find( - { dryRunId }, - { limit: DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE } - ); + const items = await new DataBaseHelper(DryRun).find(filter, limit); await new DataBaseHelper(DryRun).remove(items); } - const restItems = await new DataBaseHelper(DryRun).find({ dryRunId }); + const restItems = await new DataBaseHelper(DryRun).find(filter); await new DataBaseHelper(DryRun).remove(restItems); + + const files = await new DataBaseHelper(DryRunFiles).find({ policyId: dryRunId }); + await new DataBaseHelper(DryRunFiles).remove(files); } /** @@ -229,7 +257,7 @@ export class DatabaseServer { /** * Find data by aggregation * @param entityClass Entity class - * @param aggregation Aggragation filter + * @param aggregation aggregate filter * @returns */ private async aggregate(entityClass: new () => T, aggregation: any[]): Promise { @@ -248,6 +276,42 @@ export class DatabaseServer { } } + /** + * Add dry run id + * @param entityClass + * @param item + */ + private addDryRunId(entityClass: any, item: any | any[]): any | any[] { + return DatabaseServer.addDryRunId( + item, this.dryRun, this.classMap.get(entityClass), this.systemMode + ); + } + + /** + * Add dry run id + * @param entityClass + * @param item + */ + private static addDryRunId( + item: any | any[], + dryRunId: string, + dryRunClass: string, + systemMode: boolean + ): any | any[] { + if (Array.isArray(item)) { + for (const i of item) { + i.systemMode = systemMode; + i.dryRunId = dryRunId; + i.dryRunClass = dryRunClass; + } + } else { + item.systemMode = systemMode; + item.dryRunId = dryRunId; + item.dryRunClass = dryRunClass; + } + return item; + } + /** * Overriding the create method * @param entityClass @@ -272,8 +336,7 @@ export class DatabaseServer { const restCount = (amount % DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE); if (this.dryRun) { - item.dryRunId = this.dryRun; - item.dryRunClass = this.classMap.get(entityClass); + this.addDryRunId(entityClass, item); for (let i = 0; i < naturalCount; i++) { await new DataBaseHelper(DryRun).createMuchData(item, DatabaseServer.DOCUMENTS_HANDLING_CHUNK_SIZE); } @@ -293,15 +356,7 @@ export class DatabaseServer { */ private async save(entityClass: new () => T, item: any): Promise { if (this.dryRun) { - if (Array.isArray(item)) { - for (const i of item) { - i.dryRunId = this.dryRun; - i.dryRunClass = this.classMap.get(entityClass); - } - } else { - item.dryRunId = this.dryRun; - item.dryRunClass = this.classMap.get(entityClass); - } + this.addDryRunId(entityClass, item); return await new DataBaseHelper(DryRun).save(item) as any; } else { return await new DataBaseHelper(entityClass).save(item); @@ -320,19 +375,8 @@ export class DatabaseServer { row: any ): Promise { if (this.dryRun) { - if (Array.isArray(row)) { - for (const i of row) { - i.dryRunId = this.dryRun; - i.dryRunClass = this.classMap.get(entityClass); - } - } else { - row.dryRunId = this.dryRun; - row.dryRunClass = this.classMap.get(entityClass); - } - return (await new DataBaseHelper(DryRun).update( - row, - criteria - )) as any; + this.addDryRunId(entityClass, row); + return (await new DataBaseHelper(DryRun).update(row, criteria)) as any; } else { return await new DataBaseHelper(entityClass).update(row, criteria); } @@ -2569,29 +2613,55 @@ export class DatabaseServer { username: string, did: string, hederaAccountId: string, - hederaAccountKey?: string, - active: boolean = false + hederaAccountKey: string, + active: boolean, + systemMode?: boolean ): Promise { - await new DataBaseHelper(DryRun).save({ - dryRunId: policyId, - dryRunClass: 'VirtualUsers', + await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ did, username, hederaAccountId, active - }); + }, policyId, 'VirtualUsers', !!systemMode)); if (hederaAccountKey) { - await new DataBaseHelper(DryRun).save({ - dryRunId: policyId, - dryRunClass: 'VirtualKey', + await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ did, type: did, hederaAccountKey - }); + }, policyId, 'VirtualKey', !!systemMode)); } } + /** + * Create Virtual User + * @param policyId + * @param username + * @param did + * @param hederaAccountId + * @param hederaAccountKey + * @param active + * + * @virtual + */ + public async createVirtualUser( + username: string, + did: string, + hederaAccountId: string, + hederaAccountKey: string, + active: boolean = false + ): Promise { + await DatabaseServer.createVirtualUser( + this.dryRun, + username, + did, + hederaAccountId, + hederaAccountKey, + active, + this.systemMode + ) + } + /** * Get Current Virtual User * @param policyId @@ -2724,12 +2794,10 @@ export class DatabaseServer { type: string, operatorId?: string ): Promise { - await new DataBaseHelper(DryRun).save({ - dryRunId: policyId, - dryRunClass: 'Transactions', + await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ type, hederaAccountId: operatorId - }); + }, policyId, 'Transactions', false)); } /** @@ -2745,14 +2813,12 @@ export class DatabaseServer { file: ArrayBuffer, url: any ): Promise { - await new DataBaseHelper(DryRun).save({ - dryRunId: policyId, - dryRunClass: 'Files', + await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ document: { size: file?.byteLength }, documentURL: url?.url - }); + }, policyId, 'Files', false)); } /** @@ -2797,13 +2863,11 @@ export class DatabaseServer { const messageId = message.getId(); const topicId = message.getTopicId(); - await new DataBaseHelper(DryRun).save({ - dryRunId: dryRun, - dryRunClass: 'Message', + await new DataBaseHelper(DryRun).save(DatabaseServer.addDryRunId({ document, topicId, messageId - }); + }, dryRun, 'Message', false)); } /** @@ -3456,4 +3520,134 @@ export class DatabaseServer { } return true; } + + /** + * Save file + * @param uuid + * @param buffer + * @returns file ID + */ + public static async saveFile(uuid: string, buffer: Buffer): Promise { + return new Promise((resolve, reject) => { + try { + const fileStream = DataBaseHelper.gridFS.openUploadStream(uuid); + fileStream.write(buffer); + fileStream.end(() => { + resolve(fileStream.id); + }); + } catch (error) { + reject(error); + } + }); + } + + /** + * Save file + * @param uuid + * @param buffer + * @returns file ID + */ + public static async loadFile(id: ObjectId): Promise { + const files = await DataBaseHelper.gridFS.find(id).toArray(); + if (files.length === 0) { + return null; + } + const file = files[0]; + const fileStream = DataBaseHelper.gridFS.openDownloadStream(file._id); + const bufferArray = []; + for await (const data of fileStream) { + bufferArray.push(data); + } + return Buffer.concat(bufferArray); + } + + /** + * Get policy tests + * @param policyId + * @returns tests + */ + public static async getPolicyTests(policyId: string): Promise { + return await new DataBaseHelper(PolicyTest).find({ policyId }); + } + + /** + * Assign entity + * @param config + * @param buffer + */ + public static async createPolicyTest(config: any, buffer: Buffer): Promise { + const file = await DatabaseServer.saveFile(GenerateUUIDv4(), buffer); + const item = new DataBaseHelper(PolicyTest).create({ ...config, file }); + return await new DataBaseHelper(PolicyTest).save(item); + } + + /** + * Get policy test + * @param policyId + * @param id + * @returns tests + */ + public static async getPolicyTest(policyId: string, id: string): Promise { + return await new DataBaseHelper(PolicyTest).findOne({ id, policyId }); + } + + /** + * Get policy test + * @param policyId + * @param status + * @returns tests + */ + public static async getPolicyTestsByStatus(policyId: string, status: PolicyTestStatus): Promise { + return await new DataBaseHelper(PolicyTest).find({ status, policyId }); + } + + /** + * Get policy tests + * @param policyI + * @param id + * @returns tests + */ + public static async getPolicyTestByRecord(resultId: string): Promise { + return await new DataBaseHelper(PolicyTest).findOne({ resultId }); + } + + /** + * Get policy tests + * @param policyId + * @param id + * @returns tests + */ + public static async deletePolicyTest(policyId: string, id: string): Promise { + await new DataBaseHelper(PolicyTest).delete({ id, policyId }); + } + + /** + * Get policy tests + * @param policyId + * @param id + * @returns tests + */ + public static async updatePolicyTest(test: PolicyTest): Promise { + return await new DataBaseHelper(PolicyTest).save(test); + } + + /** + * Get policy tests + * @param policyId + * @param id + * @returns tests + */ + public static async deletePolicyTests(policyId: string): Promise { + await new DataBaseHelper(PolicyTest).delete({ policyId }); + } + + /** + * Get policy tests + * @param policyId + * @param id + * @returns tests + */ + public static async removePolicyTests(tests: PolicyTest[]): Promise { + await new DataBaseHelper(PolicyTest).remove(tests); + } } diff --git a/common/src/entity/dry-run.ts b/common/src/entity/dry-run.ts index bc8758ebb6..eb285408cd 100644 --- a/common/src/entity/dry-run.ts +++ b/common/src/entity/dry-run.ts @@ -1,5 +1,5 @@ import { ApproveStatus, DocumentSignature, DocumentStatus, GenerateUUIDv4, GroupAccessType, GroupRelationshipType, SchemaEntity } from '@guardian/interfaces'; -import { Entity, Property, BeforeCreate, BeforeUpdate, OnLoad, AfterDelete, AfterCreate, AfterUpdate } from '@mikro-orm/core'; +import { Entity, Property, BeforeCreate, BeforeUpdate, OnLoad, AfterDelete, AfterCreate, AfterUpdate, Index } from '@mikro-orm/core'; import { BaseEntity } from '../models/index.js'; import { ObjectId } from '@mikro-orm/mongodb'; import { DataBaseHelper } from '../helpers/index.js'; @@ -10,6 +10,26 @@ import ObjSet from 'lodash.set'; * DryRun document */ @Entity() +@Index({ + properties: ['dryRunClass'], + name: 'class_index' +}) +@Index({ + properties: ['dryRunId'], + name: 'dry_run_index' +}) +@Index({ + properties: ['dryRunId', 'dryRunClass'], + name: 'full_index' +}) +@Index({ + properties: ['dryRunId', 'systemMode'], + name: 'system_index' +}) +@Index({ + properties: ['dryRunId', 'dryRunClass', 'active'], + name: 'user_index' +}) export class DryRun extends BaseEntity { /** * id @@ -23,6 +43,12 @@ export class DryRun extends BaseEntity { @Property({ nullable: true }) dryRunClass?: string; + /** + * Class + */ + @Property({ nullable: true }) + systemMode?: boolean; + /** * Document owner */ @@ -686,13 +712,13 @@ export class DryRun extends BaseEntity { /** * Mint status */ - @Property({ nullable: true, type: 'unknown'}) + @Property({ nullable: true, type: 'unknown' }) mintStatus?: any; /** * Transfer status */ - @Property({ nullable: true, type: 'unknown'}) + @Property({ nullable: true, type: 'unknown' }) transferStatus?: any; /** diff --git a/common/src/entity/index.ts b/common/src/entity/index.ts index 2eb5c02d06..833e1772d6 100644 --- a/common/src/entity/index.ts +++ b/common/src/entity/index.ts @@ -40,4 +40,6 @@ export * from './mint-transaction.js'; export * from './dry-run-files.js'; export * from './policy-cache-data.js'; export * from './policy-cache.js'; -export * from './assign-entity.js'; \ No newline at end of file +export * from './assign-entity.js'; +export * from './policy-test.js'; +export * from './log.js'; \ No newline at end of file diff --git a/logger-service/src/entity/log.ts b/common/src/entity/log.ts similarity index 91% rename from logger-service/src/entity/log.ts rename to common/src/entity/log.ts index 553e3aca5e..9b90a83d42 100644 --- a/logger-service/src/entity/log.ts +++ b/common/src/entity/log.ts @@ -1,6 +1,6 @@ import { Entity, Enum, Property } from '@mikro-orm/core'; import { ILog, LogType } from '@guardian/interfaces'; -import { BaseEntity } from '@guardian/common'; +import { BaseEntity } from '../models/base-entity.js'; /** * Log message diff --git a/common/src/entity/policy-test.ts b/common/src/entity/policy-test.ts new file mode 100644 index 0000000000..b1b04a8f80 --- /dev/null +++ b/common/src/entity/policy-test.ts @@ -0,0 +1,111 @@ +import { AfterDelete, Entity, Index, Property } from '@mikro-orm/core'; +import { BaseEntity } from '../models/index.js'; +import { ObjectId } from '@mikro-orm/mongodb'; +import { DataBaseHelper } from '../helpers/index.js'; +import { PolicyTestStatus } from '@guardian/interfaces'; + +/** + * PolicyRoles collection + */ +@Entity() +@Index({ + properties: ['id', 'policyId'], + name: 'id_index', +}) +@Index({ + properties: ['resultId'], + name: 'result_id_index', +}) +@Index({ + properties: ['policyId'], + name: 'policy_id_index', +}) +@Index({ + properties: ['status', 'policyId'], + name: 'status_index', +}) +export class PolicyTest extends BaseEntity { + /** + * Test UUID + */ + @Property({ nullable: true }) + uuid?: string; + + /** + * Test Name + */ + @Property({ nullable: true }) + name?: string; + + /** + * Policy Id + */ + @Property({ nullable: true }) + policyId?: string; + + /** + * Owner + */ + @Property({ nullable: true }) + owner?: string; + + /** + * Status + */ + @Property({ nullable: true }) + status?: PolicyTestStatus; + + /** + * Start date + */ + @Property({ nullable: true }) + date?: string; + + /** + * Test result + */ + @Property({ nullable: true }) + result?: any; + + /** + * Test result id + */ + @Property({ nullable: true }) + resultId?: string; + + /** + * Progress + */ + @Property({ nullable: true }) + progress?: number; + + /** + * Error + */ + @Property({ nullable: true }) + error?: any; + + /** + * Duration + */ + @Property({ nullable: true }) + duration?: number; + + /** + * File + */ + @Property({ nullable: true }) + file?: ObjectId; + + /** + * Delete File + */ + @AfterDelete() + deleteConfig() { + if (this.file) { + DataBaseHelper.gridFS + .delete(this.file) + .catch(console.error); + } + } +} diff --git a/common/src/hedera-modules/message/message-server.ts b/common/src/hedera-modules/message/message-server.ts index ea880a40f5..cdc40d90ba 100644 --- a/common/src/hedera-modules/message/message-server.ts +++ b/common/src/hedera-modules/message/message-server.ts @@ -1,6 +1,6 @@ import { AccountId, PrivateKey, TopicId, } from '@hashgraph/sdk'; import { GenerateUUIDv4, ISignOptions, SignType, WorkerTaskType } from '@guardian/interfaces'; -import { IPFS, Logger, Workers } from '../../helpers/index.js'; +import { IPFS, PinoLogger, Workers } from '../../helpers/index.js'; import { TransactionLogger } from '../transaction-logger.js'; import { Environment } from '../environment.js'; import { MessageMemo } from '../memo-mappings/message-memo.js'; @@ -312,11 +312,11 @@ export class MessageServer { message = SchemaMessage.fromMessageObject(json); break; default: - new Logger().error(`Invalid format message: ${json.type}`, ['GUARDIAN_SERVICE']); + new PinoLogger().error(`Invalid format message: ${json.type}`, ['GUARDIAN_SERVICE']); throw new Error(`Invalid format message: ${json.type || 'UNKNOWN TYPE'}`); } if (!message.validate()) { - new Logger().error(`Invalid json: ${json.type || 'UNKNOWN TYPE'}`, ['GUARDIAN_SERVICE']); + new PinoLogger().error(`Invalid json: ${json.type || 'UNKNOWN TYPE'}`, ['GUARDIAN_SERVICE']); throw new Error(`Invalid json: ${json.type}`); } return message as T; @@ -376,7 +376,7 @@ export class MessageServer { timeStamp } }, 10); - new Logger().info(`getTopicMessages, ${topic}`, ['GUARDIAN_SERVICE']); + new PinoLogger().info(`getTopicMessages, ${topic}`, ['GUARDIAN_SERVICE']); const result: Message[] = []; for (const message of messages) { try { @@ -455,7 +455,7 @@ export class MessageServer { index: 1 } }, 10); - new Logger().info(`getTopic, ${topic}`, ['GUARDIAN_SERVICE']); + new PinoLogger().info(`getTopic, ${topic}`, ['GUARDIAN_SERVICE']); try { const json = JSON.parse(message.message); if (json.type === MessageType.Topic) { @@ -636,7 +636,7 @@ export class MessageServer { } }, 10, null, userId); - new Logger().info(`getTopicMessage, ${timeStamp}, ${topicId}, ${message}`, ['GUARDIAN_SERVICE']); + new PinoLogger().info(`getTopicMessage, ${timeStamp}, ${topicId}, ${message}`, ['GUARDIAN_SERVICE']); const result = MessageServer.fromMessage(message, type); result.setAccount(message.payer_account_id); result.setIndex(message.sequence_number); @@ -682,7 +682,7 @@ export class MessageServer { } }, 10); - new Logger().info(`getTopicMessages, ${topic}`, ['GUARDIAN_SERVICE']); + new PinoLogger().info(`getTopicMessages, ${topic}`, ['GUARDIAN_SERVICE']); const result: Message[] = []; for (const message of messages) { try { diff --git a/common/src/hedera-modules/transaction-logger.ts b/common/src/hedera-modules/transaction-logger.ts index 67be3b16be..f6d56f762c 100644 --- a/common/src/hedera-modules/transaction-logger.ts +++ b/common/src/hedera-modules/transaction-logger.ts @@ -1,6 +1,6 @@ import { GenerateUUIDv4, WorkerTaskType } from '@guardian/interfaces'; import { DatabaseServer } from '../database-modules/index.js'; -import { Logger, RunFunctionAsync, Workers } from '../helpers/index.js'; +import { PinoLogger, RunFunctionAsync, Workers } from '../helpers/index.js'; import { MessageResponse } from '../models/index.js'; import { Singleton } from '../decorators/singleton.js'; import { NatsService } from '../mq/index.js'; @@ -293,7 +293,7 @@ export class TransactionLogger extends NatsService { await super.setConnection(channel).init(); this.setLogLevel(lvl); this.setLogFunction((types: string[], date: string, duration: string, name: string, attr?: string[]) => { - const log = new Logger(); + const log = new PinoLogger(); const attributes = [ ...types, date, diff --git a/common/src/helpers/console-transport.ts b/common/src/helpers/console-transport.ts new file mode 100644 index 0000000000..dff12d1724 --- /dev/null +++ b/common/src/helpers/console-transport.ts @@ -0,0 +1,54 @@ +import { Writable } from 'stream'; + +//types +import { LogType } from '@guardian/interfaces'; + +/** + * Console transport + */ +export class ConsoleTransport extends Writable { + + constructor(opts) { + super({ ...opts, objectMode: true }); + } + + /** + * Set log function + * @param info + * @param callback + */ + log(info, callback): void { + let fn: Function; + switch (info.type) { + case LogType.INFO: + fn = console.info; + break; + + case LogType.WARN: + fn = console.warn; + break; + + case LogType.ERROR: + fn = console.error; + break; + + default: + fn = console.log; + } + + fn(`${new Date().toISOString()} [${info.attributes?.join(',')}]:`, info.message); + + callback(); + } + + /** + * Adapter for Pino + * @param chunk + * @param encoding + * @param callback + */ + _write(chunk, encoding, callback) { + const info = JSON.parse(chunk.toString()); + this.log(info, callback); + } +} \ No newline at end of file diff --git a/common/src/helpers/db-helper.ts b/common/src/helpers/db-helper.ts index 7bb2625bf3..3ad04a790f 100644 --- a/common/src/helpers/db-helper.ts +++ b/common/src/helpers/db-helper.ts @@ -99,13 +99,7 @@ export class DataBaseHelper { */ @CreateRequestContext(() => DataBaseHelper.orm) public async remove(entity: T | T[]): Promise { - if (Array.isArray(entity)) { - for (const element of entity) { - await this._em.removeAndFlush(element) - } - } else { - await this._em.removeAndFlush(entity); - } + await this._em.removeAndFlush(entity); } /** @@ -266,7 +260,7 @@ export class DataBaseHelper { await this._em.flush(); await this._em.persistAndFlush(entityToUpdateOrCreate); - return entityToUpdateOrCreate; + return entityToUpdateOrCreate; } /** @@ -324,11 +318,11 @@ export class DataBaseHelper { const repository: MongoEntityRepository = this._em.getRepository(this.entityClass); delete data.id; delete data._id; - while(amount > 0) { + while (amount > 0) { delete data.id; delete data._id; await this._em.persist(repository.create(data)); - amount --; + amount--; } await this._em.flush(); } diff --git a/common/src/helpers/index.ts b/common/src/helpers/index.ts index 9f19792ca0..9adf071294 100644 --- a/common/src/helpers/index.ts +++ b/common/src/helpers/index.ts @@ -23,3 +23,9 @@ export * from './wallet.js'; export * from './workers.js'; export * from './policy-category.js'; export * from './policy-property.js'; +export * from './mongo-transport.js'; +export * from './pino-file-transport.js'; +export * from './console-transport.js'; +export * from './mongo-logging-initialization.js'; +export * from './pino-logger.js'; +export * from './pino-logger-initialization.js'; \ No newline at end of file diff --git a/common/src/helpers/logger.ts b/common/src/helpers/logger.ts index 87b14c3771..02374fe1e7 100644 --- a/common/src/helpers/logger.ts +++ b/common/src/helpers/logger.ts @@ -1,8 +1,11 @@ import { ApplicationStates, GenerateUUIDv4, ILog, IPageParameters, LogType, MessageAPI } from '@guardian/interfaces'; import { Singleton } from '../decorators/singleton.js'; import { NatsService } from '../mq/index.js'; -import { createLogger, Logger as WinstonLogger, format } from 'winston'; -import Transport from 'winston-transport'; + +import { Writable } from 'stream'; +import pino from 'pino'; + +import { ConsoleTransport } from './console-transport.js'; /** * Logger connection @@ -25,7 +28,7 @@ class LoggerConnection extends NatsService { /** * Logger transport class */ -export class LoggerServiceTransport extends Transport { +export class LoggerServiceTransport extends Writable { /** * Message broker channel * @private @@ -33,7 +36,7 @@ export class LoggerServiceTransport extends Transport { private readonly channel: LoggerConnection; constructor(opts) { - super(opts); + super({ ...opts, objectMode: true }); this.channel = new LoggerConnection(); } @@ -47,6 +50,17 @@ export class LoggerServiceTransport extends Transport { callback(); } + /** + * Adapter for Pino + * @param chunk + * @param encoding + * @param callback + */ + _write(chunk, encoding, callback) { + const info = JSON.parse(chunk.toString()); + this.log(info, callback); + } + /** * Register channel * @param channel @@ -113,40 +127,6 @@ export class LoggerServiceTransport extends Transport { } } -/** - * Console transport - */ -export class ConsoleTransport extends Transport { - /** - * Set log function - * @param info - * @param callback - */ - log(info, callback): void { - let fn: Function; - switch (info.type) { - case LogType.INFO: - fn = console.info; - break; - - case LogType.WARN: - fn = console.warn; - break; - - case LogType.ERROR: - fn = console.error; - break; - - default: - fn = console.log; - } - - fn(`${new Date().toISOString()} [${info.attributes?.join(',')}]:`, info.message); - - callback(); - } -} - /** * Logger class */ @@ -156,17 +136,23 @@ export class Logger { * Logger instance * @private */ - private readonly loggerInstance: WinstonLogger; + private readonly loggerInstance; /** * Logger service transport * @private */ private readonly messageTransport: LoggerServiceTransport; + /** + * Logger console transport + * @private + */ + private readonly consoleTransport: ConsoleTransport; + constructor() { - this.messageTransport = new LoggerServiceTransport({ - format: format.json(), - }); + this.messageTransport = new LoggerServiceTransport({}); + this.consoleTransport = new ConsoleTransport({}); + const levelTypeMapping = [ 'error', 'warn', @@ -176,14 +162,23 @@ export class Logger { 'debug', 'silly', ]; - this.loggerInstance = createLogger({ + + this.loggerInstance = pino({ level: levelTypeMapping[process.env.LOG_LEVEL] || 'info', - format: format.json(), - transports: [ - new ConsoleTransport({ format: format.json() }), - this.messageTransport, - ], - }); + base: null, + formatters: { + level(label) { + return { level: label }; + }, + log(object) { + return { ...object }; + } + }, + timestamp: () => `,"time":"${new Date().toISOString()}"` + }, pino.multistream([ + { stream: this.consoleTransport }, + { stream: this.messageTransport }, + ])); } /** diff --git a/common/src/helpers/mongo-logging-initialization.ts b/common/src/helpers/mongo-logging-initialization.ts new file mode 100644 index 0000000000..0776de4e43 --- /dev/null +++ b/common/src/helpers/mongo-logging-initialization.ts @@ -0,0 +1,40 @@ +import { MikroORM } from '@mikro-orm/core'; +import { MongoDriver } from '@mikro-orm/mongodb'; + +import process from 'process'; + +//entities +import { Log } from '../entity/log.js'; + +//helpers +import { DataBaseNamingStrategy } from '../helpers/index.js'; + +export const DEFAULT = { + MIN_POOL_SIZE: '1', + MAX_POOL_SIZE: '5', + MAX_IDLE_TIME_MS: '30000', +}; + +export async function mongoForLoggingInitialization(options: Record = {}) { + const isMongoTransport = process.env.TRANSPORTS?.includes('MONGO') + + if(process.env.DB_LOGGER_NAME && isMongoTransport) { + return await MikroORM.init({ + driver: MongoDriver, + namingStrategy: DataBaseNamingStrategy, + dbName: process.env.DB_LOGGER_NAME, + clientUrl: `mongodb://${process.env.DB_LOGGER_HOST}`, + driverOptions: { + useUnifiedTopology: true, + minPoolSize: parseInt(process.env.MIN_POOL_SIZE ?? DEFAULT.MIN_POOL_SIZE, 10), + maxPoolSize: parseInt(process.env.MAX_POOL_SIZE ?? DEFAULT.MAX_POOL_SIZE, 10), + maxIdleTimeMS: parseInt(process.env.MAX_IDLE_TIME_MS ?? DEFAULT.MAX_IDLE_TIME_MS, 10), + }, + ensureIndexes: true, + entities: [Log], + ...options + }); + } + + return null +} \ No newline at end of file diff --git a/common/src/helpers/mongo-transport.ts b/common/src/helpers/mongo-transport.ts new file mode 100644 index 0000000000..f6b4690c93 --- /dev/null +++ b/common/src/helpers/mongo-transport.ts @@ -0,0 +1,43 @@ +import { Writable } from 'stream'; +import { Db, Collection } from 'mongodb'; + +interface MongoTransportOptions { + collectionName: string; + client: Db; +} + +/** + * MongoDB transport + */ +export class MongoTransport extends Writable { + private readonly collectionName: string; + private readonly collection: Collection; + private readonly client: Db; + + constructor(options: MongoTransportOptions) { + super({ objectMode: true }); + this.collectionName = options.collectionName; + this.client = options.client; + this.collection = this.client.collection(this.collectionName); + } + + /** + * Insert log into MongoDB + * @param log + * @param encoding + * @param callback + */ + async _write(log, encoding, callback) { + try { + const logObject = JSON.parse(log) + + if (this.collection) { + await this.collection.insertOne(logObject); + } + callback(); + } catch (err) { + console.error('Error writing log to MongoDB:', err); + callback(err); + } + } +} diff --git a/common/src/helpers/pino-file-transport.ts b/common/src/helpers/pino-file-transport.ts new file mode 100644 index 0000000000..63bd61f90b --- /dev/null +++ b/common/src/helpers/pino-file-transport.ts @@ -0,0 +1,49 @@ +import pino from 'pino'; +import path from 'path'; +import { existsSync, mkdirSync, openSync } from 'fs'; + +interface PinoFileTransportOptions { + filePath: string; +} + +/** + * PinoFileTransport + */ +export class PinoFileTransport { + private readonly destination: pino.DestinationStream + + /** + * Creates an instance of PinoFileTransport. + * @param options + */ + constructor(options: PinoFileTransportOptions) { + this.ensureLogFileExists(options.filePath); + this.destination = pino.destination({ dest: options.filePath, sync: false }); + } + + /** + * Ensures that the log directory and file exist. + * @param filePath + */ + private ensureLogFileExists(filePath: string): void { + const logDirectory = path.dirname(filePath); + + if (!existsSync(logDirectory)) { + mkdirSync(logDirectory, { recursive: true }); + } + + if (!existsSync(filePath)) { + openSync(filePath, 'a'); + } + } + + /** + * Writes a log to the file. + * @param log + */ + write(log: string): void { + const logObject = JSON.parse(log); + + this.destination.write(JSON.stringify(logObject) + '\n') + } +} \ No newline at end of file diff --git a/common/src/helpers/pino-logger-initialization.ts b/common/src/helpers/pino-logger-initialization.ts new file mode 100644 index 0000000000..4b26e585e3 --- /dev/null +++ b/common/src/helpers/pino-logger-initialization.ts @@ -0,0 +1,25 @@ +import { MikroORM } from '@mikro-orm/core'; +import { MongoDriver } from '@mikro-orm/mongodb'; + +import process from 'process'; + +//interfaces +import { PinoLogType } from '@guardian/interfaces'; + +//helpers +import { levelTypeMapping, MAP_TRANSPORTS, PinoLogger } from './pino-logger.js'; + +export function pinoLoggerInitialization(db: MikroORM | null) { + const loggerOptions = { + logLevel: levelTypeMapping[process.env.LOG_LEVEL] ?? PinoLogType.INFO, + collectionName: process.env.DB_LOGGER_COLLECTION ?? 'log', + filePath: process.env.LOG_FILE_PATH ?? './logs/app.log', + client: db?.em.getDriver().getConnection().getDb(), + transports: process.env.TRANSPORTS ?? '', + mapTransports: MAP_TRANSPORTS ?? [], + seqUrl: process.env.SEQ_SERVER_URL, + seqApiKey: process.env.SEQ_API_KEY, + }; + + return new PinoLogger().init(loggerOptions); +} \ No newline at end of file diff --git a/common/src/helpers/pino-logger.ts b/common/src/helpers/pino-logger.ts new file mode 100644 index 0000000000..1c82baf6eb --- /dev/null +++ b/common/src/helpers/pino-logger.ts @@ -0,0 +1,138 @@ +import pino from 'pino'; + +//transports +import { MongoTransport } from './mongo-transport.js'; +import { PinoFileTransport } from './pino-file-transport.js'; +import { ConsoleTransport } from './console-transport.js'; +import { SeqTransport } from './seq-transport.js'; + +//decorators +import { Singleton } from '../decorators/singleton.js'; + +//types +import { LogType, PinoLogType } from '@guardian/interfaces'; + +export const levelTypeMapping: PinoLogType[] = [ + PinoLogType.INFO, + PinoLogType.WARN, + PinoLogType.ERROR, +]; + +export const MAP_TRANSPORTS: { [key: string]: any } = { + CONSOLE: ConsoleTransport, + MONGO: MongoTransport, + FILE: PinoFileTransport, + SEQ: SeqTransport, +} + +interface LoggerOptions { + logLevel: LogType; + collectionName: string; + transports: string; + mapTransports: { [key: string]: any}; +} + +/** + * Pino logger class + */ +@Singleton +export class PinoLogger { + private options: LoggerOptions; + private logLevel: LogType; + private mapTransports: { [key: string]: any }; + private transports: string; + private determinedTransports: (new (options: any) => any)[]; + private logger: pino.Logger; + + public init(options: LoggerOptions) { + this.options = options; + this.logLevel = options.logLevel; + this.mapTransports = options.mapTransports; + this.transports = options.transports; + this.determinedTransports = this.determineTransports(); + this.logger = this.create(); + return this; + } + + private determineTransports() { + const arrayTransports = this.transports.split(','); + const determinedTransports = []; + + for (const transport of arrayTransports) { + const trimmedTransportsName = transport.trim(); + + if (this.mapTransports[trimmedTransportsName]) { + determinedTransports.push(this.mapTransports[trimmedTransportsName]); + } + } + + return determinedTransports; + } + + private create() { + const transportInstances = this.determinedTransports.map(TransportClass => new TransportClass(this.options)); + + return pino({ + level: this.logLevel, + base: null, + formatters: { + level(label) { + return { level: label }; + }, + log(object) { + return { ...object }; + } + }, + timestamp: () => `,"time":"${new Date().toISOString()}"`, + }, pino.multistream(transportInstances.map(transport => ({ stream: transport })), { dedupe: true })); + } + + /** + * Create debug log message + * @param message + * @param attributes + */ + public async debug(message: string, attributes?: string[], level?: number,): Promise { + this.logger.debug({ + message, + attributes, + }); + } + + /** + * Create info log message + * @param message + * @param attributes + */ + public async info(message: string, attributes?: string[], level?: number,): Promise { + this.logger.info({ + message, + attributes, + }); + } + + /** + * Create warning log message + * @param message + * @param attributes + */ + public async warn(message: string, attributes?: string[], level?: number,): Promise { + this.logger.warn({ + message, + attributes, + }); + } + + /** + * Create error log message + * @param error + * @param attributes + */ + public async error(error: string | Error, attributes?: string[], level?: number,): Promise { + const message = !error ? 'Unknown error' : (typeof error === 'string' ? error : error.stack); + this.logger.error({ + message, + attributes, + }); + } +} \ No newline at end of file diff --git a/common/src/helpers/seq-transport.ts b/common/src/helpers/seq-transport.ts new file mode 100644 index 0000000000..16b58de0d7 --- /dev/null +++ b/common/src/helpers/seq-transport.ts @@ -0,0 +1,79 @@ +import { Writable } from 'stream'; +import { Logger } from 'seq-logging'; + +interface SeqTransportOptions { + seqUrl: string; + apiKey?: string; +} + +/**a + * Seq transport + */ +export class SeqTransport extends Writable { + private readonly logger: Logger; + private readonly logLevelMap: Record; + + constructor(options: SeqTransportOptions) { + super({ objectMode: true }); + + const loggerOptions: any = { + serverUrl: options.seqUrl, + onError: (e) => { + console.error('Error in Seq logger:', e); + } + }; + + if (options.apiKey?.trim() !== '') { + loggerOptions.apiKey = options.apiKey; + } + + this.logger = new Logger(loggerOptions); + + this.logLevelMap = { + trace: 'Verbose', + debug: 'Debug', + info: 'Information', + warn: 'Warning', + error: 'Error', + fatal: 'Fatal' + }; + } + + /** + * Send log to Seq + * @param log + * @param encoding + * @param callback + */ + async _write(log, encoding, callback) { + try { + const { level, time, message, attributes } = JSON.parse(log); + + const logEvent = { + timestamp: time, + level: this.logLevelMap[level], + messageTemplate: `[${attributes.join(', ')}]: ${message}`, + properties: { + level, + time, + attributes + } + }; + + this.logger.emit(logEvent); + + callback(); + } catch (err) { + console.error('Error writing log to Seq:', err); + callback(err); + } + } + + /** + * Close the logger when transport is finished + */ + _final(callback) { + this.logger.close(); + callback(); + } +} diff --git a/common/src/helpers/settings-container.ts b/common/src/helpers/settings-container.ts index 166f32c86d..8cfba8ffbb 100644 --- a/common/src/helpers/settings-container.ts +++ b/common/src/helpers/settings-container.ts @@ -1,5 +1,5 @@ import { Singleton } from '../decorators/singleton.js'; -import { Logger } from './logger.js'; +import { PinoLogger } from './index.js'; import { GenerateUUIDv4, IGetKeyResponse, WalletEvents } from '@guardian/interfaces'; import { NatsService } from '../mq/index.js'; @@ -61,7 +61,7 @@ export class SettingsContainerOLD extends NatsService { if (!this._settings[setting] && process.env[setting]) { await this.setGlobalApplicationKey(setting, process.env[setting]); - await new Logger().info(`${setting} was set from environment`, ['GUARDIAN_SERVICE']); + await new PinoLogger().info(`${setting} was set from environment`, ['GUARDIAN_SERVICE']); } } @@ -77,7 +77,7 @@ export class SettingsContainerOLD extends NatsService { if (!this._settings[setting] && process.env[setting]) { await this.setGlobalApplicationKey(setting, process.env[setting]); - await new Logger().info(`${setting} was set from environment`, ['GUARDIAN_SERVICE']); + await new PinoLogger().info(`${setting} was set from environment`, ['GUARDIAN_SERVICE']); } } } diff --git a/common/src/helpers/wallet.ts b/common/src/helpers/wallet.ts index b44f1045ce..96ad9f5e46 100644 --- a/common/src/helpers/wallet.ts +++ b/common/src/helpers/wallet.ts @@ -1,10 +1,25 @@ import { Singleton } from '../decorators/singleton.js'; -import { GenerateUUIDv4, ISignOptions, SignType } from '@guardian/interfaces'; +import { + GenerateUUIDv4, + ISignOptions, + MessageAPI, + SignType, +} from '@guardian/interfaces'; import { Wallet as WalletManager } from '../wallet/index.js' import { NatsService } from '../mq/index.js'; import { Users } from './users.js'; import { IAuthUser } from '../interfaces'; +/** + * Key Entity + */ +export enum KeyEntity { + TOKEN = 'TOKEN', + TOPIC = 'TOPIC', + DID = 'DID', + KEY = 'KEY', +} + /** * Key type */ @@ -23,6 +38,22 @@ export enum KeyType { FIREBLOCKS_KEY = 'FIREBLOCKS_KEY', } +/** + * Key type - key entity mapping + */ +export const KEY_TYPE_KEY_ENTITY: Map = new Map([ + [KeyType.TOKEN_TREASURY_KEY, KeyEntity.TOKEN], + [KeyType.TOKEN_ADMIN_KEY, KeyEntity.TOKEN], + [KeyType.TOKEN_SUPPLY_KEY, KeyEntity.TOKEN], + [KeyType.TOKEN_FREEZE_KEY, KeyEntity.TOKEN], + [KeyType.TOKEN_KYC_KEY, KeyEntity.TOKEN], + [KeyType.TOKEN_WIPE_KEY, KeyEntity.TOKEN], + [KeyType.TOPIC_SUBMIT_KEY, KeyEntity.TOPIC], + [KeyType.TOKEN_WIPE_KEY, KeyEntity.TOPIC], + [KeyType.DID_KEYS, KeyEntity.DID], + [KeyType.KEY, KeyEntity.KEY], +]); + /** * Wallet service */ @@ -71,30 +102,50 @@ export class Wallet extends NatsService { /** * Return key * @param did - * @param type - * @param key + * @param keyType + * @param entityId */ - public async getUserKey(did: string, type: KeyType, key: string): Promise { + public async getUserKey( + did: string, + keyType: KeyType, + entityId: string + ): Promise { + const hasPermissions = await this.sendMessage( + MessageAPI.CHECK_KEY_PERMISSIONS, + { + did, + keyType, + entityId, + } + ); + const user = new Users(); const { walletToken } = await user.getUserById(did); const wallet = new WalletManager(); - return await wallet.getKey(walletToken, type, key); + return hasPermissions + ? await wallet.getKey(walletToken, keyType, entityId) + : null; } /** * Set key * @param token - * @param type - * @param key - * @param value + * @param keyType + * @param entityId + * @param keyValue */ - public async setUserKey(did: string, type: KeyType, key: string, value: any) { + public async setUserKey( + did: string, + keyType: KeyType, + entityId: string, + keyValue: any + ) { const user = new Users(); const { walletToken } = await user.getUserById(did); const wallet = new WalletManager(); - await wallet.setKey(walletToken, type, key, value); + await wallet.setKey(walletToken, keyType, entityId, keyValue); } /** diff --git a/common/src/import-export/policy.ts b/common/src/import-export/policy.ts index e830d19dbd..c21dfd8547 100644 --- a/common/src/import-export/policy.ts +++ b/common/src/import-export/policy.ts @@ -1,5 +1,5 @@ import JSZip from 'jszip'; -import { Artifact, Policy, PolicyCategory, PolicyTool, Schema, Tag, Token } from '../entity/index.js'; +import { Artifact, Policy, PolicyCategory, PolicyTest, PolicyTool, Schema, Tag, Token } from '../entity/index.js'; import { DataBaseHelper } from '../helpers/index.js'; import { DatabaseServer } from '../database-modules/index.js'; import { ImportExportUtils } from './utils.js'; @@ -22,6 +22,7 @@ export interface IPolicyComponents { artifacts: IArtifact[]; tags: Tag[]; tools: PolicyTool[]; + tests: IArtifact[]; } /** @@ -78,8 +79,8 @@ export class PolicyImportExport { const schemas = await PolicyImportExport.loadSchemas(topicId, schemasIds); const tools = await new DataBaseHelper(PolicyTool).find({ messageId: { $in: toolIds } }); const artifacts: IArtifact[] = []; - const row = await new DataBaseHelper(Artifact).find({ policyId: policy.id }); - for (const item of row) { + const artifactRows = await new DataBaseHelper(Artifact).find({ policyId: policy.id }); + for (const item of artifactRows) { const data = await DatabaseServer.getArtifactFileByUUID(item.uuid); artifacts.push({ name: item.name, @@ -89,6 +90,18 @@ export class PolicyImportExport { }); } + const tests: IArtifact[] = []; + const testRows = await DatabaseServer.getPolicyTests(policy.id); + for (const item of testRows) { + const data = await DatabaseServer.loadFile(item.file); + tests.push({ + name: item.uuid, + uuid: item.uuid, + extention: 'record', + data + }); + } + const tagTargets: string[] = []; tagTargets.push(policy.id.toString()); for (const token of tokens) { @@ -102,7 +115,7 @@ export class PolicyImportExport { const allCategories = await DatabaseServer.getPolicyCategories(); policy.categoriesExport = policy.categories?.length ? PolicyImportExport.getPolicyCategoriesExport(policy, allCategories) : []; - return { policy, tokens, schemas, tools, artifacts, tags }; + return { policy, tokens, schemas, tools, artifacts, tags, tests }; } /** @@ -215,6 +228,11 @@ export class PolicyImportExport { zip.file(`tags/${index}.json`, JSON.stringify(tag)); } + zip.folder('tests'); + for (const test of components.tests) { + zip.file(`tests/${test.uuid}.record`, test.data); + } + zip.file(PolicyImportExport.policyFileName, JSON.stringify(policyObject)); return zip; } @@ -253,15 +271,15 @@ export class PolicyImportExport { let artifacts: any; if (includeArtifactsData) { const data = fileEntries.filter(file => /^artifacts\/.+/.test(file[0]) && file[0] !== 'artifacts/metadata.json').map(async file => { - const uuid = file[0].split('/')[1]; - const artifactMetaData = metaDataBody.find(item => item.uuid === uuid); - return { - name: artifactMetaData.name, - extention: artifactMetaData.extention, - uuid: artifactMetaData.uuid, - data: await file[1].async('nodebuffer') - } - }) + const uuid = file[0].split('/')[1]; + const artifactMetaData = metaDataBody.find(item => item.uuid === uuid); + return { + name: artifactMetaData.name, + extention: artifactMetaData.extention, + uuid: artifactMetaData.uuid, + data: await file[1].async('nodebuffer') + } + }) artifacts = await Promise.all(data); } else { artifacts = metaDataBody.map((artifactMetaData) => { @@ -274,13 +292,23 @@ export class PolicyImportExport { }); } + const tests = await Promise.all(fileEntries.filter(file => /^tests\/.+/.test(file[0])).map(async file => { + const uuid = file[0].split('/')[1].replace(/\.record$/, ''); + return { + name: uuid, + extention: 'record', + uuid, + data: await file[1].async('nodebuffer') + } + })); + if (policy.categoriesExport?.length) { const allCategories = await DatabaseServer.getPolicyCategories(); policy.categories = PolicyImportExport.parsePolicyCategories(policy, allCategories); policy.categoriesExport = []; } - return { policy, tokens, schemas, artifacts, tags, tools }; + return { policy, tokens, schemas, artifacts, tags, tools, tests }; } /** diff --git a/common/src/import-export/record.ts b/common/src/import-export/record.ts index 4a5749308d..0f1ee73a94 100644 --- a/common/src/import-export/record.ts +++ b/common/src/import-export/record.ts @@ -36,6 +36,10 @@ export interface IRecordComponents { * Current time */ time: number; + /** + * Duration + */ + duration: number; } /** @@ -144,6 +148,10 @@ export class RecordImportExport { } } + private static duration(first: string | number | Date, last: string | number | Date): number { + return (Number(last) - Number(first)); + } + /** * Load record results * @param uuid record @@ -214,9 +222,10 @@ export class RecordImportExport { const time: any = first ? first.time : null; if (first && last) { const results = await RecordImportExport.loadRecordResults(first.policyId, first.time, last.time); - return { records, time, results }; + const duration = RecordImportExport.duration(first.time, last.time); + return { records, time, duration, results }; } else { - return { records, time, results: [] }; + return { records, time, duration: 0, results: [] }; } } @@ -335,10 +344,13 @@ export class RecordImportExport { } } } - + const first = records[0]; + const last = records[records.length - 1]; + const duration = RecordImportExport.duration(first?.time, last?.time); return { records, results, + duration, time: now }; } diff --git a/common/src/metrics/metrics-service.ts b/common/src/metrics/metrics-service.ts index ab622c1eaa..caa8740311 100644 --- a/common/src/metrics/metrics-service.ts +++ b/common/src/metrics/metrics-service.ts @@ -1,10 +1,10 @@ import express, { Express } from 'express' import client, { Registry } from 'prom-client'; import process from 'process'; -import { Logger } from '../helpers/index.js'; +import { PinoLogger } from '../helpers/index.js'; export class MetricsService{ - private readonly logger: Logger; + private readonly logger: PinoLogger; private readonly server: Express; private readonly register: Registry; private readonly port: number; @@ -12,7 +12,7 @@ export class MetricsService{ constructor() { this.server = express(); this.register = client.register; - this.logger = new Logger(); + this.logger = new PinoLogger(); this.port = parseInt(process.env.PROMETEUS_PORT, 10) || 5007; } diff --git a/configs/.env..guardian.system b/configs/.env..guardian.system index 271315e198..07d4b137e6 100644 --- a/configs/.env..guardian.system +++ b/configs/.env..guardian.system @@ -16,6 +16,7 @@ PREUSED_HEDERA_NET="testnet" OPERATOR_ID="..." OPERATOR_KEY="..." INITIALIZATION_TOPIC_ID="0.0.1960" +SR_INITIAL_PASSWORD="..." # # LOCALNODE # LOCALNODE_ADDRESS="..." @@ -68,6 +69,7 @@ IPFS_STORAGE_PROOF="..." # only valid for web3storage provider; ignored in other IPFS_PUBLIC_GATEWAY='https://ipfs.io/ipfs/${cid}' # use this for public providers (filebase, web3storage, etc.) #IPFS_PUBLIC_GATEWAY='http://ipfs-node:8080/ipfs/${cid}' # use this for local provider IPFS_NODE_ADDRESS="http://ipfs-node:5001" # only valid for local provider; ignored in other cases +ANALYTICS_SERVICE="http://indexer-api-gateway:3021" #BATCH_NFT_MINT_SIZE=10 # FE/DEMO @@ -140,6 +142,17 @@ HOST_CACHE='cache' PORT_CACHE='6379' ENABLE_CACHE='true' +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="mongo" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://seq:5341" +#SEQ_UI_URL="http://localhost:5341" +#SEQ_API_KEY="" + # MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" diff --git a/configs/.env.develop.guardian.system b/configs/.env.develop.guardian.system index 25118b5363..a7ff319cb0 100644 --- a/configs/.env.develop.guardian.system +++ b/configs/.env.develop.guardian.system @@ -16,6 +16,7 @@ PREUSED_HEDERA_NET="testnet" OPERATOR_ID="..." OPERATOR_KEY="..." INITIALIZATION_TOPIC_ID="0.0.1960" +SR_INITIAL_PASSWORD="..." # # LOCALNODE # LOCALNODE_ADDRESS="..." @@ -69,6 +70,7 @@ IPFS_STORAGE_PROOF="..." # only valid for web3storage provider; ignored in other IPFS_PUBLIC_GATEWAY='https://ipfs.io/ipfs/${cid}' # use this for public providers (filebase, web3storage, etc.) #IPFS_PUBLIC_GATEWAY='http://ipfs-node:8080/ipfs/${cid}' # use this for local provider IPFS_NODE_ADDRESS="http://ipfs-node:5001" # only valid for local provider; ignored in other cases +ANALYTICS_SERVICE="http://indexer-api-gateway:3021" #BATCH_NFT_MINT_SIZE=10 # FE/DEMO @@ -141,6 +143,17 @@ HOST_CACHE='cache' PORT_CACHE='6379' ENABLE_CACHE='true' +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="mongo" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://seq:5341" +#SEQ_UI_URL="http://localhost:5341" +#SEQ_API_KEY="" + # MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" diff --git a/configs/.env.template.guardian.system b/configs/.env.template.guardian.system index 4c7f395677..c426c350cc 100644 --- a/configs/.env.template.guardian.system +++ b/configs/.env.template.guardian.system @@ -33,6 +33,7 @@ HEDERA_NET="testnet" OPERATOR_ID="..." OPERATOR_KEY="..." INITIALIZATION_TOPIC_ID="0.0.1960" +SR_INITIAL_PASSWORD="..." # LOCALNODE # LOCALNODE_ADDRESS="..." @@ -85,6 +86,7 @@ IPFS_STORAGE_PROOF="..." # only valid for web3storage provider; ignored in other IPFS_PUBLIC_GATEWAY='https://ipfs.io/ipfs/${cid}' # use this for public providers (filebase, web3storage, etc.) #IPFS_PUBLIC_GATEWAY='http://ipfs-node:8080/ipfs/${cid}' # use this for local provider IPFS_NODE_ADDRESS="http://ipfs-node:5001" # only valid for local provider; ignored in other cases +ANALYTICS_SERVICE="http://indexer-api-gateway:3021" #BATCH_NFT_MINT_SIZE=10 # FE/DEMO @@ -156,7 +158,18 @@ HOST_CACHE='cache' PORT_CACHE='6379' ENABLE_CACHE='true' +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +#SEQ_UI_URL="" +#SEQ_API_KEY="" + # MONGO_INIT -MIN_POOL_SIZE="1" -MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" \ No newline at end of file +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" diff --git a/configs/.env_SSV b/configs/.env_SSV index 7287d74d81..64c0061781 100644 --- a/configs/.env_SSV +++ b/configs/.env_SSV @@ -38,6 +38,17 @@ HOST_CACHE='cache' PORT_CACHE='6379' ENABLE_CACHE='true' +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="mongo" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://seq:5341" +#SEQ_UI_URL="http://localhost:5341" +#SEQ_API_KEY="" + # MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" diff --git a/docker-compose-production.yml b/docker-compose-production.yml new file mode 100644 index 0000000000..985be4f569 --- /dev/null +++ b/docker-compose-production.yml @@ -0,0 +1,310 @@ +# https://docs.docker.com/compose/environment-variables/envvars-precedence/ +# Environment leverage the gerarchy defined in the docker compose between "env_file" and "environment" attributes +# ecosystem variables defined in the "env_file" .env.${GUARDIAN_ENV}.guardian.system +# specific service variables defined by "environment" can override what is defined in the ecosystem file +version: "3.8" +services: + mongo: + image: mongo:6.0.13 + command: "--setParameter allowDiskUseByDefault=true" + restart: always + expose: + - 27017 + + cache: + image: registry.redict.io/redict + restart: always + expose: + - 6379 + + ipfs-node: + image: ipfs/kubo:v0.26.0 + ports: + - "5001:5001" + - "4001:4001" + - "8080:8080" + volumes: + - ipfs_data:/data/ipfs:rw + - ipfs_export:/export:rw + + message-broker: + image: nats:2.9.24 + expose: + - 4222 + ports: + - '8222:8222' + command: '--http_port 8222' + + vault: + image: hashicorp/vault:1.12.11 + expose: + - 8200 + ports: + - '8200:8200' + environment: + VAULT_SERVER: "http://0.0.0.0:8200" + VAULT_DEV_ROOT_TOKEN_ID: "1234" + cap_add: + - IPC_LOCK + volumes: + - ./file:/vault/file:rw + - ./config:/vault/config:rw + + notification-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./notification-service/Dockerfile + init: true + depends_on: + - message-broker + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + volumes: + - ./notification-service/configs:/usr/local/notification-service/configs:ro + + logger-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./logger-service/Dockerfile + init: true + depends_on: + - message-broker + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + expose: + - 6555 + volumes: + - ./logger-service/configs:/usr/local/logger-service/configs:ro + + queue-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./queue-service/Dockerfile + init: true + depends_on: + - mongo + - message-broker + - logger-service + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + expose: + - 6555 + + worker-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./worker-service/Dockerfile + init: true + depends_on: + queue-service: + condition: service_started + ipfs-node: + condition: service_healthy + auth-service: + condition: service_started + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + expose: + - 6555 + volumes: + - ./worker-service/tls:/usr/local/worker-service/tls:ro + - ./worker-service/configs:/usr/local/worker-service/configs:ro + deploy: + replicas: 2 + + auth-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./auth-service/Dockerfile + init: true + ports: + - '5005:5005' + volumes: + - ./auth-service/tls:/usr/local/auth-service/tls:ro + - ./auth-service/configs:/usr/local/auth-service/configs:ro + depends_on: + - mongo + - vault + - message-broker + - logger-service + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + expose: + - 6555 + - 5005 + + api-gateway: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./api-gateway/Dockerfile + init: true + expose: + - 3002 + - 6555 + depends_on: + - mongo + - cache + - message-broker + - guardian-service + - auth-service + - logger-service + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + volumes: + - ./api-gateway/configs:/usr/local/api-gateway/configs:ro + + ai-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./ai-service/Dockerfile + init: true + expose: + - 3013 + depends_on: + - mongo + - message-broker + - logger-service + volumes: + - ./ai-service/data:/usr/local/ai-service/data:rw + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + - VECTOR_STORAGE_PATH=./faiss-vector + - DOCS_STORAGE_PATH=./data/generated-data + + policy-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./policy-service/Dockerfile + init: true + ports: + - "5006:5006" + depends_on: + - mongo + - message-broker + - auth-service + - logger-service + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + expose: + - 50000-60000 + - 5006 + volumes: + - ./policy-service/tls:/usr/local/policy-service/tls:ro + - ./policy-service/configs:/usr/local/policy-service/configs:ro + + guardian-service: + env_file: + - ./configs/.env.${GUARDIAN_ENV}.guardian.system + build: + context: . + dockerfile: ./guardian-service/Dockerfile + init: true + ports: + - "5007:5007" + volumes: + - ./guardian-service/tls:/usr/local/guardian-service/tls:ro + - ./guardian-service/configs:/usr/local/guardian-service/configs:ro + depends_on: + - mongo + - message-broker + - auth-service + - logger-service + - worker-service + - policy-service + environment: + - GUARDIAN_ENV=${GUARDIAN_ENV} + expose: + - 6555 + - 5007 + + application-events: + build: + context: . + dockerfile: application-events/Dockerfile + init: true + ports: + - "3012:3012" + depends_on: + - mongo + - message-broker + - guardian-service + - auth-service + - logger-service + expose: + - 3012 + + web-proxy: + build: + context: . + dockerfile: ./web-proxy/Dockerfile.ci + init: true + environment: + GATEWAY_CLIENT_MAX_BODY_SIZE: 1024m + GATEWAY_HOST: api-gateway + GATEWAY_PORT: 3002 + ports: + - "3000:80" + depends_on: + - guardian-service + - auth-service + - api-gateway + + prometheus: + image: prom/prometheus:v2.44.0 + restart: unless-stopped + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml + - prometheus_data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yml' + - '--storage.tsdb.path=/prometheus' + - '--web.console.libraries=/etc/prometheus/console_libraries' + - '--web.console.templates=/etc/prometheus/consoles' + - '--web.enable-lifecycle' + ports: + - "9090:9090" + networks: + - monitoring + + grafana: + image: grafana/grafana:10.0.10 + volumes: + - grafana_data:/var/lib/grafana + - ./grafana/provisioning:/etc/grafana/provisioning + - ./grafana/dashboards:/etc/grafana/dashboards + environment: + - GF_AUTH_DISABLE_LOGIN_FORM=true + - GF_AUTH_ANONYMOUS_ENABLED=true + - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin + - GF_SERVER_HTTP_PORT=9080 + - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/prometheus-dashboard.json + ports: + - "9080:9080" + networks: + - monitoring + +volumes: + prometheus_data: + grafana_data: + ipfs_data: + ipfs_export: + +networks: + monitoring: + driver: bridge diff --git a/docker-compose.yml b/docker-compose.yml index 33456b9df3..b85fda4c77 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,16 @@ services: expose: - 6379 +# seq: +# image: datalust/seq +# restart: unless-stopped +# environment: +# ACCEPT_EULA: "Y" +# ports: +# - "5341:80" +# volumes: +# - seq_data:/data + ipfs-node: image: ipfs/kubo:v0.26.0 ports: @@ -167,6 +177,7 @@ services: depends_on: - mongo - cache +# - seq - message-broker - guardian-service - auth-service @@ -268,7 +279,7 @@ services: ports: - "5008:5008" expose: - - 3003 + - 3005 - 5008 topic-viewer: @@ -285,8 +296,16 @@ services: web-proxy: build: context: . - dockerfile: ./web-proxy/Dockerfile + dockerfile: ./web-proxy/Dockerfile.demo init: true + environment: + GATEWAY_CLIENT_MAX_BODY_SIZE: 1024m + GATEWAY_HOST: api-gateway + GATEWAY_PORT: 3002 + MRV_SENDER_HOST: mrv-sender + MRV_SENDER_PORT: 3005 + TOPIC_VIEWER_HOST: topic-viewer + TOPIC_VIEWER_PORT: 3006 ports: - "3000:80" depends_on: @@ -335,6 +354,7 @@ volumes: grafana_data: ipfs_data: ipfs_export: +# seq_data: networks: monitoring: diff --git a/docs/.gitbook/assets/0 (17).png b/docs/.gitbook/assets/0 (17).png new file mode 100644 index 0000000000..93ae55a6f8 Binary files /dev/null and b/docs/.gitbook/assets/0 (17).png differ diff --git a/docs/.gitbook/assets/0 (18).png b/docs/.gitbook/assets/0 (18).png new file mode 100644 index 0000000000..65e8602dc4 Binary files /dev/null and b/docs/.gitbook/assets/0 (18).png differ diff --git a/docs/.gitbook/assets/1 (19).png b/docs/.gitbook/assets/1 (19).png new file mode 100644 index 0000000000..459fcd6ee1 Binary files /dev/null and b/docs/.gitbook/assets/1 (19).png differ diff --git a/docs/.gitbook/assets/1 (20).png b/docs/.gitbook/assets/1 (20).png new file mode 100644 index 0000000000..c393913524 Binary files /dev/null and b/docs/.gitbook/assets/1 (20).png differ diff --git a/docs/.gitbook/assets/10 (17).png b/docs/.gitbook/assets/10 (17).png new file mode 100644 index 0000000000..3a06ce07e0 Binary files /dev/null and b/docs/.gitbook/assets/10 (17).png differ diff --git a/docs/.gitbook/assets/10 (18).png b/docs/.gitbook/assets/10 (18).png new file mode 100644 index 0000000000..9b00f5e28d Binary files /dev/null and b/docs/.gitbook/assets/10 (18).png differ diff --git a/docs/.gitbook/assets/11 (14).png b/docs/.gitbook/assets/11 (14).png new file mode 100644 index 0000000000..054c6dc3e4 Binary files /dev/null and b/docs/.gitbook/assets/11 (14).png differ diff --git a/docs/.gitbook/assets/11 (15).png b/docs/.gitbook/assets/11 (15).png new file mode 100644 index 0000000000..87b628aaab Binary files /dev/null and b/docs/.gitbook/assets/11 (15).png differ diff --git a/docs/.gitbook/assets/12 (12).png b/docs/.gitbook/assets/12 (12).png new file mode 100644 index 0000000000..b29ca16955 Binary files /dev/null and b/docs/.gitbook/assets/12 (12).png differ diff --git a/docs/.gitbook/assets/12 (13).png b/docs/.gitbook/assets/12 (13).png new file mode 100644 index 0000000000..516f473f86 Binary files /dev/null and b/docs/.gitbook/assets/12 (13).png differ diff --git a/docs/.gitbook/assets/13 (12).png b/docs/.gitbook/assets/13 (12).png new file mode 100644 index 0000000000..cb3df5c299 Binary files /dev/null and b/docs/.gitbook/assets/13 (12).png differ diff --git a/docs/.gitbook/assets/13 (13).png b/docs/.gitbook/assets/13 (13).png new file mode 100644 index 0000000000..0aa615d68b Binary files /dev/null and b/docs/.gitbook/assets/13 (13).png differ diff --git a/docs/.gitbook/assets/14 (10).png b/docs/.gitbook/assets/14 (10).png new file mode 100644 index 0000000000..6faf831cb3 Binary files /dev/null and b/docs/.gitbook/assets/14 (10).png differ diff --git a/docs/.gitbook/assets/15 (12).png b/docs/.gitbook/assets/15 (12).png new file mode 100644 index 0000000000..00ae67e200 Binary files /dev/null and b/docs/.gitbook/assets/15 (12).png differ diff --git a/docs/.gitbook/assets/16 (11).png b/docs/.gitbook/assets/16 (11).png new file mode 100644 index 0000000000..c71f525243 Binary files /dev/null and b/docs/.gitbook/assets/16 (11).png differ diff --git a/docs/.gitbook/assets/17 (12).png b/docs/.gitbook/assets/17 (12).png new file mode 100644 index 0000000000..9060222157 Binary files /dev/null and b/docs/.gitbook/assets/17 (12).png differ diff --git a/docs/.gitbook/assets/18 (10).png b/docs/.gitbook/assets/18 (10).png new file mode 100644 index 0000000000..6faf831cb3 Binary files /dev/null and b/docs/.gitbook/assets/18 (10).png differ diff --git a/docs/.gitbook/assets/19 (7).png b/docs/.gitbook/assets/19 (7).png index f3d9740b21..06542eb8f6 100644 Binary files a/docs/.gitbook/assets/19 (7).png and b/docs/.gitbook/assets/19 (7).png differ diff --git a/docs/.gitbook/assets/2 (21).png b/docs/.gitbook/assets/2 (21).png new file mode 100644 index 0000000000..53827d9a48 Binary files /dev/null and b/docs/.gitbook/assets/2 (21).png differ diff --git a/docs/.gitbook/assets/2 (22).png b/docs/.gitbook/assets/2 (22).png new file mode 100644 index 0000000000..7d69fd6c13 Binary files /dev/null and b/docs/.gitbook/assets/2 (22).png differ diff --git a/docs/.gitbook/assets/20 (4).png b/docs/.gitbook/assets/20 (4).png index 2b2c7be089..22924d375a 100644 Binary files a/docs/.gitbook/assets/20 (4).png and b/docs/.gitbook/assets/20 (4).png differ diff --git a/docs/.gitbook/assets/3 (18).png b/docs/.gitbook/assets/3 (18).png new file mode 100644 index 0000000000..26ade1ddd2 Binary files /dev/null and b/docs/.gitbook/assets/3 (18).png differ diff --git a/docs/.gitbook/assets/3 (19).png b/docs/.gitbook/assets/3 (19).png new file mode 100644 index 0000000000..8d9b816f47 Binary files /dev/null and b/docs/.gitbook/assets/3 (19).png differ diff --git a/docs/.gitbook/assets/4 (16).png b/docs/.gitbook/assets/4 (16).png new file mode 100644 index 0000000000..84938d8aae Binary files /dev/null and b/docs/.gitbook/assets/4 (16).png differ diff --git a/docs/.gitbook/assets/4 (17).png b/docs/.gitbook/assets/4 (17).png new file mode 100644 index 0000000000..64d88b259e Binary files /dev/null and b/docs/.gitbook/assets/4 (17).png differ diff --git a/docs/.gitbook/assets/5 (19).png b/docs/.gitbook/assets/5 (19).png new file mode 100644 index 0000000000..cdf187aa60 Binary files /dev/null and b/docs/.gitbook/assets/5 (19).png differ diff --git a/docs/.gitbook/assets/5 (20).png b/docs/.gitbook/assets/5 (20).png new file mode 100644 index 0000000000..f41860dec2 Binary files /dev/null and b/docs/.gitbook/assets/5 (20).png differ diff --git a/docs/.gitbook/assets/6 (18).png b/docs/.gitbook/assets/6 (18).png new file mode 100644 index 0000000000..4102b6fa5a Binary files /dev/null and b/docs/.gitbook/assets/6 (18).png differ diff --git a/docs/.gitbook/assets/6 (19).png b/docs/.gitbook/assets/6 (19).png new file mode 100644 index 0000000000..9698eef0a7 Binary files /dev/null and b/docs/.gitbook/assets/6 (19).png differ diff --git a/docs/.gitbook/assets/7 (18).png b/docs/.gitbook/assets/7 (18).png new file mode 100644 index 0000000000..5559725050 Binary files /dev/null and b/docs/.gitbook/assets/7 (18).png differ diff --git a/docs/.gitbook/assets/7 (19).png b/docs/.gitbook/assets/7 (19).png new file mode 100644 index 0000000000..9ac143c582 Binary files /dev/null and b/docs/.gitbook/assets/7 (19).png differ diff --git a/docs/.gitbook/assets/8 (19).png b/docs/.gitbook/assets/8 (19).png new file mode 100644 index 0000000000..d37e609d90 Binary files /dev/null and b/docs/.gitbook/assets/8 (19).png differ diff --git a/docs/.gitbook/assets/8 (20).png b/docs/.gitbook/assets/8 (20).png new file mode 100644 index 0000000000..0b60883a4d Binary files /dev/null and b/docs/.gitbook/assets/8 (20).png differ diff --git a/docs/.gitbook/assets/9 (16).png b/docs/.gitbook/assets/9 (16).png new file mode 100644 index 0000000000..b5054ffe94 Binary files /dev/null and b/docs/.gitbook/assets/9 (16).png differ diff --git a/docs/.gitbook/assets/9 (17).png b/docs/.gitbook/assets/9 (17).png new file mode 100644 index 0000000000..b7f8e26b5a Binary files /dev/null and b/docs/.gitbook/assets/9 (17).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..64dcbfce4a Binary files /dev/null and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 64dcbfce4a..fd487e4449 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index fd487e4449..f215c151a7 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f215c151a7..e40832f472 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index e40832f472..f9e2ba27c1 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f9e2ba27c1..33409f86c1 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 33409f86c1..5e9d4c646e 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 5e9d4c646e..bf2fded8de 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index bf2fded8de..7831536a6b 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 7831536a6b..125594f5bf 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 125594f5bf..8bbc766be5 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 8bbc766be5..15e1d7a135 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 15e1d7a135..f5dd83b397 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f5dd83b397..424e1766a0 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 424e1766a0..dc800439cd 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index dc800439cd..401e85023b 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 401e85023b..df14f02f7c 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index df14f02f7c..962f491b30 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 962f491b30..00dbcf6b0d 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 00dbcf6b0d..9fab550b02 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 9fab550b02..d2057dcfc2 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png index d2057dcfc2..40c124f8b0 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png index 40c124f8b0..5d6f7d6428 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png index 5d6f7d6428..ae454578e4 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png index ae454578e4..557a2754a1 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1) (1).png index 557a2754a1..08b83fec02 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1) (1).png b/docs/.gitbook/assets/image (1) (1) (1).png index 08b83fec02..aabe1bae8f 100644 Binary files a/docs/.gitbook/assets/image (1) (1) (1).png and b/docs/.gitbook/assets/image (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1) (1).png b/docs/.gitbook/assets/image (1) (1).png index aabe1bae8f..226f735c8f 100644 Binary files a/docs/.gitbook/assets/image (1) (1).png and b/docs/.gitbook/assets/image (1) (1).png differ diff --git a/docs/.gitbook/assets/image (1).png b/docs/.gitbook/assets/image (1).png index 226f735c8f..8a7159d9a8 100644 Binary files a/docs/.gitbook/assets/image (1).png and b/docs/.gitbook/assets/image (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..75381204f2 Binary files /dev/null and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 75381204f2..9fc0c8426e 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 9fc0c8426e..00b72f5662 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 00b72f5662..003d493bc5 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 003d493bc5..6dbe4b9004 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 6dbe4b9004..600c763d47 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 600c763d47..fa3093c027 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index fa3093c027..165ea0128f 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 165ea0128f..a5ac75df9e 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index a5ac75df9e..15e1d7a135 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 15e1d7a135..e902436b66 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index e902436b66..db8e8487be 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index db8e8487be..ba57f9d76b 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index ba57f9d76b..3bb0367973 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 3bb0367973..2620dcfb7d 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 2620dcfb7d..7c8b624c1c 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 7c8b624c1c..ddceb5a332 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png index ddceb5a332..e114d28ddd 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png index e114d28ddd..a4af865679 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png index a4af865679..20393e47d1 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png index 20393e47d1..eae7c8adfb 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png index eae7c8adfb..b25cf7a64e 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1) (1).png index b25cf7a64e..1fbaf2067a 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1) (1).png b/docs/.gitbook/assets/image (2) (1) (1).png index 1fbaf2067a..5ff37a56e4 100644 Binary files a/docs/.gitbook/assets/image (2) (1) (1).png and b/docs/.gitbook/assets/image (2) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (2) (1).png b/docs/.gitbook/assets/image (2) (1).png index 5ff37a56e4..d42defb1f4 100644 Binary files a/docs/.gitbook/assets/image (2) (1).png and b/docs/.gitbook/assets/image (2) (1).png differ diff --git a/docs/.gitbook/assets/image (2).png b/docs/.gitbook/assets/image (2).png index d42defb1f4..7d5412b915 100644 Binary files a/docs/.gitbook/assets/image (2).png and b/docs/.gitbook/assets/image (2).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..ade9ae13a4 Binary files /dev/null and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index ade9ae13a4..ecebc76904 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index ecebc76904..13eea5a6ff 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 13eea5a6ff..2f623aff02 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 2f623aff02..734d730eba 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 734d730eba..7802b32b61 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 7802b32b61..fc06579210 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index fc06579210..6922c1ab59 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 6922c1ab59..0fa910aa12 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 0fa910aa12..24a4ee2b87 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 24a4ee2b87..48bb733f71 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 48bb733f71..6eb026900c 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 6eb026900c..f13482f011 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f13482f011..b7dcfd374f 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index b7dcfd374f..1b07ee2ae6 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 1b07ee2ae6..18a0ec08ce 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 18a0ec08ce..cceb71af63 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1).png index cceb71af63..fa8d279c2d 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1).png index fa8d279c2d..68adf0ddac 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1).png index 68adf0ddac..26d101c0ff 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1).png index 26d101c0ff..2fcf6e82b5 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1) (1).png index 2fcf6e82b5..35a19d9810 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1) (1).png index 35a19d9810..a51d2a3ef0 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1) (1).png b/docs/.gitbook/assets/image (3) (1) (1).png index a51d2a3ef0..5a2541879c 100644 Binary files a/docs/.gitbook/assets/image (3) (1) (1).png and b/docs/.gitbook/assets/image (3) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (3) (1).png b/docs/.gitbook/assets/image (3) (1).png index 5a2541879c..241d68422e 100644 Binary files a/docs/.gitbook/assets/image (3) (1).png and b/docs/.gitbook/assets/image (3) (1).png differ diff --git a/docs/.gitbook/assets/image (3).png b/docs/.gitbook/assets/image (3).png index 241d68422e..151dbd3274 100644 Binary files a/docs/.gitbook/assets/image (3).png and b/docs/.gitbook/assets/image (3).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..a3104c901a Binary files /dev/null and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index a3104c901a..2a8cb2b6c6 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 2a8cb2b6c6..516fbdf12b 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 516fbdf12b..c98f9b2510 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index c98f9b2510..c9bac87ba7 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index c9bac87ba7..a7eb0f2070 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index a7eb0f2070..f4a6551096 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index f4a6551096..256ec6229a 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 256ec6229a..e2f66df572 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index e2f66df572..0a1cdbd779 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 0a1cdbd779..5de7b397c9 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 5de7b397c9..717669fd7a 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 717669fd7a..6b23ce8c9b 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 6b23ce8c9b..d110e99002 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1).png index d110e99002..6f893bfcf0 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1).png index 6f893bfcf0..2e72c0d4e6 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1).png index 2e72c0d4e6..a2a22a0a82 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1).png index a2a22a0a82..78915c7f6e 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1) (1).png index 78915c7f6e..ff359e89cf 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1) (1).png index ff359e89cf..2c45093094 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1) (1).png b/docs/.gitbook/assets/image (4) (1) (1).png index 2c45093094..dea43487f8 100644 Binary files a/docs/.gitbook/assets/image (4) (1) (1).png and b/docs/.gitbook/assets/image (4) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (4) (1).png b/docs/.gitbook/assets/image (4) (1).png index dea43487f8..2725dfe063 100644 Binary files a/docs/.gitbook/assets/image (4) (1).png and b/docs/.gitbook/assets/image (4) (1).png differ diff --git a/docs/.gitbook/assets/image (4).png b/docs/.gitbook/assets/image (4).png index 2725dfe063..224548f466 100644 Binary files a/docs/.gitbook/assets/image (4).png and b/docs/.gitbook/assets/image (4).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..8f2ac4204c Binary files /dev/null and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 8f2ac4204c..9f4f68ee19 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 9f4f68ee19..3e62b79545 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 3e62b79545..cbfa38ad80 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index cbfa38ad80..312e257bfb 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 312e257bfb..a93bf2eb41 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index a93bf2eb41..321ae9e296 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 321ae9e296..ec4f469ece 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index ec4f469ece..5de7b397c9 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 5de7b397c9..7bc8c43d4e 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 7bc8c43d4e..890d47406e 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1).png index 890d47406e..5ede63683c 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1).png index 5ede63683c..938b112bec 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1).png index 938b112bec..4c52175077 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1).png index 4c52175077..c6954eab4d 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1) (1).png index c6954eab4d..df8f143606 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1) (1).png index df8f143606..3ab3c756e4 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1) (1).png b/docs/.gitbook/assets/image (5) (1) (1).png index 3ab3c756e4..2773f301d2 100644 Binary files a/docs/.gitbook/assets/image (5) (1) (1).png and b/docs/.gitbook/assets/image (5) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (5) (1).png b/docs/.gitbook/assets/image (5) (1).png index 2773f301d2..892fcf7a01 100644 Binary files a/docs/.gitbook/assets/image (5) (1).png and b/docs/.gitbook/assets/image (5) (1).png differ diff --git a/docs/.gitbook/assets/image (5).png b/docs/.gitbook/assets/image (5).png index 892fcf7a01..c03d04983f 100644 Binary files a/docs/.gitbook/assets/image (5).png and b/docs/.gitbook/assets/image (5).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png new file mode 100644 index 0000000000..deb83004f2 Binary files /dev/null and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index deb83004f2..a520be4d62 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index a520be4d62..0482b79d28 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 0482b79d28..cceb01b44c 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index cceb01b44c..cf1ad696cb 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index cf1ad696cb..068123ac5e 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 068123ac5e..1d6030a283 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 1d6030a283..5c5eb5d7c4 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 5c5eb5d7c4..86a001dbb8 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 86a001dbb8..0814763be9 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1).png index 0814763be9..e2ded72a20 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1).png index e2ded72a20..e5af6173e1 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1).png index e5af6173e1..c28c9ea26e 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1).png index c28c9ea26e..3aae40c63a 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1).png index 3aae40c63a..c7202e8c87 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1) (1).png index c7202e8c87..b228c8735f 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1) (1).png index b228c8735f..f04cfe2d00 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1) (1).png b/docs/.gitbook/assets/image (6) (1) (1).png index f04cfe2d00..3d038d4a75 100644 Binary files a/docs/.gitbook/assets/image (6) (1) (1).png and b/docs/.gitbook/assets/image (6) (1) (1).png differ diff --git a/docs/.gitbook/assets/image (6) (1).png b/docs/.gitbook/assets/image (6) (1).png index 3d038d4a75..f62bb5b71d 100644 Binary files a/docs/.gitbook/assets/image (6) (1).png and b/docs/.gitbook/assets/image (6) (1).png differ diff --git a/docs/.gitbook/assets/image (6).png b/docs/.gitbook/assets/image (6).png index f62bb5b71d..c2c0392dcf 100644 Binary files a/docs/.gitbook/assets/image (6).png and b/docs/.gitbook/assets/image (6).png differ diff --git a/docs/.gitbook/assets/image.png b/docs/.gitbook/assets/image.png index c2c0392dcf..5c26ae8efd 100644 Binary files a/docs/.gitbook/assets/image.png and b/docs/.gitbook/assets/image.png differ diff --git a/docs/.gitbook/assets/swagger (4) (1).yaml b/docs/.gitbook/assets/swagger (4) (1).yaml new file mode 100644 index 0000000000..954c5cfe6e --- /dev/null +++ b/docs/.gitbook/assets/swagger (4) (1).yaml @@ -0,0 +1,14262 @@ +openapi: 3.0.0 +paths: + /accounts/session: + get: + operationId: AccountApi_getSession + summary: Returns current session of the user. + description: Returns current user session. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_0 + - accounts + security: + - bearer: [] + /accounts/register: + post: + operationId: AccountApi_register + summary: Registers a new user account. + description: Object that contain username, password and role (optional) fields. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/login: + post: + operationId: AccountApi_login + summary: Logs user into the system. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LoginUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/access-token: + post: + operationId: AccountApi_getAccessToken + summary: Returns access token. + description: Returns access token. + parameters: [] + responses: + '200': + description: Successful operation. + tags: *ref_0 + /accounts: + get: + operationId: AccountApi_getAllAccounts + summary: Returns a list of users, excluding Standard Registry and Auditors. + description: >- + Returns all users except those with roles Standard Registry and Auditor. + Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/standard-registries: + get: + operationId: AccountApi_getStandardRegistries + summary: Returns all Standard Registries. + description: Returns all Standard Registries. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/standard-registries/aggregated: + get: + operationId: AccountApi_getAggregatedStandardRegistries + summary: Returns all Standard Registries aggregated with polices and vcDocuments. + description: Returns all Standard Registries aggregated with polices and vcDocuments + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AggregatedDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/balance: + get: + operationId: AccountApi_getBalance + summary: Returns user's Hedera account balance. + description: Requests current Hedera account balance. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /analytics/search/policies: + post: + operationId: AnalyticsApi_searchPolicies + summary: Search policies. + description: >- + Search policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchPoliciesDTO' + examples: + Filter: + value: + policyId: '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_1 + - analytics + security: + - bearer: [] + /analytics/compare/policies: + post: + operationId: AnalyticsApi_comparePolicies + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ComparePoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/modules: + post: + operationId: AnalyticsApi_compareModules + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000001' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareModulesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/schemas: + post: + operationId: AnalyticsApi_compareSchemas + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000001' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareSchemasDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/documents: + post: + operationId: AnalyticsApi_compareDocuments + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/tools: + post: + operationId: AnalyticsApi_compareTools + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000001' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareToolsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/policies/export: + post: + operationId: AnalyticsApi_comparePoliciesExport + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/modules/export: + post: + operationId: AnalyticsApi_compareModulesExport + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000001' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/schemas/export: + post: + operationId: AnalyticsApi_compareSchemasExport + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000001' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/documents/export: + post: + operationId: AnalyticsApi_compareDocumentsExport + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/tools/export: + post: + operationId: AnalyticsApi_compareToolsExport + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000001' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/search/blocks: + post: + operationId: AnalyticsApi_searchBlocks + summary: Search same blocks. + description: >- + Search same blocks. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchBlocksDTO' + examples: + Filter: + value: + uuid: '' + config: {} + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchBlocksDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /artifacts: + get: + operationId: ArtifactApi_getArtifacts + summary: Returns all artifacts. + description: Returns all artifacts. + parameters: + - name: id + required: false + in: query + description: Artifact identifier + example: '000000000000000000000001' + schema: + type: string + - name: type + required: false + in: query + description: Tool|Policy + example: policy + schema: + enum: + - tool + - policy + type: string + - name: policyId + required: false + in: query + description: Policy identifier + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool identifier + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ArtifactDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_2 + - artifacts + security: + - bearer: [] + /artifacts/{parentId}: + post: + operationId: ArtifactApi_uploadArtifacts + summary: Upload artifact. + description: Upload artifact. For users with the Standard Registry role only. + parameters: + - name: parentId + required: true + in: path + description: Parent ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Form data with artifacts. + content: + multipart/form-data: + schema: + type: array + items: + type: object + properties: + artifacts: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ArtifactDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /artifacts/{artifactId}: + delete: + operationId: ArtifactApi_deleteArtifact + summary: Delete artifact. + description: Delete artifact. + parameters: + - name: artifactId + required: true + in: path + description: Artifact ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts: + get: + operationId: ContractsApi_getContracts + summary: Return a list of all contracts. + description: Returns all contracts. + parameters: + - name: type + required: false + in: query + description: Contract type + example: RETIRE + schema: + enum: + - WIPE + - RETIRE + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Contracts. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_3 + - contracts + security: + - bearer: [] + post: + operationId: ContractsApi_createContract + summary: Create contract. + description: >- + Create smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ContractConfigDTO' + responses: + '201': + description: Created contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/import: + post: + operationId: ContractsApi_importContract + summary: Import contract. + description: >- + Import smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + contractId: + type: string + description: Hedera Identifier + example: 0.0.1 + description: + type: string + required: + - contractId + responses: + '200': + description: Imported contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/{contractId}/permissions: + get: + operationId: ContractsApi_contractPermissions + summary: Get contract permissions. + description: >- + Get smart-contract permissions. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Contract permissions. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/{contractId}: + delete: + operationId: ContractsApi_removeContract + summary: Remove contract. + description: >- + Remove smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests: + get: + operationId: ContractsApi_getWipeRequests + summary: Return a list of all wipe requests. + description: >- + Returns all wipe requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: false + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WiperRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/enable: + post: + operationId: ContractsApi_enableWipeRequests + summary: Enable wipe requests. + description: >- + Enable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/disable: + post: + operationId: ContractsApi_disableWipeRequests + summary: Disable wipe requests. + description: >- + Disable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveWipeRequest + summary: Approve wipe request. + description: >- + Approve wipe contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/reject: + delete: + operationId: ContractsApi_rejectWipeRequest + summary: Reject wipe request. + description: >- + Reject wipe contract request. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: ban + required: false + in: query + description: Reject and ban + example: true + schema: + type: boolean + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests: + delete: + operationId: ContractsApi_clearWipeRequests + summary: Clear wipe requests. + description: >- + Clear wipe contract requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_wipeAddAdmin + summary: Add wipe admin. + description: >- + Add wipe contract admin. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/manager/{hederaId}: + post: + operationId: ContractsApi_wipeAddManager + summary: Add wipe manager. + description: >- + Add wipe contract manager. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveManager + summary: Remove wipe manager. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/wiper/{hederaId}: + post: + operationId: ContractsApi_wipeAddWiper + summary: Add wipe wiper. + description: >- + Add wipe contract wiper. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveWiper + summary: Remove wipe wiper. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/pools/sync: + post: + operationId: ContractsApi_retireSyncPools + summary: Sync retire pools. + description: >- + Sync retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Sync date. + content: + application/json: + schema: + $ref: '#/components/schemas/Date' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests: + get: + operationId: ContractsApi_getRetireRequests + summary: Return a list of all retire requests. + description: Returns all retire requests. + parameters: + - name: contractId + required: false + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetireRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools: + get: + operationId: ContractsApi_getRetirePools + summary: Return a list of all retire pools. + description: Returns all retire pools. + parameters: + - name: contractId + required: false + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: tokens + required: false + in: query + description: Tokens + example: 0.0.1,0.0.2,0.0.3 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/requests: + delete: + operationId: ContractsApi_clearRetireRequests + summary: Clear retire requests. + description: >- + Clear retire contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/pools: + delete: + operationId: ContractsApi_clearRetirePools + summary: Clear retire pools. + description: >- + Clear retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + post: + operationId: ContractsApi_setRetirePool + summary: Set retire pool. + description: >- + Set retire contract pool. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools/{poolId}: + delete: + operationId: ContractsApi_unsetRetirePool + summary: Unset retire pool. + description: >- + Unset retire contract pool. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: poolId + required: true + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}: + delete: + operationId: ContractsApi_unsetRetireRequest + summary: Unset retire request. + description: >- + Unset retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools/{poolId}/retire: + post: + operationId: ContractsApi_retire + summary: Retire tokens. + description: Retire tokens. + parameters: + - name: poolId + required: true + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetireRequestTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveRetire + summary: Approve retire request. + description: >- + Approve retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/cancel: + delete: + operationId: ContractsApi_cancelRetireRequest + summary: Cancel retire request. + description: Cancel retire contract request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_retireAddAdmin + summary: Add retire admin. + description: >- + Add retire contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_retireRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire: + get: + operationId: ContractsApi_getRetireVCs + summary: Return a list of all retire vcs. + description: Returns all retire vcs. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /demo/registered-users: + get: + operationId: DemoApi_registeredUsers + summary: Returns list of registered users. + description: Returns list of registered users. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RegisteredUsersDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_4 + - demo + /demo/random-key: + get: + operationId: DemoApi_randomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearer: [] + /demo/push/random-key: + get: + operationId: DemoApi_pushRandomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearer: [] + /external: + post: + operationId: ExternalApi_receiveExternalData + summary: Sends data from an external source. + description: Sends data from an external source. + parameters: [] + requestBody: + required: true + description: Object that contains a VC Document. + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - external + /ipfs/file: + post: + operationId: IpfsApi_postFile + summary: Add file from ipfs. + description: Add file from ipfs. + parameters: [] + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_5 + - ipfs + security: + - bearer: [] + /ipfs/file/dry-run/{policyId}: + post: + operationId: IpfsApi_postFileDryRun + summary: Add file from ipfs for dry run mode. + description: Add file from ipfs for dry run mode. + parameters: + - name: policyId + required: true + in: path + description: Policy id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /ipfs/file/{cid}: + get: + operationId: IpfsApi_getFile + summary: Get file from ipfs. + description: Get file from ipfs. + parameters: + - name: cid + required: true + in: path + description: File cid + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /ipfs/file/{cid}/dry-run: + get: + operationId: IpfsApi_getFileDryRun + summary: Get file from ipfs for dry run mode. + description: Get file from ipfs for dry run mode. + parameters: + - name: cid + required: true + in: path + description: File cid + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /logs: + post: + operationId: LoggerApi_getLogs + summary: Return a list of all logs. + description: >- + Return a list of all logs. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/LogFilterDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/LogResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_6 + - logs + security: + - bearer: [] + /logs/attributes: + get: + operationId: LoggerApi_getAttributes + summary: Return a list of attributes. + description: >- + Return a list of attributes. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: name + required: false + in: query + description: Name + example: Search + schema: + type: number + - name: existingAttributes + required: false + in: query + description: Existing attributes + example: + - WORKER + schema: + type: array + items: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearer: [] + /map/key: + get: + operationId: MapApi_getKey + summary: Return map key. + description: Return map key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_7 + - map + /map/sh: + get: + operationId: MapApi_getSentinelKey + summary: Return map key. + description: Return map key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + /metrics: + get: + operationId: MetricsApi_getMetrics + parameters: [] + responses: + '200': + description: '' + tags: + - metrics + /modules: + post: + operationId: ModulesApi_postModules + summary: Creates a new module. + description: >- + Creates a new module. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_8 + - modules + security: + - bearer: [] + get: + operationId: ModulesApi_getModules + summary: Return a list of all modules. + description: >- + Returns all modules. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/schemas: + get: + operationId: ModulesApi_getModuleSchemas + summary: Return a list of all module schemas. + description: >- + Returns all module schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + post: + operationId: ModulesApi_postSchemas + summary: Creates a new module schema. + description: >- + Creates a new module schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '201': + description: Created schema. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}: + delete: + operationId: ModulesApi_deleteModule + summary: Deletes the module. + description: >- + Deletes the module with the provided module ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + get: + operationId: ModulesApi_getModule + summary: Retrieves module configuration. + description: >- + Retrieves module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + put: + operationId: ModulesApi_putModule + summary: Updates module configuration. + description: >- + Updates module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/menu: + get: + operationId: ModulesApi_getMenu + summary: Return a list of modules. + description: >- + Returns modules menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/export/file: + get: + operationId: ModulesApi_moduleExportFile + summary: >- + Return module and its artifacts in a zip file format for the specified + module. + description: >- + Returns a zip file containing the published module and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: File. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/export/message: + get: + operationId: ModulesApi_moduleExportMessage + summary: Return Heder message ID for the specified published module. + description: >- + Returns the Hedera message ID for the specified module published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/message: + post: + operationId: ModulesApi_moduleImportMessage + summary: Imports new module from IPFS. + description: >- + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/file: + post: + operationId: ModulesApi_moduleImportFile + summary: Imports new module from a zip file. + description: >- + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/message/preview: + post: + operationId: ModulesApi_moduleImportMessagePreview + summary: Imports new module from IPFS. + description: >- + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ModulePreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/file/preview: + post: + operationId: ModulesApi_moduleImportFilePreview + summary: Imports new module from a zip file. + description: >- + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ModulePreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/publish: + put: + operationId: ModulesApi_publishModule + summary: Publishes the module onto IPFS. + description: >- + Publishes the module with the specified (internal) module ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/validate: + post: + operationId: ModulesApi_validateModule + summary: Validates selected module. + description: >- + Validates selected module. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /tools: + post: + operationId: ToolsApi_createNewTool + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_9 + - tools + security: + - bearer: [] + get: + operationId: ToolsApi_getTools + summary: Return a list of all tools. + description: >- + Returns all tools. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push: + post: + operationId: ToolsApi_createNewToolAsync + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}: + delete: + operationId: ToolsApi_deleteTool + summary: >- + Deletes the tool with the provided tool ID. Only users with the Standard + Registry role are allowed to make the request. + description: Deletes the tool. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + get: + operationId: ToolsApi_getToolById + summary: Retrieves tool configuration. + description: >- + Retrieves tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + put: + operationId: ToolsApi_updateTool + summary: Updates tool configuration. + description: >- + Updates tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/publish: + put: + operationId: ToolsApi_publishTool + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/push/publish: + put: + operationId: ToolsApi_publishToolAsync + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/validate: + post: + operationId: ToolsApi_validateTool + summary: Validates selected tool. + description: >- + Validates selected tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/export/file: + get: + operationId: ToolsApi_toolExportFile + summary: >- + Return tool and its artifacts in a zip file format for the specified + tool. + description: >- + Returns a zip file containing the published tool and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/export/message: + get: + operationId: ToolsApi_toolExportMessage + summary: Return Heder message ID for the specified published tool. + description: >- + Returns the Hedera message ID for the specified tool published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/message/preview: + post: + operationId: ToolsApi_toolImportMessagePreview + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Tool preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/message: + post: + operationId: ToolsApi_toolImportMessage + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file/preview: + post: + operationId: ToolsApi_toolImportFilePreview + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file: + post: + operationId: ToolsApi_toolImportFile + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadata + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/file: + post: + operationId: ToolsApi_toolImportFileAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing tool config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadataAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/message: + post: + operationId: ToolsApi_toolImportMessageAsync + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/menu/all: + get: + operationId: ToolsApi_getMenu + summary: Return a list of tools. + description: >- + Returns tools menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /profiles/{username}: + get: + operationId: ProfileApi_getProfile + summary: Returns user account info. + description: >- + Returns user account information. For users with the Standard Registry + role it also returns address book and VC document information. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the information + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ProfileDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_10 + - profiles + security: + - bearer: [] + put: + operationId: ProfileApi_setUserProfile + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/push/{username}: + put: + operationId: ProfileApi_setUserProfileAsync + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/{username}/balance: + get: + operationId: ProfileApi_getUserBalance + summary: Returns user's Hedera account balance. + description: >- + Requests Hedera account balance. Only users with the Installer role are + allowed to make the request. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the balance. + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/restore/{username}: + put: + operationId: ProfileApi_restoreUserProfile + summary: Restore user data (policy, DID documents, VC documents). + description: Restore user data (policy, DID documents, VC documents). + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/restore/topics/{username}: + put: + operationId: ProfileApi_restoreTopic + summary: List of available recovery topics. + description: List of available recovery topics. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/did-document/validate: + post: + operationId: ProfileApi_validateDidDocument + summary: Validate DID document format. + description: Validate DID document format. + parameters: [] + requestBody: + required: true + description: DID Document. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/did-keys/validate: + post: + operationId: ProfileApi_validateDidKeys + summary: Validate DID document keys. + description: Validate DID document keys. + parameters: [] + requestBody: + required: true + description: DID Document and keys. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentWithKeyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidKeyStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /policies: + get: + operationId: PolicyApi_getPolicies + summary: Return a list of all policies. + description: Returns all policies. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_11 + - policies + security: + - bearer: [] + post: + operationId: PolicyApi_createPolicy + summary: Creates a new policy. + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/migrate-data: + post: + operationId: PolicyApi_migrateData + summary: Migrate policy data. + description: >- + Migrate policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration config. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '200': + description: Errors while migration. + content: + application/json: + schema: + type: array + items: + type: object + properties: + error: + type: string + id: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/migrate-data: + post: + operationId: PolicyApi_migrateDataAsync + summary: Migrate policy data asynchronous. + description: >- + Migrate policy data asynchronous. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '202': + description: Created task. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push: + post: + operationId: PolicyApi_createPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/{policyId}: + post: + operationId: PolicyApi_updatePolicyAsync + summary: Clones policy. + description: >- + Clones policy. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + delete: + operationId: PolicyApi_deletePolicyAsync + summary: Remove policy. + description: >- + Remove policy. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}: + get: + operationId: PolicyApi_getPolicy + summary: Retrieves policy configuration. + description: >- + Retrieves policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + put: + operationId: PolicyApi_updatePolicy + summary: Updates policy configuration. + description: >- + Updates policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicy + summary: Publishes the policy onto IPFS. + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PoliciesValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicyAsync + summary: Publishes the policy onto IPFS. + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run: + put: + operationId: PolicyApi_dryRunPolicy + summary: Dry Run policy. + description: >- + Run policy without making any persistent changes or executing + transaction. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PoliciesValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/discontinue: + put: + operationId: PolicyApi_discontinuePolicy + summary: Discontinue policy. + description: >- + Discontinue policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Discontinue details. + content: + application/json: + schema: + type: object + properties: + date: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/draft: + put: + operationId: PolicyApi_draftPolicy + summary: Return policy to editing. + description: >- + Return policy to editing. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/validate: + post: + operationId: PolicyApi_validatePolicy + summary: Validates policy. + description: >- + Validates selected policy. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/navigation: + get: + operationId: PolicyApi_getPolicyNavigation + summary: Returns a policy navigation. + description: Returns a policy navigation. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/groups: + get: + operationId: PolicyApi_getPolicyGroups + summary: Returns a list of groups the user is a member of. + description: Returns a list of groups the user is a member of. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setPolicyGroups + summary: Makes the selected group active. + description: >- + Makes the selected group active. if UUID is not set then returns the + user to the default state. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Group + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/documents: + get: + operationId: PolicyApi_getPolicyDocuments + summary: Get policy documents. + description: >- + Get policy documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: type + required: false + in: query + description: Document type. + example: VC + schema: + enum: + - VC + - VP + type: string + - name: includeDocument + required: false + in: query + description: Include document field. + example: true + schema: + type: boolean + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Documents. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/data: + get: + operationId: PolicyApi_downloadPolicyData + summary: Get policy data. + description: >- + Get policy data. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy data. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/data: + post: + operationId: PolicyApi_uploadPolicyData + summary: Upload policy data. + description: >- + Upload policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy data file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Uploaded policy. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag-block-map: + get: + operationId: PolicyApi_getTagBlockMap + summary: Get policy tag block map. + description: >- + Get policy tag block map. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy tag block map. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/virtual-keys: + get: + operationId: PolicyApi_downloadVirtualKeys + summary: Get policy virtual keys. + description: >- + Get policy virtual keys. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy virtual keys. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_uploadVirtualKeys + summary: Upload policy virtual keys. + description: >- + Upload policy virtual keys. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Virtual keys file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Operation completed. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks: + get: + operationId: PolicyApi_getPolicyBlocks + summary: Retrieves data for the policy root block. + description: >- + Returns data from the root policy block. Only users with the Standard + Registry and Installer role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks/{uuid}: + get: + operationId: PolicyApi_getBlockData + summary: Requests block data. + description: >- + Requests block data. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setBlockData + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Data + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag/{tagName}/blocks: + post: + operationId: PolicyApi_setBlocksByTagName + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + requestBody: + required: true + description: Data + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + get: + operationId: PolicyApi_getBlocksByTagName + summary: Requests block data. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag/{tagName}: + get: + operationId: PolicyApi_getBlockByTagName + summary: Requests block config. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks/{uuid}/parents: + get: + operationId: PolicyApi_getBlockParents + summary: Requests block's parents. + description: >- + Requests block's parents. Only users with a role that described in block + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/file: + get: + operationId: PolicyApi_getPolicyExportFile + summary: >- + Return policy and its artifacts in a zip file format for the specified + policy. + description: >- + Returns a zip file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/message: + get: + operationId: PolicyApi_getPolicyExportMessage + summary: Return Heder message ID for the specified published policy. + description: >- + Returns the Hedera message ID for the specified policy published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/xlsx: + get: + operationId: PolicyApi_getPolicyExportXlsx + summary: >- + Return policy and its artifacts in a xlsx file format for the specified + policy. + description: >- + Returns a xlsx file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/message: + post: + operationId: PolicyApi_importPolicyFromMessage + summary: Imports new policy from IPFS. + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Created policy. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/message: + post: + operationId: PolicyApi_importPolicyFromMessageAsync + summary: Imports new policy from IPFS. + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/message/preview: + post: + operationId: PolicyApi_importMessage + summary: Policy preview from IPFS. + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Policy preview. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/message/preview: + post: + operationId: PolicyApi_importFromMessagePreview + summary: Policy preview from IPFS. + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file: + post: + operationId: PolicyApi_importPolicyFromFile + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Created policy. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadata + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/file: + post: + operationId: PolicyApi_importPolicyFromFileAsync + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadataAsync + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file/preview: + post: + operationId: PolicyApi_importPolicyFromFilePreview + summary: Policy preview from a zip file. + description: >- + Previews the policy from a zip file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Policy preview. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsx + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsxAsync + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx/preview: + post: + operationId: PolicyApi_importPolicyFromXlsxPreview + summary: Policy preview from a xlsx file. + description: >- + Previews the policy from a xlsx file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/blocks/about: + get: + operationId: PolicyApi_getBlockAbout + summary: Returns block descriptions. + description: >- + Returns block descriptions. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Block descriptions. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/users: + get: + operationId: PolicyApi_getDryRunUsers + summary: Returns virtual users. + description: >- + Returns virtual users. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/user: + post: + operationId: PolicyApi_setDryRunUser + summary: Creates virtual users. + description: >- + Creates virtual users. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/login: + post: + operationId: PolicyApi_loginDryRunUser + summary: Change active virtual user. + description: >- + Change active virtual user. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/restart: + post: + operationId: PolicyApi_restartDryRun + summary: Clear dry-run state. + description: >- + Clear dry-run state. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/transactions: + get: + operationId: PolicyApi_getDryRunTransactions + summary: Get dry-run details (Transactions). + description: >- + Get dry-run details (Transactions). Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Transactions. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/artifacts: + get: + operationId: PolicyApi_getDryRunArtifacts + summary: Get dry-run details (Artifacts). + description: >- + Get dry-run details (Artifacts). Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Artifacts. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/ipfs: + get: + operationId: PolicyApi_getDryRunIpfs + summary: Get dry-run details (Files). + description: >- + Get dry-run details (Files). Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 20 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Files. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/multiple: + get: + operationId: PolicyApi_getMultiplePolicies + summary: Requests policy links. + description: >- + Requests policy links. Only users with a role that described in block + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setMultiplePolicies + summary: Creates policy link. + description: >- + Creates policy link. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/methodologies/categories: + get: + operationId: PolicyApi_getPolicyCategoriesAsync + summary: Get all categories + description: Get all categories + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyCategoryDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /policies/methodologies/search: + post: + operationId: PolicyApi_getPoliciesByCategory + summary: Get filtered policies + description: Get policies by categories and text + parameters: [] + requestBody: + required: true + description: Filters + content: + application/json: + schema: + type: string + examples: + Filter1: + value: + categoryIds: + - '000000000000000000000001' + - '000000000000000000000001' + text: abc + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /schema/{schemaId}: + get: + operationId: SingleSchemaApi_getSchema + summary: Returns schema by schema ID. + description: >- + Returns schema by schema ID. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_12 + - schema + security: + - bearer: [] + /schema/{schemaId}/parents: + get: + operationId: SingleSchemaApi_getSchemaParents + summary: Returns all parent schemas. + description: Returns all parent schemas. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + /schema/{schemaId}/tree: + get: + operationId: SingleSchemaApi_getSchemaTree + summary: Returns schema tree. + description: Returns schema tree. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + name: + type: string + type: + type: string + children: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + /schemas: + get: + operationId: SchemaApi_getSchemasPage + summary: Return a list of all schemas. + description: Returns all schemas. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: policyId + required: false + in: query + description: Policy id + example: '000000000000000000000001' + schema: + type: string + - name: moduleId + required: false + in: query + description: Module id + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool id + example: '000000000000000000000001' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_13 + - schemas + security: + - bearer: [] + put: + operationId: SchemaApi_setSchema + summary: Updates the schema. + description: >- + Updates the schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}: + get: + operationId: SchemaApi_getSchemasPageByTopicId + summary: Return a list of all schemas. + description: Returns all schemas. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + post: + operationId: SchemaApi_createNewSchema + summary: Creates a new schema. + description: >- + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/type/{schemaType}: + get: + operationId: SchemaApi_getSchemaByType + summary: Finds the schema using the json document type. + description: Finds the schema using the json document type. + parameters: + - name: schemaType + required: true + in: path + description: Type + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/list/all: + get: + operationId: SchemaApi_getAll + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/list/sub: + get: + operationId: SchemaApi_getSub + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/copy: + post: + operationId: SchemaApi_copySchemaAsync + summary: Copy schema. + description: >- + Copy schema. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}: + post: + operationId: SchemaApi_createNewSchemaAsync + summary: Creates a new schema. + description: >- + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}: + delete: + operationId: SchemaApi_deleteSchema + summary: Deletes the schema with the provided schema ID. + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchema + summary: Publishes the schema with the provided schema ID. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchemaAsync + summary: Publishes the schema with the provided schema ID. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreview + summary: Previews the schema from IPFS without loading it into the local DB. + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreviewAsync + summary: Previews the schema from IPFS without loading it into the local DB. + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/file/preview: + post: + operationId: SchemaApi_importFromFilePreview + summary: Previews the schema from a zip file. + description: >- + Previews the schema from a zip file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessage + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessageAsync + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFile + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFileAsync + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/message: + get: + operationId: SchemaApi_exportMessage + summary: Returns Hedera message IDs of the published schemas. + description: >- + Returns Hedera message IDs of the published schemas, these messages + contain IPFS CIDs of these schema files. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportSchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/file: + get: + operationId: SchemaApi_exportToFile + summary: Returns schema files for the schema. + description: >- + Returns schema files for the schema. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{username}: + post: + operationId: SchemaApi_postSystemSchema + summary: Creates a new system schema. + description: >- + Creates a new system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: username + required: true + in: path + description: username + example: username + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SystemSchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + get: + operationId: SchemaApi_getSystemSchema + summary: Return a list of all system schemas. + description: >- + Returns all system schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: username + required: true + in: path + description: username + example: username + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{schemaId}: + delete: + operationId: SchemaApi_deleteSystemSchema + summary: Deletes the system schema with the provided schema ID. + description: >- + Deletes the system schema with the provided schema ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + put: + operationId: SchemaApi_setSystemSchema + summary: Updates the system schema. + description: >- + Updates the system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{schemaId}/active: + put: + operationId: SchemaApi_activeSystemSchema + summary: >- + Makes the selected scheme active. Other schemes of the same type become + inactive + description: >- + Makes the selected scheme active. Other schemes of the same type become + inactive Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/entity/{schemaEntity}: + get: + operationId: SchemaApi_getSchemaEntity + summary: Finds the schema using the schema type. + description: Finds the schema using the schema type. + parameters: + - name: schemaEntity + required: true + in: path + description: Entity name + example: STANDARD_REGISTRY + schema: + type: string + enum: + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - WIPE_TOKEN + - MINT_NFTOKEN + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/xlsx: + get: + operationId: SchemaApi_getPolicyExportXlsx + summary: Return schemas in a xlsx file format for the specified policy. + description: >- + Returns a xlsx file containing schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsx + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsxAsync + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/xlsx/preview: + post: + operationId: SchemaApi_importPolicyFromXlsxPreview + summary: Previews the schema from a xlsx file. + description: >- + Previews the schema from a xlsx file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/export/template: + get: + operationId: SchemaApi_exportTemplate + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /settings: + post: + operationId: SettingsApi_updateSettings + summary: Set settings. + description: Set settings. For users with the Standard Registry role only. + parameters: [] + requestBody: + required: true + description: Settings. + content: + application/json: + schema: + $ref: '#/components/schemas/SettingsDTO' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_14 + - settings + security: + - bearer: [] + get: + operationId: SettingsApi_getSettings + summary: Returns current settings. + description: >- + Returns current settings. For users with the Standard Registry role + only. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SettingsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /settings/environment: + get: + operationId: SettingsApi_getEnvironment + summary: Returns current environment name. + description: Returns current environment name. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /settings/about: + get: + operationId: SettingsApi_getAbout + summary: Returns package version. + description: Returns package version. For users with the Standard Registry role only. + parameters: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /tags: + post: + operationId: TagsApi_setTags + summary: Creates new tag. + description: Creates new tag. + parameters: [] + requestBody: + required: true + description: Object that contains tag information. + content: + application/json: + schema: + $ref: '#/components/schemas/TagDTO' + responses: + '200': + description: Created tag. + content: + application/json: + schema: + $ref: '#/components/schemas/TagDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_15 + - tags + security: + - bearer: [] + /tags/search: + post: + operationId: TagsApi_searchTags + summary: Search tags. + description: Search tags. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' + Multiple: + value: + entity: PolicyDocument + targets: + - '0000000000.000000001' + - '0000000000.000000001' + responses: + '200': + description: Created tag. + content: + application/json: + schema: + $ref: '#/components/schemas/TagMapDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/{uuid}: + delete: + operationId: TagsApi_deleteTag + summary: Delete tag. + description: Delete tag. + parameters: + - name: uuid + required: true + in: path + description: Tag identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/synchronization: + post: + operationId: TagsApi_synchronizationTags + summary: Synchronization of tags with an external network. + description: Synchronization of tags with an external network. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TagMapDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas: + get: + operationId: TagsApi_getSchemas + summary: Return a list of all tag schemas. + description: >- + Returns all tag schemas. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + post: + operationId: TagsApi_postSchemas + summary: Creates a new tag schema. + description: >- + Creates a new tag schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '201': + description: Created schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/{schemaId}: + delete: + operationId: TagsApi_deleteSchema + summary: Deletes the schema. + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + put: + operationId: TagsApi_updateSchema + summary: Updates schema configuration. + description: >- + Updates schema configuration for the specified schema ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/{schemaId}/publish: + put: + operationId: TagsApi_publishTag + summary: Publishes the schema. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/published: + get: + operationId: TagsApi_getPublished + summary: Return a list of all published schemas. + description: >- + Return a list of all published schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tasks/{taskId}: + get: + operationId: TaskApi_getTask + summary: Returns task statuses by Id. + description: Returns task statuses by Id. + parameters: + - name: taskId + required: true + in: path + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - tasks + security: + - bearer: [] + /tokens: + get: + operationId: TokensApi_getTokens + summary: Return a list of tokens. + description: >- + Returns all tokens. For the Standard Registry role it returns only the + list of tokens, for other users it also returns token balances as well + as the KYC, Freeze, and Association statuses. Not allowed for the + Auditor role. + parameters: + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: status + required: false + in: query + description: Token status + example: All + schema: + enum: + - Associated + - All + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_16 + - tokens + security: + - bearer: [] + post: + operationId: TokensApi_newToken + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + put: + operationId: TokensApi_updateToken + summary: Update token. + description: >- + Update token. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Updated token. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push: + post: + operationId: TokensApi_pushTokenAsync + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + put: + operationId: TokensApi_updateTokenAsync + summary: Update token. + description: >- + Update token. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}: + delete: + operationId: TokensApi_deleteTokenAsync + summary: Deletes the token with the provided schema ID. + description: >- + Deletes the token with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/associate: + put: + operationId: TokensApi_associateToken + summary: Associates the user with the provided Hedera token. + description: >- + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/associate: + put: + operationId: TokensApi_associateTokenAsync + summary: Associates the user with the provided Hedera token. + description: >- + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateToken + summary: Associate the user with the provided Hedera token. + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateTokenAsync + summary: Associate the user with the provided Hedera token. + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKyc + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKycAsync + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKyc + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKycAsync + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeToken + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeToken + summary: Unfreezes transfers of the specified token for the user. + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeTokenAsync + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeTokenAsync + summary: Unfreezes transfers of the specified token for the user. + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/info: + get: + operationId: TokensApi_getTokenInfo + summary: Returns user information for the selected token. + description: >- + Returns user information for the selected token. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/serials: + get: + operationId: TokensApi_getTokenSerials + summary: Return token serials. + description: Returns token serials of current user. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Token serials. + content: + application/json: + schema: + type: array + items: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/menu/all: + get: + operationId: TokensApi_getMenu + summary: Return a list of tokens. + description: >- + Returns tokens menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /themes: + post: + operationId: ThemesApi_setThemes + summary: Creates a new theme. + description: >- + Creates a new theme. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a theme. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_17 + - themes + security: + - bearer: [] + get: + operationId: ThemesApi_getThemes + summary: Returns a list of all themes. + description: >- + Returns a list of all themes. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/{themeId}: + put: + operationId: ThemesApi_updateTheme + summary: Updates theme configuration. + description: >- + Updates theme configuration for the specified theme ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a theme. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + delete: + operationId: ThemesApi_deleteTheme + summary: Deletes the theme. + description: >- + Deletes the theme with the provided theme ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/import/file: + post: + operationId: ThemesApi_importTheme + summary: Imports new theme from a zip file. + description: >- + Imports new theme from the provided zip file into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing theme to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/{themeId}/export/file: + get: + operationId: ThemesApi_exportTheme + summary: Returns a zip file containing the theme. + description: >- + Returns a zip file containing the theme. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /trust-chains: + get: + operationId: TrustChainsApi_getTrustChains + summary: Returns a list of all VP documents. + description: >- + Returns a list of all VP documents. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: policyOwner + required: false + in: query + description: Policy Owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VpDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_18 + - trust-chains + security: + - bearer: [] + /trust-chains/{hash}: + get: + operationId: TrustChainsApi_getTrustChainByHash + summary: Builds and returns a trustchain, from the VP to the root VC document. + description: >- + Builds and returns a trustchain, from the VP to the root VC document. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: hash + required: true + in: path + description: Hash + example: hash + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + chain: + type: array + items: + type: object + properties: + id: + type: string + type: + type: string + tag: + type: string + label: + type: string + schema: + type: string + owner: + type: string + document: + type: object + required: + - id + - type + - tag + - label + - schema + - owner + - document + userMap: + type: array + items: + type: object + properties: + did: + type: string + username: + type: string + required: + - did + - username + required: + - chain + - userMap + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_18 + security: + - bearer: [] + /wizard/policy: + post: + operationId: WizardApi_setPolicy + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_19 + - wizard + security: + - bearer: [] + /wizard/push/policy: + post: + operationId: WizardApi_setPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigAsyncDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 + security: + - bearer: [] + /wizard/{policyId}/config: + post: + operationId: WizardApi_setPolicyConfig + summary: Get policy config. + description: >- + Get policy config by wizard. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 + security: + - bearer: [] + /branding: + post: + operationId: BrandingApi_setBranding + summary: Update branding. + description: >- + Update branding. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains config. + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingDTO' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_20 + - branding + security: + - bearer: [] + get: + operationId: BrandingApi_getBranding + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_20 + /suggestions: + post: + operationId: SuggestionsApi_policySuggestions + summary: Get next and nested suggested block types + description: >- + Get next and nested suggested block types. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Data. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsInputDTO' + responses: + '200': + description: >- + Successful operation. Suggested next and nested block types + respectively. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsOutputDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_21 + - suggestions + security: + - bearer: [] + /suggestions/config: + post: + operationId: SuggestionsApi_setPolicySuggestionsConfig + summary: Set suggestions config + description: >- + Set suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + responses: + '201': + description: Successful operation. Response setted suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + get: + operationId: SuggestionsApi_getPolicySuggestionsConfig + summary: Get suggestions config + description: >- + Get suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. Response suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + /notifications: + get: + operationId: NotificationsApi_getAllNotifications + summary: Get all notifications + description: Returns all notifications. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_22 + - notifications + security: + - bearer: [] + /notifications/new: + get: + operationId: NotificationsApi_getNewNotifications + summary: Get new notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns new notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/progresses: + get: + operationId: NotificationsApi_getProgresses + summary: Get progresses + description: Returns progresses. + parameters: [] + responses: + '200': + description: Successful operation. Returns progresses. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProgressDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/read/all: + post: + operationId: NotificationsApi_readAll + summary: Read all notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/delete/{notificationId}: + delete: + operationId: NotificationsApi_delete + summary: Delete notifications up to this point + description: Returns deleted notifications count. + parameters: + - name: notificationId + required: true + in: path + description: Notification Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. Returns deleted notifications count. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /projects/search: + post: + operationId: ProjectsAPI_projectSearch + summary: Search projects + description: Search projects by filters + parameters: [] + requestBody: + required: true + description: The question of choosing a methodology + content: + application/json: + schema: + type: string + examples: + q: + value: >- + What methodology can I use for production of electricity using + renewable energy technologies? + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_23 + - projects + /projects/compare/documents: + post: + operationId: ProjectsAPI_compareDocumentsV2 + summary: Compare documents. + description: Compare documents. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsV2DTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /projects/properties: + get: + operationId: ProjectsAPI_getPolicyProperties + summary: Get all properties + description: Get all properties + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PropertiesDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /record/{policyId}/status: + get: + operationId: RecordApi_getRecordStatus + summary: Get recording or running status. + description: >- + Get recording or running status. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RecordStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_24 + - record + security: + - bearer: [] + /record/{policyId}/recording/start: + post: + operationId: RecordApi_startRecord + summary: Start recording. + description: >- + Start recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/stop: + post: + operationId: RecordApi_stopRecord + summary: Stop recording. + description: >- + Stop recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/actions: + get: + operationId: RecordApi_getRecordActions + summary: Get recorded actions. + description: >- + Get recorded actions. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecordActionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/start: + post: + operationId: RecordApi_runRecord + summary: Run record from a zip file. + description: >- + Run record from a zip file. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing record to be run. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/stop: + post: + operationId: RecordApi_stopRunning + summary: Stop running. + description: >- + Stop running. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/results: + get: + operationId: RecordApi_getRecordResults + summary: Get running results. + description: >- + Get running results. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/details: + get: + operationId: RecordApi_getRecordDetails + summary: Get running details. + description: >- + Get running details. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/fast-forward: + post: + operationId: RecordApi_fastForward + summary: Fast Forward. + description: >- + Fast Forward. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/retry: + post: + operationId: RecordApi_retryStep + summary: Retry step. + description: >- + Retry step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/skip: + post: + operationId: RecordApi_skipStep + summary: Skip step. + description: >- + Skip step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /ai-suggestions/ask: + get: + operationId: AISuggestionsAPI_getAIAnswer + summary: Get methodology suggestion + description: Returns AI response to the current question + parameters: + - name: q + required: true + in: query + description: The question of choosing a methodology + example: Find me large scale projects + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_25 + - ai-suggestions + /ai-suggestions/rebuild-vector: + put: + operationId: AISuggestionsAPI_rebuildVector + summary: Rebuild AI vector + description: Rebuilds vector based on policy data in the DB + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_25 + /permissions: + get: + operationId: PermissionsApi_getPermissions + summary: Return a list of all permissions. + description: Returns all permissions. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PermissionsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_26 + - permissions + security: + - bearer: [] + /permissions/roles: + get: + operationId: PermissionsApi_getRoles + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: name + required: false + in: query + description: Filter by role name + example: name + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + post: + operationId: PermissionsApi_createRole + summary: Creates new role. + description: Creates new role. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/{id}: + put: + operationId: PermissionsApi_updateRole + summary: Updates role configuration. + description: Updates role configuration for the specified role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + delete: + operationId: PermissionsApi_deleteModule + summary: Deletes the role. + description: Deletes the role with the provided role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/default: + post: + operationId: PermissionsApi_setDefaultRole + summary: Set default role. + description: Set the role as default for new users. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Role Identifier + example: '000000000000000000000001' + required: + - id + examples: + Default: + value: + id: '000000000000000000000001' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users: + get: + operationId: PermissionsApi_getUsers + summary: Return a list of all users. + description: Returns all users. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: role + required: false + in: query + description: Filter by role + example: '000000000000000000000001' + schema: + type: string + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - Active + - Inactive + type: string + - name: username + required: false + in: query + description: Filter by username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}: + get: + operationId: PermissionsApi_getUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + put: + operationId: PermissionsApi_updateUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies: + get: + operationId: PermissionsApi_getAssignedPolicies + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - ALL + - DRAFT + - DRY-RUN + - PUBLISH_ERROR + - DISCONTINUED + - PUBLISH + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/assign: + post: + operationId: PermissionsApi_assignPolicy + summary: Assign policy. + description: Assign policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/delegate: + put: + operationId: PermissionsApi_delegateRole + summary: Delegate user permissions. + description: Delegate user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/delegate: + post: + operationId: PermissionsApi_delegatePolicy + summary: Delegate policy. + description: Delegate policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine + (PWE) that enables applications to offer a requirements-based tokenization + implementation. + version: 2.25.0 + contact: + name: API developer + url: https://envisionblockchain.com + email: info@envisionblockchain.com + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +tags: [] +servers: + - url: /api/v1 + description: version 1.0 +components: + securitySchemes: + bearer: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + AccountsSessionResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + accessToken: + type: string + required: + - username + - role + - accessToken + InternalServerErrorDTO: + type: object + properties: + code: + type: number + example: 500 + message: + type: string + example: Error message + required: + - code + - message + AccountsResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + did: + type: string + required: + - username + - role + - did + RegisterUserDTO: + type: object + properties: + username: + type: string + password: + type: string + password_confirmation: + type: string + role: + type: string + required: + - username + - password + - password_confirmation + - role + LoginUserDTO: + type: object + properties: + username: + type: string + password: + type: string + required: + - username + - password + CredentialSubjectDTO: + type: object + properties: + geography: + type: string + law: + type: string + tags: + type: string + ISIC: + type: string + '@context': + type: array + items: + type: string + id: + type: string + type: + type: string + required: + - geography + - law + - tags + - ISIC + - '@context' + - id + - type + ProofDTO: + type: object + properties: + type: + type: string + created: + format: date-time + type: string + verificationMethod: + type: string + proofPurpose: + type: string + jws: + type: string + required: + - type + - created + - verificationMethod + - proofPurpose + - jws + VcDocumentDTO: + type: object + properties: + id: + type: string + type: + type: array + items: + type: string + issuer: + type: string + issuanceDate: + format: date-time + type: string + '@context': + type: array + items: + type: string + credentialSubject: + $ref: '#/components/schemas/CredentialSubjectDTO' + proof: + $ref: '#/components/schemas/ProofDTO' + required: + - id + - type + - issuer + - issuanceDate + - '@context' + - credentialSubject + - proof + PolicyDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Policy name + description: + type: string + example: Description + topicDescription: + type: string + example: Description + policyTag: + type: string + example: Tag + status: + type: string + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + example: DRAFT + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + codeVersion: + type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + version: + type: string + example: 1.0.0 + config: + type: object + userRole: + type: string + example: Installer + userRoles: + example: + - Installer + type: array + items: + type: string + userGroup: + type: object + example: + uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true + userGroups: + example: + - uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true + type: array + items: + type: object + policyRoles: + example: + - Registrant + type: array + items: + type: string + policyNavigation: + example: + - role: Registrant + steps: + - block: Block tag + level: 1 + name: Step name + type: array + items: + type: object + policyTopics: + example: + - name: Project + description: Project + memoObj: topic + static: false + type: any + type: array + items: + type: object + policyTokens: + example: + - tokenName: Token name + tokenSymbol: Token symbol + tokenType: non-fungible + decimals: '' + changeSupply: true + enableAdmin: true + enableFreeze: true + enableKYC: true + enableWipe: true + templateTokenTag: token_template_0 + type: array + items: + type: object + policyGroups: + example: + - name: Group name + creator: Registrant + groupAccessType: Private + groupRelationshipType: Multiple + members: + - Registrant + type: array + items: + type: object + categories: + type: array + items: + type: string + projectSchema: + type: string + example: 00000000-0000-0000-0000-000000000000 + required: + - id + - uuid + - name + - description + - topicDescription + - policyTag + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - version + - config + - userRole + - userRoles + - userGroup + - userGroups + - policyRoles + - policyNavigation + - policyTopics + - policyTokens + - policyGroups + - categories + - projectSchema + AggregatedDTOItem: + type: object + properties: + did: + type: string + hederaAccountId: + type: string + vcDocument: + $ref: '#/components/schemas/VcDocumentDTO' + policies: + $ref: '#/components/schemas/PolicyDTO' + required: + - did + - hederaAccountId + - vcDocument + - policies + UserDTO: + type: object + properties: + username: + type: string + example: username + role: + type: string + enum: &ref_35 + - STANDARD_REGISTRY + - USER + - AUDITOR + example: USER + permissionsGroup: + example: &ref_36 + - {} + type: array + items: + type: string + permissions: + example: &ref_37 + - POLICIES_POLICY_READ + type: array + items: + type: string + did: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 + required: + - username + - role + - permissions + BalanceResponseDTO: + type: object + properties: + balance: + type: number + unit: + type: string + user: + $ref: '#/components/schemas/UserDTO' + required: + - balance + - unit + - user + FilterSearchPoliciesDTO: + type: object + properties: + policyId: + type: string + example: '000000000000000000000001' + required: + - policyId + SearchPoliciesDTO: + type: object + properties: + target: + type: object + result: + type: object + required: + - target + - result + FilterPoliciesDTO: + type: object + properties: + idLvl: + oneOf: &ref_27 + - type: string + - type: number + enum: &ref_28 + - 0 + - 1 + example: 0 + eventsLvl: + oneOf: &ref_29 + - type: string + - type: number + enum: &ref_30 + - 0 + - 1 + example: 0 + propLvl: + oneOf: &ref_31 + - type: string + - type: number + enum: &ref_32 + - 0 + - 1 + - 2 + example: 0 + childrenLvl: + oneOf: &ref_33 + - type: string + - type: number + enum: &ref_34 + - 0 + - 1 + - 2 + example: 0 + policyId1: + type: string + example: '000000000000000000000001' + policyId2: + type: string + example: '000000000000000000000001' + policyIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + required: + - idLvl + - eventsLvl + - propLvl + - childrenLvl + - policyId1 + - policyId2 + - policyIds + ComparePoliciesDTO: + type: object + properties: + blocks: + type: object + groups: + type: object + left: + type: object + right: + type: object + roles: + type: object + tokens: + type: object + topics: + type: object + total: + type: object + required: + - blocks + - groups + - left + - right + - roles + - tokens + - topics + - total + FilterModulesDTO: + type: object + properties: + idLvl: + oneOf: *ref_27 + enum: *ref_28 + example: 0 + eventsLvl: + oneOf: *ref_29 + enum: *ref_30 + example: 0 + propLvl: + oneOf: *ref_31 + enum: *ref_32 + example: 0 + childrenLvl: + oneOf: *ref_33 + enum: *ref_34 + example: 0 + moduleId1: + type: string + example: '000000000000000000000001' + moduleId2: + type: string + example: '000000000000000000000001' + required: + - idLvl + - eventsLvl + - propLvl + - childrenLvl + - moduleId1 + - moduleId2 + CompareModulesDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + FilterSchemasDTO: + type: object + properties: + schemaId1: + type: string + example: '000000000000000000000001' + schemaId2: + type: string + example: '000000000000000000000001' + idLvl: + oneOf: + - type: string + - type: number + enum: + - 0 + - 1 + example: 0 + required: + - schemaId1 + - schemaId2 + - idLvl + CompareSchemasDTO: + type: object + properties: + fields: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - fields + - left + - right + - total + FilterDocumentsDTO: + type: object + properties: + idLvl: + oneOf: *ref_27 + enum: *ref_28 + example: 0 + eventsLvl: + oneOf: *ref_29 + enum: *ref_30 + example: 0 + propLvl: + oneOf: *ref_31 + enum: *ref_32 + example: 0 + childrenLvl: + oneOf: *ref_33 + enum: *ref_34 + example: 0 + documentId1: + type: string + example: '000000000000000000000001' + documentId2: + type: string + example: '000000000000000000000001' + documentIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + required: + - idLvl + - eventsLvl + - propLvl + - childrenLvl + - documentId1 + - documentId2 + - documentIds + CompareDocumentsDTO: + type: object + properties: + documents: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - documents + - left + - right + - total + FilterToolsDTO: + type: object + properties: + idLvl: + oneOf: *ref_27 + enum: *ref_28 + example: 0 + eventsLvl: + oneOf: *ref_29 + enum: *ref_30 + example: 0 + propLvl: + oneOf: *ref_31 + enum: *ref_32 + example: 0 + childrenLvl: + oneOf: *ref_33 + enum: *ref_34 + example: 0 + toolId1: + type: string + example: '000000000000000000000001' + toolId2: + type: string + example: '000000000000000000000001' + toolIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + required: + - idLvl + - eventsLvl + - propLvl + - childrenLvl + - toolId1 + - toolId2 + - toolIds + CompareToolsDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + FilterSearchBlocksDTO: + type: object + properties: + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + config: + type: object + required: + - id + - config + SearchBlocksDTO: + type: object + properties: + name: + type: string + description: + type: string + version: + type: string + owner: + type: string + topicId: + type: string + messageId: + type: string + hash: + type: string + chains: + type: object + required: + - name + - description + - version + - owner + - topicId + - messageId + - hash + - chains + ArtifactDTOItem: + type: object + properties: + id: + type: string + name: + type: string + uuid: + type: string + extention: + type: string + type: + type: string + required: + - id + - name + - uuid + - extention + - type + ContractDTO: + type: object + properties: + id: + type: string + contractId: + type: string + description: + type: string + owner: + type: string + permissions: + type: number + topicId: + type: string + type: + type: string + enum: + - WIPE + - RETIRE + syncRequestsDate: + format: date-time + type: string + syncPoolsDate: + format: date-time + type: string + lastSyncEventTimeStamp: + type: string + wipeContractIds: + type: array + items: + type: string + required: + - id + - contractId + - description + - owner + - permissions + - topicId + - type + - syncRequestsDate + - syncPoolsDate + - lastSyncEventTimeStamp + - wipeContractIds + ContractConfigDTO: + type: object + properties: + type: + type: string + description: + type: string + required: + - type + - description + WiperRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + user: + type: string + required: + - id + - contractId + - user + RetireRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + user: + type: string + required: + - id + - contractId + - tokens + - tokenIds + - user + Date: + type: object + properties: {} + RetirePoolDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + contract: + type: string + count: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + immediately: + type: boolean + enabled: + type: boolean + required: + - id + - contractId + - tokens + - tokenIds + - immediately + - enabled + RetirePoolTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + required: + - token + - count + RetireRequestTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: string + required: + - token + - count + - serials + RegisteredUsersDTO: + type: object + properties: + username: + type: string + did: + type: string + parent: + type: string + role: + type: string + policyRoles: + type: array + items: + type: string + required: + - username + - did + - parent + - role + - policyRoles + TaskDTO: + type: object + properties: + taskId: + type: string + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + expectation: + type: number + description: Expected count of task phases + example: 0 + required: + - taskId + - expectation + VCDocumentDTO: + type: object + properties: + id: + type: string + nullable: false + '@context': + type: array + items: + type: string + type: + type: array + items: + type: string + credentialSubject: + type: array + items: + type: object + issuer: + type: object + issuanceDate: + type: string + proof: + type: object + nullable: true + required: + - id + - '@context' + - type + - credentialSubject + - issuer + - issuanceDate + - proof + ExternalDocumentDTO: + type: object + properties: + owner: + type: string + policyTag: + type: string + document: + nullable: false + allOf: + - $ref: '#/components/schemas/VCDocumentDTO' + required: + - owner + - policyTag + - document + LogFilterDTO: + type: object + properties: + type: + type: string + nullable: true + startDate: + type: string + nullable: true + endDate: + type: string + nullable: true + attributes: + nullable: true + type: array + items: + type: string + message: + type: string + nullable: true + pageSize: + type: number + nullable: true + pageIndex: + type: number + nullable: true + sortDirection: + type: string + nullable: true + required: + - type + - startDate + - endDate + - attributes + - message + - pageSize + - pageIndex + - sortDirection + LogResultDTO: + type: object + properties: + totalCount: + type: number + logs: + type: array + items: + type: object + required: + - totalCount + - logs + ModuleDTO: + type: object + properties: + id: + type: string + nullable: false + uuid: + type: string + nullable: false + type: + type: string + nullable: false + name: + type: string + nullable: false + description: + type: string + nullable: false + status: + type: string + nullable: false + creator: + type: string + nullable: false + owner: + type: string + nullable: false + topicId: + type: string + nullable: false + messageId: + type: string + nullable: false + codeVersion: + type: string + nullable: false + createDate: + type: string + nullable: false + config: + type: object + nullable: true + required: + - id + - uuid + - type + - name + - description + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - config + SchemaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Schema name + description: + type: string + example: Description + entity: + type: string + enum: + - NONE + - VC + - EVC + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - RETIRE + - WIPE_TOKEN + - MINT_NFTOKEN + - ISSUER + - USER_ROLE + - CHUNK + - ACTIVITY_IMPACT + - TOKEN_DATA_SOURCE + - ROLE + - USER_PERMISSIONS + example: POLICY + iri: + type: string + example: 00000000-0000-0000-0000-000000000000 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - UNPUBLISHED + - ERROR + example: DRAFT + topicId: + type: string + example: 0.0.1 + version: + type: string + example: 1.0.0 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + category: + type: string + enum: + - POLICY + - MODULE + - SYSTEM + - TAG + - TOOL + example: POLICY + documentURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + contextURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + document: + type: object + context: + type: object + required: + - id + - uuid + - name + - description + - entity + - iri + - status + - topicId + - version + - owner + - messageId + - category + - documentURL + - contextURL + - document + - context + ExportMessageDTO: + type: object + properties: + uuid: + type: string + name: + type: string + description: + type: string + messageId: + type: string + owner: + type: string + required: + - uuid + - name + - description + - messageId + - owner + ImportMessageDTO: + type: object + properties: + messageId: + type: string + metadata: + type: object + nullable: true + required: + - messageId + - metadata + ModulePreviewDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + messageId: + type: string + schemas: + nullable: true + type: array + items: + type: object + tags: + nullable: true + type: array + items: + type: object + moduleTopicId: + type: string + nullable: true + required: + - module + - messageId + - schemas + - tags + - moduleTopicId + BlockErrorsDTO: + type: object + properties: + id: + type: string + name: + type: string + errors: + type: array + items: + type: string + isValid: + type: boolean + required: + - id + - name + - errors + - isValid + ValidationErrorsDTO: + type: object + properties: + blocks: + nullable: true + type: array + items: + $ref: '#/components/schemas/BlockErrorsDTO' + errors: + nullable: true + type: array + items: + type: string + required: + - blocks + - errors + ModuleValidationDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + results: + nullable: false + allOf: + - $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - module + - results + BlockDTO: + type: object + properties: + id: + type: string + blockType: + type: string + blocks: + type: array + items: + $ref: '#/components/schemas/BlockDTO' + required: + - id + - blockType + - blocks + ToolDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + status: + type: string + enum: + - DRAFT + - PUBLISHED + - PUBLISH_ERROR + example: NEW + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + codeVersion: + type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + config: + $ref: '#/components/schemas/BlockDTO' + required: + - id + - uuid + - name + - description + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - config + ToolValidationDTO: + type: object + properties: + tool: + $ref: '#/components/schemas/ToolDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - tool + - results + ToolPreviewDTO: + type: object + properties: + tool: + $ref: '#/components/schemas/ToolDTO' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + tools: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + required: + - tool + - schemas + - tags + - tools + ProfileDTO: + type: object + properties: + username: + type: string + example: username + role: + type: string + enum: *ref_35 + example: USER + permissionsGroup: + example: *ref_36 + type: array + items: + type: string + permissions: + example: *ref_37 + type: array + items: + type: string + did: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 + confirmed: + type: boolean + example: true + failed: + type: boolean + example: true + topicId: + type: string + example: 0.0.1 + parentTopicId: + type: string + example: 0.0.1 + didDocument: + type: object + nullable: true + vcDocument: + type: object + nullable: true + required: + - username + - role + - permissions + SubjectDTO: + type: object + properties: + '@context': + nullable: true + type: array + items: + type: string + id: + type: string + nullable: true + type: + type: string + nullable: true + required: + - '@context' + DidDocumentDTO: + type: object + properties: + id: + type: string + nullable: false + context: + nullable: true + type: array + items: + type: string + alsoKnownAs: + nullable: true + type: array + items: + type: string + controller: + nullable: true + type: array + items: + type: string + verificationMethod: + nullable: true + type: array + items: + type: object + authentication: + nullable: true + type: array + items: + type: object + assertionMethod: + nullable: true + type: array + items: + type: object + keyAgreement: + nullable: true + type: array + items: + type: object + capabilityInvocation: + nullable: true + type: array + items: + type: object + capabilityDelegation: + nullable: true + type: array + items: + type: object + service: + nullable: true + type: array + items: + type: object + required: + - id + - context + - alsoKnownAs + - controller + - verificationMethod + - authentication + - assertionMethod + - keyAgreement + - capabilityInvocation + - capabilityDelegation + - service + DidKeyDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + required: + - id + - key + CredentialsDTO: + type: object + properties: + entity: + type: string + nullable: false + hederaAccountId: + type: string + nullable: false + hederaAccountKey: + type: string + nullable: false + parent: + type: string + nullable: true + vcDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/SubjectDTO' + didDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + didKeys: + nullable: true + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - entity + - hederaAccountId + - hederaAccountKey + DidDocumentStatusDTO: + type: object + properties: + valid: + type: boolean + nullable: false + error: + type: string + nullable: true + didDocument: + type: object + nullable: false + required: + - valid + - error + - didDocument + DidKeyStatusDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + valid: + type: boolean + nullable: false + required: + - id + - key + - valid + DidDocumentWithKeyDTO: + type: object + properties: + document: + nullable: false + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + keys: + nullable: false + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - document + - keys + MigrationConfigPoliciesDTO: + type: object + properties: + src: + type: string + dst: + type: string + required: + - src + - dst + MigrationConfigDTO: + type: object + properties: + policies: + $ref: '#/components/schemas/MigrationConfigPoliciesDTO' + vcs: + type: array + items: + type: string + vps: + type: array + items: + type: string + schemas: + type: object + groups: + type: object + roles: + type: object + blocks: + type: object + tokens: + type: object + migrateState: + type: boolean + migrateRetirePools: + type: boolean + editedVCs: + type: object + retireContractId: + type: string + required: + - policies + - vcs + - vps + - schemas + - groups + - roles + - blocks + - tokens + - migrateState + - migrateRetirePools + - editedVCs + - retireContractId + PoliciesValidationDTO: + type: object + properties: + policies: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + isValid: + type: string + errors: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - policies + - isValid + - errors + PolicyValidationDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - policy + - results + Object: + type: object + properties: {} + PolicyPreviewDTO: + type: object + properties: + module: + $ref: '#/components/schemas/PolicyDTO' + messageId: + type: string + example: '0000000000.000000001' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + moduleTopicId: + type: string + example: 0.0.1 + required: + - module + - messageId + - schemas + - tags + - moduleTopicId + PolicyCategoryDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + name: + type: string + example: Large-Scale + type: + type: string + example: PROJECT_SCALE + required: + - id + - name + - type + VersionSchemaDTO: + type: object + properties: + version: + type: string + example: 1.0.0 + required: + - version + MessageSchemaDTO: + type: object + properties: + messageId: + type: string + example: '0000000000.000000001' + required: + - messageId + ExportSchemaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + name: + type: string + example: Schema name + description: + type: string + example: Description + version: + type: string + example: 1.0.0 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + required: + - id + - name + - description + - version + - owner + - messageId + SystemSchemaDTO: + type: object + properties: + name: + type: string + example: Schema name + entity: + type: string + enum: + - STANDARD_REGISTRY + - USER + example: STANDARD_REGISTRY + required: + - name + - entity + SettingsDTO: + type: object + properties: + ipfsStorageApiKey: + type: string + operatorId: + type: string + operatorKey: + type: string + required: + - ipfsStorageApiKey + - operatorId + - operatorKey + TagDTO: + type: object + properties: + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tag label + description: + type: string + example: Description + owner: + type: string + example: DID + date: + type: string + example: '1900-01-01T00:00:00.000Z' + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + status: + type: string + enum: + - Draft + - Published + - History + example: Published + operation: + type: string + enum: + - Create + - Delete + example: Create + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + policyId: + type: string + example: '000000000000000000000001' + uri: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + target: + type: string + example: '0000000000.000000001' + localTarget: + type: string + example: '000000000000000000000001' + document: + type: object + required: + - uuid + - name + - description + - owner + - date + - entity + - status + - operation + - topicId + - messageId + - policyId + - uri + - target + - localTarget + - document + TagFilterDTO: + type: object + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000001' + targets: + example: '0000000000.000000001' + type: array + items: + type: string + required: + - entity + - target + - targets + TagMapDTO: + type: object + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000001' + refreshDate: + type: string + example: '1900-01-01T00:00:00.000Z' + tags: + type: array + items: + $ref: '#/components/schemas/TagDTO' + required: + - entity + - target + - refreshDate + - tags + StatusDTO: + type: object + properties: + message: + type: string + description: Text + type: + type: string + description: Type + enum: + - Processing + - Completed + - Info + example: Info + required: + - message + - type + TaskStatusDTO: + type: object + properties: + action: + type: string + description: Task type + example: Create policy + userId: + type: string + description: User Id + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + expectation: + type: number + description: Expected count of task phases + example: 0 + taskId: + type: string + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + date: + type: string + description: Date + example: '1900-01-01T00:00:00.000Z' + statuses: + type: array + items: + $ref: '#/components/schemas/StatusDTO' + result: + type: object + error: + type: object + required: + - action + - userId + - expectation + - taskId + - date + - statuses + - result + - error + TokenDTO: + type: object + properties: + tokenId: + type: string + example: 0.0.1 + tokenName: + type: string + example: Token name + tokenSymbol: + type: string + example: Token symbol + tokenType: + type: string + enum: + - fungible + - non-fungible + example: non-fungible + initialSupply: + type: string + example: '0' + decimals: + type: string + example: '0' + changeSupply: + type: boolean + description: Add Supply key + example: true + enableAdmin: + type: boolean + description: Add Admin key + example: true + enableFreeze: + type: boolean + description: Add Freeze key + example: true + enableKYC: + type: boolean + description: Add KYC key + example: true + enableWipe: + type: boolean + description: Add Wipe key + example: true + required: + - tokenId + - tokenName + - tokenSymbol + - tokenType + - initialSupply + - decimals + - changeSupply + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + TokenInfoDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + tokenId: + type: string + example: 0.0.1 + tokenName: + type: string + example: Token name + tokenSymbol: + type: string + example: Token symbol + tokenType: + type: string + enum: + - fungible + - non-fungible + example: non-fungible + decimals: + type: string + example: '0' + associated: + type: boolean + description: '' + example: true + frozen: + type: boolean + description: '' + example: true + kyc: + type: boolean + description: '' + example: true + balance: + type: string + description: User balance + example: '0' + enableAdmin: + type: boolean + description: There is an Admin key + example: true + enableFreeze: + type: boolean + description: There is an Freeze key + example: true + enableKYC: + type: boolean + description: There is an KYC key + example: true + enableWipe: + type: boolean + description: There is an Wipe key + example: true + required: + - id + - tokenId + - tokenName + - tokenSymbol + - tokenType + - decimals + - associated + - frozen + - kyc + - balance + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + ThemeRoleDTO: + type: object + properties: + description: + type: string + example: Description + text: + type: string + description: Text color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + background: + type: string + description: Background color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + border: + type: string + description: Border color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + shape: + type: string + description: Object shape + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + example: '0' + borderWidth: + type: string + description: Border width + enum: + - 0px + - 1px + - 2px + - 3px + - 4px + - 5px + - 6px + - 7px + example: 2px + filterType: + type: string + description: Filter by type + enum: + - type + - api + - role + example: type + filterValue: + oneOf: + - type: string + - type: array + items: + type: string + required: + - description + - text + - background + - border + - shape + - borderWidth + - filterType + - filterValue + ThemeDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Theme name + rules: + type: array + items: + $ref: '#/components/schemas/ThemeRoleDTO' + required: + - id + - uuid + - name + - rules + VpDTO: + type: object + properties: + '@context': + type: array + items: + type: string + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + type: + type: array + items: + type: string + verifiableCredential: + type: array + items: + type: object + proof: + type: object + required: + - '@context' + - id + - type + - verifiableCredential + - proof + VpDocumentDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + policyId: + type: string + example: '000000000000000000000001' + hash: + type: string + example: hash + signature: + type: number + example: 0 + status: + type: string + enum: + - NEW + - ISSUE + - REVOKE + - SUSPEND + - RESUME + - FAILED + example: NEW + tag: + type: string + example: Block tag + type: + type: string + example: Document type + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + updateDate: + type: string + example: '1900-01-01T00:00:00.000Z' + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + document: + $ref: '#/components/schemas/VpDTO' + required: + - id + - policyId + - hash + - signature + - status + - tag + - type + - createDate + - updateDate + - owner + - document + WizardConfigDTO: + type: object + properties: + roles: + type: array + items: + type: string + policy: + type: string + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string + type: array + items: + type: string + trustChain: + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean + type: array + items: + type: string + required: + - roles + - policy + - schemas + - trustChain + WizardResultDTO: + type: object + properties: + policyId: + type: string + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - policyId + - wizardConfig + WizardConfigAsyncDTO: + type: object + properties: + saveState: + type: boolean + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - saveState + - wizardConfig + WizardPreviewDTO: + type: object + properties: + policyConfig: + $ref: '#/components/schemas/PolicyDTO' + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - policyConfig + - wizardConfig + BrandingDTO: + type: object + properties: + headerColor: + type: string + primaryColor: + type: string + companyName: + type: string + companyLogoUrl: + type: string + loginBannerUrl: + type: string + faviconUrl: + type: string + headerColor1: + type: string + termsAndConditions: + type: string + required: + - headerColor + - primaryColor + - companyName + - companyLogoUrl + - loginBannerUrl + - faviconUrl + - headerColor1 + - termsAndConditions + SuggestionsInputDTO: + type: object + properties: + blockType: + type: string + children: + nullable: true + type: array + items: + type: object + required: + - blockType + - children + SuggestionsOutputDTO: + type: object + properties: + next: + type: string + nested: + type: string + required: + - next + - nested + SuggestionsConfigItemDTO: + type: object + properties: + id: + type: string + type: + type: string + enum: + - Policy + - Module + index: + type: number + required: + - id + - type + - index + SuggestionsConfigDTO: + type: object + properties: + items: + $ref: '#/components/schemas/SuggestionsConfigItemDTO' + required: + - items + NotificationDTO: + type: object + properties: + title: + type: string + message: + type: string + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + action: + type: string + enum: + - POLICY_CONFIGURATION + - POLICY_VIEW + - POLICIES_PAGE + - SCHEMAS_PAGE + - TOKENS_PAGE + - PROFILE_PAGE + result: + type: object + read: + type: boolean + old: + type: boolean + required: + - title + - message + - type + - action + - result + - read + - old + ProgressDTO: + type: object + properties: + action: + type: string + message: + type: string + progress: + type: number + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + taskId: + type: string + required: + - action + - message + - progress + - type + - taskId + ProjectDTO: + type: object + properties: + id: + type: string + policyId: + type: string + policyName: + type: string + registered: + type: string + title: + type: string + companyName: + type: string + sectoralScope: + type: string + required: + - id + - policyId + - policyName + - registered + - title + - companyName + - sectoralScope + CompareDocumentsV2DTO: + type: object + properties: + projects: + $ref: '#/components/schemas/CompareDocumentsDTO' + presentations: + $ref: '#/components/schemas/CompareDocumentsDTO' + required: + - projects + - presentations + PropertiesDTO: + type: object + properties: + id: + type: string + title: + type: string + value: + type: string + required: + - id + - title + - value + RecordStatusDTO: + type: object + properties: + type: + type: string + policyId: + type: string + uuid: + type: string + status: + type: string + required: + - type + - policyId + - uuid + - status + RecordActionDTO: + type: object + properties: + uuid: + type: string + policyId: + type: string + method: + type: string + action: + type: string + time: + type: string + user: + type: string + target: + type: string + required: + - uuid + - policyId + - method + - action + - time + - user + - target + ResultInfoDTO: + type: object + properties: + tokens: + type: number + documents: + type: number + required: + - tokens + - documents + ResultDocumentDTO: + type: object + properties: + type: + type: string + schema: + type: string + rate: + type: string + documents: + type: object + required: + - type + - schema + - rate + - documents + RunningResultDTO: + type: object + properties: + info: + $ref: '#/components/schemas/ResultInfoDTO' + total: + type: number + documents: + $ref: '#/components/schemas/ResultDocumentDTO' + required: + - info + - total + - documents + RunningDetailsDTO: + type: object + properties: + left: + type: object + right: + type: object + total: + type: number + documents: + type: object + required: + - left + - right + - total + - documents + RoleDTO: + type: object + properties: + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Name + description: + type: string + example: Description + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + permissions: + type: string + enum: &ref_38 + - ANALYTIC_POLICY_READ + - ANALYTIC_MODULE_READ + - ANALYTIC_TOOL_READ + - ANALYTIC_SCHEMA_READ + - ANALYTIC_DOCUMENT_READ + - ARTIFACTS_FILE_READ + - ARTIFACTS_FILE_CREATE + - ARTIFACTS_FILE_DELETE + - CONTRACTS_CONTRACT_READ + - CONTRACTS_CONTRACT_EXECUTE + - CONTRACTS_CONTRACT_MANAGE + - MODULES_MODULE_READ + - MODULES_MODULE_CREATE + - MODULES_MODULE_UPDATE + - MODULES_MODULE_DELETE + - MODULES_MODULE_REVIEW + - POLICIES_POLICY_READ + - POLICIES_POLICY_CREATE + - POLICIES_POLICY_UPDATE + - POLICIES_POLICY_DELETE + - POLICIES_POLICY_REVIEW + - POLICIES_POLICY_EXECUTE + - POLICIES_POLICY_MANAGE + - SCHEMAS_SCHEMA_READ + - SCHEMAS_SCHEMA_CREATE + - SCHEMAS_SCHEMA_UPDATE + - SCHEMAS_SCHEMA_DELETE + - SCHEMAS_SCHEMA_REVIEW + - TOOLS_TOOL_READ + - TOOLS_TOOL_CREATE + - TOOLS_TOOL_UPDATE + - TOOLS_TOOL_DELETE + - TOOLS_TOOL_REVIEW + - TOKENS_TOKEN_READ + - TOKENS_TOKEN_CREATE + - TOKENS_TOKEN_UPDATE + - TOKENS_TOKEN_DELETE + - TOKENS_TOKEN_EXECUTE + - TOKENS_TOKEN_MANAGE + - TAGS_TAG_READ + - TAGS_TAG_CREATE + - SUGGESTIONS_SUGGESTIONS_READ + - SUGGESTIONS_SUGGESTIONS_UPDATE + - PERMISSIONS_ROLE_READ + - PERMISSIONS_ROLE_CREATE + - PERMISSIONS_ROLE_UPDATE + - PERMISSIONS_ROLE_DELETE + - PERMISSIONS_ROLE_MANAGE + - ACCESS_POLICY_ALL + - ACCESS_POLICY_ASSIGNED + - ACCESS_POLICY_PUBLISHED + - ACCESS_POLICY_ASSIGNED_AND_PUBLISHED + - DELEGATION_ROLE_MANAGE + example: + - POLICIES_POLICY_READ + required: + - uuid + - name + - description + - owner + - permissions + PermissionsDTO: + type: object + properties: + name: + type: string + enum: *ref_38 + example: ANALYTIC_POLICY_READ + category: + type: string + enum: + - ACCOUNTS + - SESSION + - PROFILES + - ANALYTIC + - ARTIFACTS + - POLICIES + - BRANDING + - CONTRACTS + - DEMO + - IPFS + - LOG + - MODULES + - SETTINGS + - SUGGESTIONS + - TAGS + - SCHEMAS + - TOKENS + - AUDIT + - TOOLS + - PERMISSIONS + - ACCESS + - DELEGATION + example: ANALYTIC + entity: + type: string + enum: + - ACCOUNT + - STANDARD_REGISTRY + - USER + - BALANCE + - RESTORE + - RECORD + - POLICY + - TOOL + - DOCUMENT + - SCHEMA + - MODULE + - FILE + - CONFIG + - CONTRACT + - WIPE_REQUEST + - WIPE_ADMIN + - WIPE_MANAGER + - WIPER + - POOL + - RETIRE_REQUEST + - RETIRE_ADMIN + - PERMISSIONS + - KEY + - LOG + - MIGRATION + - SETTINGS + - SUGGESTIONS + - TAG + - SYSTEM_SCHEMA + - THEME + - TOKEN + - TRUST_CHAIN + - ROLE + example: POLICY + action: + type: string + enum: + - ALL + - READ + - CREATE + - UPDATE + - DELETE + - REVIEW + - AUDIT + - EXECUTE + - MANAGE + - ASSIGNED + - PUBLISHED + - ASSIGNED_AND_PUBLISHED + example: READ + disabled: + type: boolean + example: false + dependOn: + example: + - POLICIES_POLICY_READ + type: array + items: + type: string + required: + - name + - category + - entity + - action + - disabled + - dependOn + AssignPolicyDTO: + type: object + properties: + policyIds: + example: + - '000000000000000000000001' + type: array + items: + type: string + assign: + type: boolean + example: true + required: + - policyIds + - assign diff --git a/docs/.gitbook/assets/swagger (4).yaml b/docs/.gitbook/assets/swagger (4).yaml index 954c5cfe6e..53b5add454 100644 --- a/docs/.gitbook/assets/swagger (4).yaml +++ b/docs/.gitbook/assets/swagger (4).yaml @@ -22,7 +22,7 @@ paths: tags: &ref_0 - accounts security: - - bearer: [] + - bearerAuth: [] /accounts/register: post: operationId: AccountApi_register @@ -112,10 +112,10 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearer: [] + - bearerAuth: [] /accounts/standard-registries: get: - operationId: AccountApi_getStandardRegistries + operationId: AccountApi_getStandatdRegistries summary: Returns all Standard Registries. description: Returns all Standard Registries. parameters: [] @@ -138,7 +138,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearer: [] + - bearerAuth: [] /accounts/standard-registries/aggregated: get: operationId: AccountApi_getAggregatedStandardRegistries @@ -166,7 +166,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearer: [] + - bearerAuth: [] /accounts/balance: get: operationId: AccountApi_getBalance @@ -192,7 +192,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_0 security: - - bearer: [] + - bearerAuth: [] /analytics/search/policies: post: operationId: AnalyticsApi_searchPolicies @@ -211,7 +211,7 @@ paths: examples: Filter: value: - policyId: '000000000000000000000001' + policyId: '000000000000000000000000' responses: '200': description: Successful operation. @@ -232,7 +232,7 @@ paths: tags: &ref_1 - analytics security: - - bearer: [] + - bearerAuth: [] /analytics/compare/policies: post: operationId: AnalyticsApi_comparePolicies @@ -252,7 +252,7 @@ paths: Filter1: value: policyId1: '000000000000000000000001' - policyId2: '000000000000000000000001' + policyId2: '000000000000000000000002' eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -261,7 +261,7 @@ paths: value: policyIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -285,7 +285,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/modules: post: operationId: AnalyticsApi_compareModules @@ -305,7 +305,7 @@ paths: Filter: value: moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000001' + moduleId2: '000000000000000000000002' propLvl: '0' childrenLvl: '0' idLvl: '0' @@ -328,7 +328,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/schemas: post: operationId: AnalyticsApi_compareSchemas @@ -348,7 +348,7 @@ paths: Filter: value: schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000001' + schemaId2: '000000000000000000000002' idLvl: '0' responses: '200': @@ -369,7 +369,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/documents: post: operationId: AnalyticsApi_compareDocuments @@ -389,12 +389,12 @@ paths: Filter1: value: documentId1: '000000000000000000000001' - documentId2: '000000000000000000000001' + documentId2: '000000000000000000000002' Filter2: value: documentIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' responses: '200': description: Successful operation. @@ -414,7 +414,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/tools: post: operationId: AnalyticsApi_compareTools @@ -434,12 +434,12 @@ paths: Filter1: value: toolId1: '000000000000000000000001' - toolId2: '000000000000000000000001' + toolId2: '000000000000000000000002' Filter2: value: toolIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' responses: '200': description: Successful operation. @@ -459,7 +459,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/policies/export: post: operationId: AnalyticsApi_comparePoliciesExport @@ -467,14 +467,7 @@ paths: description: >- Compare policies. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string + parameters: [] requestBody: required: true description: Filters. @@ -486,7 +479,7 @@ paths: Filter1: value: policyId1: '000000000000000000000001' - policyId2: '000000000000000000000001' + policyId2: '000000000000000000000002' eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -495,7 +488,7 @@ paths: value: policyIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' eventsLvl: '0' propLvl: '0' childrenLvl: '0' @@ -519,7 +512,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/modules/export: post: operationId: AnalyticsApi_compareModulesExport @@ -527,14 +520,7 @@ paths: description: >- Compare modules. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string + parameters: [] requestBody: required: true description: Filters. @@ -546,7 +532,7 @@ paths: Filter: value: moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000001' + moduleId2: '000000000000000000000002' propLvl: '0' childrenLvl: '0' idLvl: '0' @@ -569,7 +555,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/schemas/export: post: operationId: AnalyticsApi_compareSchemasExport @@ -577,14 +563,7 @@ paths: description: >- Compare schemas. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string + parameters: [] requestBody: required: true description: Filters. @@ -596,7 +575,7 @@ paths: Filter: value: schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000001' + schemaId2: '000000000000000000000002' idLvl: '0' responses: '200': @@ -617,7 +596,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/documents/export: post: operationId: AnalyticsApi_compareDocumentsExport @@ -625,14 +604,7 @@ paths: description: >- Compare documents. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string + parameters: [] requestBody: required: true description: Filters. @@ -644,12 +616,12 @@ paths: Filter1: value: documentId1: '000000000000000000000001' - documentId2: '000000000000000000000001' + documentId2: '000000000000000000000002' Filter2: value: documentIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' responses: '200': description: Successful operation. @@ -669,7 +641,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/compare/tools/export: post: operationId: AnalyticsApi_compareToolsExport @@ -677,14 +649,7 @@ paths: description: >- Compare tools. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: type - required: true - in: query - description: File type - example: csv - schema: - type: string + parameters: [] requestBody: required: true description: Filters. @@ -696,12 +661,12 @@ paths: Filter1: value: toolId1: '000000000000000000000001' - toolId2: '000000000000000000000001' + toolId2: '000000000000000000000002' Filter2: value: toolIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' responses: '200': description: Successful operation. @@ -721,7 +686,7 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /analytics/search/blocks: post: operationId: AnalyticsApi_searchBlocks @@ -736,7 +701,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FilterSearchBlocksDTO' + $ref: '#/components/schemas/FilterSearchPoliciesDTO' examples: Filter: value: @@ -748,9 +713,7 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/SearchBlocksDTO' + $ref: '#/components/schemas/SearchPoliciesDTO' '401': description: Unauthorized. '403': @@ -763,65 +726,46 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_1 security: - - bearer: [] + - bearerAuth: [] /artifacts: get: - operationId: ArtifactApi_getArtifacts - summary: Returns all artifacts. + tags: + - artifacts description: Returns all artifacts. + security: + - bearerAuth: [] + summary: Returns all artifacts. parameters: - - name: id - required: false - in: query - description: Artifact identifier - example: '000000000000000000000001' - schema: - type: string - - name: type - required: false - in: query - description: Tool|Policy - example: policy + - in: query + name: policyId schema: - enum: - - tool - - policy type: string - - name: policyId - required: false - in: query description: Policy identifier - example: '000000000000000000000001' + - in: query + name: pageIndex schema: - type: string - - name: toolId - required: false - in: query - description: Tool identifier - example: '000000000000000000000001' - schema: - type: string - - name: pageIndex - required: false - in: query + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number + examples: + pageSize: + summary: Example of a pageSize + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -830,7 +774,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ArtifactDTOItem' + $ref: '#/components/schemas/Artifact' '401': description: Unauthorized. '403': @@ -840,11 +784,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_2 - - artifacts - security: - - bearer: [] + $ref: '#/components/schemas/Error' /artifacts/{parentId}: post: operationId: ArtifactApi_uploadArtifacts @@ -855,7 +795,6 @@ paths: required: true in: path description: Parent ID - example: '000000000000000000000001' schema: type: string requestBody: @@ -890,22 +829,25 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 + tags: + - artifacts security: - - bearer: [] + - bearerAuth: [] /artifacts/{artifactId}: delete: - operationId: ArtifactApi_deleteArtifact - summary: Delete artifact. + tags: + - artifacts description: Delete artifact. + security: + - bearerAuth: [] + summary: Delete artifact. parameters: - - name: artifactId - required: true - in: path - description: Artifact ID - example: '000000000000000000000001' + - in: path + name: artifactId schema: type: string + required: true + description: Artifact identifier responses: '200': description: Successful operation. @@ -922,10 +864,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /contracts: get: operationId: ContractsApi_getContracts @@ -933,7 +872,7 @@ paths: description: Returns all contracts. parameters: - name: type - required: false + required: true in: query description: Contract type example: RETIRE @@ -942,8 +881,15 @@ paths: - WIPE - RETIRE type: string + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number - name: pageIndex - required: false + required: true in: query description: >- The number of pages to skip before starting to collect the result @@ -951,18 +897,11 @@ paths: example: 0 schema: type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number responses: '200': description: Contracts. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -982,10 +921,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_3 + tags: &ref_2 - contracts security: - - bearer: [] + - bearerAuth: [] post: operationId: ContractsApi_createContract summary: Create contract. @@ -998,7 +937,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ContractConfigDTO' + type: object + properties: + description: + type: string responses: '201': description: Created contract. @@ -1016,9 +958,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/import: post: operationId: ContractsApi_importContract @@ -1059,9 +1001,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/{contractId}/permissions: get: operationId: ContractsApi_contractPermissions @@ -1094,9 +1036,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/{contractId}: delete: operationId: ContractsApi_removeContract @@ -1129,9 +1071,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/requests: get: operationId: ContractsApi_getWipeRequests @@ -1141,14 +1083,21 @@ paths: are allowed to make the request. parameters: - name: contractId - required: false + required: true in: query description: Contract identifier example: 0.0.1 schema: type: string + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number - name: pageIndex - required: false + required: true in: query description: >- The number of pages to skip before starting to collect the result @@ -1156,18 +1105,11 @@ paths: example: 0 schema: type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -1187,9 +1129,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/{contractId}/requests/enable: post: operationId: ContractsApi_enableWipeRequests @@ -1208,10 +1150,6 @@ paths: responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1222,9 +1160,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/{contractId}/requests/disable: post: operationId: ContractsApi_disableWipeRequests @@ -1243,10 +1181,6 @@ paths: responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1257,9 +1191,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/requests/{requestId}/approve: post: operationId: ContractsApi_approveWipeRequest @@ -1278,10 +1212,6 @@ paths: responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1292,9 +1222,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/requests/{requestId}/reject: delete: operationId: ContractsApi_rejectWipeRequest @@ -1303,6 +1233,12 @@ paths: Reject wipe contract request. Only users with the Standard Registry role are allowed to make the request. parameters: + - name: ban + required: true + in: query + description: Reject and ban + schema: + type: boolean - name: requestId required: true in: path @@ -1310,20 +1246,9 @@ paths: example: 652745597a7b53526de37c05 schema: type: string - - name: ban - required: false - in: query - description: Reject and ban - example: true - schema: - type: boolean responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1334,9 +1259,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/{contractId}/requests: delete: operationId: ContractsApi_clearWipeRequests @@ -1355,10 +1280,6 @@ paths: responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1369,9 +1290,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/{contractId}/admin/{hederaId}: post: operationId: ContractsApi_wipeAddAdmin @@ -1380,27 +1301,23 @@ paths: Add wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1411,9 +1328,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] delete: operationId: ContractsApi_wipeRemoveAdmin summary: Remove wipe admin. @@ -1421,27 +1338,23 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1452,9 +1365,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/{contractId}/manager/{hederaId}: post: operationId: ContractsApi_wipeAddManager @@ -1463,27 +1376,23 @@ paths: Add wipe contract manager. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1494,9 +1403,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] delete: operationId: ContractsApi_wipeRemoveManager summary: Remove wipe manager. @@ -1504,27 +1413,23 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1535,9 +1440,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/wipe/{contractId}/wiper/{hederaId}: post: operationId: ContractsApi_wipeAddWiper @@ -1546,27 +1451,23 @@ paths: Add wipe contract wiper. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1577,9 +1478,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] delete: operationId: ContractsApi_wipeRemoveWiper summary: Remove wipe wiper. @@ -1587,27 +1488,23 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -1618,9 +1515,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/{contractId}/pools/sync: post: operationId: ContractsApi_retireSyncPools @@ -1653,9 +1550,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/requests: get: operationId: ContractsApi_getRetireRequests @@ -1663,14 +1560,21 @@ paths: description: Returns all retire requests. parameters: - name: contractId - required: false + required: true in: query description: Contract identifier example: 0.0.1 schema: type: string + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number - name: pageIndex - required: false + required: true in: query description: >- The number of pages to skip before starting to collect the result @@ -1678,18 +1582,11 @@ paths: example: 0 schema: type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -1709,31 +1606,38 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/pools: get: operationId: ContractsApi_getRetirePools summary: Return a list of all retire pools. description: Returns all retire pools. parameters: + - name: tokens + required: true + in: query + description: Tokens + example: 0.0.1,0.0.2,0.0.3 + schema: + type: string - name: contractId - required: false + required: true in: query description: Contract identifier example: 0.0.1 schema: type: string - - name: tokens - required: false + - name: pageSize + required: true in: query - description: Tokens - example: 0.0.1,0.0.2,0.0.3 + description: The numbers of items to return + example: 20 schema: - type: string + type: number - name: pageIndex - required: false + required: true in: query description: >- The number of pages to skip before starting to collect the result @@ -1741,18 +1645,11 @@ paths: example: 0 schema: type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -1772,9 +1669,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/{contractId}/requests: delete: operationId: ContractsApi_clearRetireRequests @@ -1807,9 +1704,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/{contractId}/pools: delete: operationId: ContractsApi_clearRetirePools @@ -1842,9 +1739,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] post: operationId: ContractsApi_setRetirePool summary: Set retire pool. @@ -1882,9 +1779,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/pools/{poolId}: delete: operationId: ContractsApi_unsetRetirePool @@ -1917,9 +1814,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/requests/{requestId}: delete: operationId: ContractsApi_unsetRetireRequest @@ -1952,9 +1849,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/pools/{poolId}/retire: post: operationId: ContractsApi_retire @@ -1991,9 +1888,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/requests/{requestId}/approve: post: operationId: ContractsApi_approveRetire @@ -2012,10 +1909,6 @@ paths: responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -2026,9 +1919,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/requests/{requestId}/cancel: delete: operationId: ContractsApi_cancelRetireRequest @@ -2045,10 +1938,6 @@ paths: responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -2059,9 +1948,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire/{contractId}/admin/{hederaId}: post: operationId: ContractsApi_retireAddAdmin @@ -2070,27 +1959,23 @@ paths: Add retire contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -2101,9 +1986,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] delete: operationId: ContractsApi_retireRemoveAdmin summary: Remove wipe admin. @@ -2111,27 +1996,23 @@ paths: Remove wipe contract admin. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: contractId + - name: hederaId required: true in: path - description: Contract identifier - example: 652745597a7b53526de37c05 + description: Hedera identifier + example: 0.0.1 schema: type: string - - name: hederaId + - name: contractId required: true in: path - description: Hedera identifier - example: 0.0.1 + description: Contract identifier + example: 652745597a7b53526de37c05 schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '401': description: Unauthorized. '403': @@ -2142,17 +2023,24 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /contracts/retire: get: operationId: ContractsApi_getRetireVCs summary: Return a list of all retire vcs. description: Returns all retire vcs. parameters: + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number - name: pageIndex - required: false + required: true in: query description: >- The number of pages to skip before starting to collect the result @@ -2160,18 +2048,11 @@ paths: example: 0 schema: type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -2180,7 +2061,7 @@ paths: schema: type: array items: - type: object + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -2191,9 +2072,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_3 + tags: *ref_2 security: - - bearer: [] + - bearerAuth: [] /demo/registered-users: get: operationId: DemoApi_registeredUsers @@ -2207,23 +2088,22 @@ paths: application/json: schema: $ref: '#/components/schemas/RegisteredUsersDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_4 + tags: - demo /demo/random-key: get: - operationId: DemoApi_randomKey - summary: Generate demo key. - description: Generate demo key. - parameters: [] + tags: + - demo + description: Generates a new Hedera account with a random private key. + security: + - bearerAuth: [] responses: '200': description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/HederaAccount' '401': description: Unauthorized. '403': @@ -2233,23 +2113,22 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /demo/push/random-key: get: - operationId: DemoApi_pushRandomKey - summary: Generate demo key. - description: Generate demo key. - parameters: [] + tags: + - demo + description: Generates a new Hedera account with a random private key. + security: + - bearerAuth: [] + summary: Generates a new Hedera account with a random private key. responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -2259,145 +2138,91 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_4 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /external: post: - operationId: ExternalApi_receiveExternalData - summary: Sends data from an external source. + tags: + - external description: Sends data from an external source. - parameters: [] + summary: Sends data from an external source. requestBody: - required: true description: Object that contains a VC Document. + required: true content: application/json: schema: - $ref: '#/components/schemas/ExternalDocumentDTO' + $ref: '#/components/schemas/ExternalData' responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - external + $ref: '#/components/schemas/Error' /ipfs/file: post: operationId: IpfsApi_postFile summary: Add file from ipfs. description: Add file from ipfs. parameters: [] - requestBody: - required: true - description: Binary data. - content: - application/json: - schema: - type: string responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_5 + description: Unauthorized + tags: &ref_3 - ipfs security: - - bearer: [] + - bearerAuth: [] /ipfs/file/dry-run/{policyId}: post: + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. operationId: IpfsApi_postFileDryRun summary: Add file from ipfs for dry run mode. description: Add file from ipfs for dry run mode. + responses: + '401': + description: Unauthorized + tags: *ref_3 + security: + - bearerAuth: [] + /ipfs/file/{cid}: + get: + tags: + - ipfs + description: Get file from ipfs. + summary: Get file from ipfs. parameters: - - name: policyId - required: true - in: path - description: Policy id - example: '000000000000000000000001' + - in: path + name: cid schema: type: string - requestBody: - required: true - description: Binary data. - content: - application/json: - schema: - type: string + required: true + description: File CID. + security: + - bearerAuth: [] responses: - '200': - description: Successful operation. + '201': + description: Created. content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] - /ipfs/file/{cid}: - get: - operationId: IpfsApi_getFile - summary: Get file from ipfs. - description: Get file from ipfs. - parameters: - - name: cid - required: true - in: path - description: File cid - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: + binary/octet-stream: schema: type: string format: binary '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /ipfs/file/{cid}/dry-run: get: operationId: IpfsApi_getFileDryRun @@ -2407,52 +2232,40 @@ paths: - name: cid required: true in: path - description: File cid schema: type: string responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 + description: Unauthorized + tags: *ref_3 security: - - bearer: [] + - bearerAuth: [] /logs: post: - operationId: LoggerApi_getLogs - summary: Return a list of all logs. - description: >- - Return a list of all logs. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] + tags: + - logs + description: Returns logs. For users with the Standard Registry role only. + security: + - bearerAuth: [] requestBody: - required: true - description: Filters. + description: Log filters. content: application/json: schema: - $ref: '#/components/schemas/LogFilterDTO' + $ref: '#/components/schemas/LogFilters' + summary: Returns logs. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/LogResultDTO' + type: object + properties: + totalCount: + type: number + logs: + $ref: '#/components/schemas/Log' '401': description: Unauthorized. '403': @@ -2462,39 +2275,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_6 - - logs - security: - - bearer: [] + $ref: '#/components/schemas/Error' /logs/attributes: get: - operationId: LoggerApi_getAttributes - summary: Return a list of attributes. - description: >- - Return a list of attributes. Only users with the Standard Registry role - are allowed to make the request. + tags: + - logs + description: Returns logs attributes. For users with the Standard Registry role only. parameters: - - name: name - required: false - in: query - description: Name - example: Search + - in: query + name: name schema: - type: number - - name: existingAttributes - required: false - in: query - description: Existing attributes - example: - - WORKER + type: string + description: Part of name. + - in: query + name: existingAttributes schema: type: array items: type: string + description: Attributes to exclude. + security: + - bearerAuth: [] + summary: Returns logs attributes. responses: '200': description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: string '401': description: Unauthorized. '403': @@ -2504,16 +2315,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /map/key: get: - operationId: MapApi_getKey - summary: Return map key. - description: Return map key. - parameters: [] + tags: + - maps + description: Returns map api key. + security: + - bearerAuth: [] + summary: Returns map api key. responses: '200': description: Successful operation. @@ -2521,34 +2331,23 @@ paths: application/json: schema: type: string + '401': + description: Unauthorized. '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_7 - - map + $ref: '#/components/schemas/Error' /map/sh: get: operationId: MapApi_getSentinelKey - summary: Return map key. - description: Return map key. parameters: [] responses: '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 + description: '' + tags: + - map /metrics: get: operationId: MetricsApi_getMetrics @@ -2559,78 +2358,48 @@ paths: tags: - metrics /modules: - post: - operationId: ModulesApi_postModules - summary: Creates a new module. - description: >- - Creates a new module. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Module config. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - responses: - '200': - description: Created module. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_8 + get: + tags: - modules + description: >- + Returns all modules. Only users with the Standard Registry and Installer + role are allowed to make the request. security: - - bearer: [] - get: - operationId: ModulesApi_getModules + - bearerAuth: [] summary: Return a list of all modules. - description: >- - Returns all modules. Only users with the Standard Registry role are - allowed to make the request. parameters: - - name: pageIndex - required: false - in: query + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number + examples: + pageSize: + summary: Example of a pageSize + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ModuleDTO' + $ref: '#/components/schemas/Module' '401': description: Unauthorized. '403': @@ -2640,55 +2409,76 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + $ref: '#/components/schemas/Error' + post: + tags: + - modules + description: >- + Creates a new module. Only users with the Standard Registry role are + allowed to make the request. security: - - bearer: [] + - bearerAuth: [] + summary: Creates a new module. + requestBody: + description: Object that contains module configuration. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Module' + responses: + '201': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /modules/schemas: get: operationId: ModulesApi_getModuleSchemas - summary: Return a list of all module schemas. + parameters: [] + responses: + '200': + description: '' + tags: &ref_4 + - modules + post: + operationId: ModulesApi_postSchemas + parameters: [] + responses: + '201': + description: '' + tags: *ref_4 + /modules/{uuid}: + get: + tags: + - modules description: >- - Returns all module schemas. Only users with the Standard Registry role - are allowed to make the request. + Retrieves module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: topicId - required: false - in: query - description: Topic id - example: 0.0.1 + - in: path + name: uuid schema: type: string + required: true + description: Selected module ID. + summary: Retrieves module configuration. + security: + - bearerAuth: [] responses: '200': description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Module' '401': description: Unauthorized. '403': @@ -2698,33 +2488,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - post: - operationId: ModulesApi_postSchemas - summary: Creates a new module schema. + $ref: '#/components/schemas/Error' + put: + tags: + - modules description: >- - Creates a new module schema. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] + Updates module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + summary: Updates module configuration. + parameters: + - in: path + name: uuid + description: Selected module ID. + required: true + schema: + type: string requestBody: + description: Object that contains module configuration. required: true - description: Schema config. content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Module' + security: + - bearerAuth: [] responses: - '201': - description: Created schema. + '200': + description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Module' '401': description: Unauthorized. '403': @@ -2734,107 +2528,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - /modules/{uuid}: + $ref: '#/components/schemas/Error' delete: - operationId: ModulesApi_deleteModule - summary: Deletes the module. + tags: + - modules description: >- Deletes the module with the provided module ID. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 + - in: path + name: uuid schema: type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] - get: - operationId: ModulesApi_getModule - summary: Retrieves module configuration. - description: >- - Retrieves module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: uuid required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 + description: Module ID. security: - - bearer: [] - put: - operationId: ModulesApi_putModule - summary: Updates module configuration. - description: >- - Updates module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 - schema: - type: string - requestBody: - required: true - description: Module config. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' + - bearerAuth: [] + summary: Deletes the module. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ModuleDTO' + type: boolean '401': description: Unauthorized. '403': @@ -2844,27 +2561,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/menu: get: - operationId: ModulesApi_getMenu - summary: Return a list of modules. + tags: + - modules description: >- - Returns modules menu. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] + Returns modules menu. Only users with the Standard Registry and + Installer role are allowed to make the request. + security: + - bearerAuth: [] + summary: Return a list of modules. responses: '200': - description: Modules. + description: Successful operation. content: application/json: schema: type: array items: - $ref: '#/components/schemas/ModuleDTO' + $ref: '#/components/schemas/Module' '401': description: Unauthorized. '403': @@ -2874,31 +2590,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/{uuid}/export/file: get: - operationId: ModulesApi_moduleExportFile - summary: >- - Return module and its artifacts in a zip file format for the specified - module. + tags: + - modules description: >- Returns a zip file containing the published module and all associated artifacts, i.e. schemas and VCs. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 + - in: path + name: uuid schema: type: string + required: true + description: Selected module ID. + security: + - bearerAuth: [] + summary: >- + Return module and its artifacts in a zip file format for the specified + module. responses: '200': - description: File. + description: Successful operation. Response zip file '401': description: Unauthorized. '403': @@ -2908,33 +2623,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/{uuid}/export/message: get: - operationId: ModulesApi_moduleExportMessage - summary: Return Heder message ID for the specified published module. + tags: + - modules description: >- Returns the Hedera message ID for the specified module published onto IPFS. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 + - in: path + name: uuid schema: type: string + required: true + description: Selected module ID. + security: + - bearerAuth: [] + summary: Return Heder message ID for the specified published module. responses: '200': - description: Message. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ExportMessageDTO' + $ref: '#/components/schemas/ExportModule' '401': description: Unauthorized. '403': @@ -2944,33 +2658,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/import/message: post: - operationId: ModulesApi_moduleImportMessage - summary: Imports new module from IPFS. + tags: + - modules description: >- Imports new module and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Imports new module from IPFS. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the module. required: true - description: Message. content: application/json: schema: - $ref: '#/components/schemas/ImportMessageDTO' + type: object + properties: + messageId: + type: string responses: - '200': - description: Created module. + '201': + description: Created. content: application/json: schema: - $ref: '#/components/schemas/ModuleDTO' + $ref: '#/components/schemas/Module' '401': description: Unauthorized. '403': @@ -2980,33 +2698,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/import/file: post: - operationId: ModulesApi_moduleImportFile - summary: Imports new module from a zip file. + tags: + - modules description: >- Imports new module and all associated artifacts, such as schemas and VCs, from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Imports new module from a zip file. requestBody: + description: >- + A zip file that contains the module and associated schemas and VCs to + be imported. required: true - description: File. content: - application/json: + binary/octet-stream: schema: type: string + format: binary responses: - '200': - description: Created module. + '201': + description: Created. content: application/json: schema: - $ref: '#/components/schemas/ModuleDTO' + $ref: '#/components/schemas/Module' '401': description: Unauthorized. '403': @@ -3016,33 +2736,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/import/message/preview: post: - operationId: ModulesApi_moduleImportMessagePreview - summary: Imports new module from IPFS. + tags: + - modules description: >- - Imports new module and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] + Previews the module from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + summary: Module preview from IPFS. + security: + - bearerAuth: [] requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the module. required: true - description: Message. content: application/json: schema: - $ref: '#/components/schemas/ImportMessageDTO' + type: object + properties: + messageId: + type: string responses: '200': - description: Module preview. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ModulePreviewDTO' + $ref: '#/components/schemas/PreviewModule' '401': description: Unauthorized. '403': @@ -3052,33 +2775,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/import/file/preview: post: - operationId: ModulesApi_moduleImportFilePreview - summary: Imports new module from a zip file. + tags: + - modules description: >- - Imports new module and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] + Previews the module from a zip file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + summary: Module preview from a zip file. + security: + - bearerAuth: [] requestBody: + description: >- + A zip file that contains the module and associated schemas and VCs to + be viewed. required: true - description: File. content: - application/json: + binary/octet-stream: schema: type: string + format: binary responses: '200': - description: Module preview. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ModulePreviewDTO' + $ref: '#/components/schemas/PreviewModule' '401': description: Unauthorized. '403': @@ -3088,41 +2813,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/{uuid}/publish: put: - operationId: ModulesApi_publishModule - summary: Publishes the module onto IPFS. + tags: + - modules description: >- Publishes the module with the specified (internal) module ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: uuid - required: true - in: path - description: Module Identifier - example: 00000000-0000-0000-0000-000000000000 + - in: path + name: uuid schema: type: string - requestBody: - required: true - description: Module. - content: - application/json: - schema: - $ref: '#/components/schemas/ModuleDTO' + required: true + description: Selected module ID. + summary: Publishes the module onto IPFS. + security: + - bearerAuth: [] responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ModuleDTO' + $ref: '#/components/schemas/PublishModule' '401': description: Unauthorized. '403': @@ -3132,32 +2849,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /modules/validate: post: - operationId: ModulesApi_validateModule - summary: Validates selected module. + tags: + - modules description: >- Validates selected module. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Validates module. requestBody: + description: Object that contains module configuration. required: true - description: Module config. content: application/json: schema: - $ref: '#/components/schemas/ModuleDTO' + $ref: '#/components/schemas/Module' responses: '200': - description: Validation result. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ModuleValidationDTO' + $ref: '#/components/schemas/ValidateModule' '401': description: Unauthorized. '403': @@ -3167,10 +2883,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tools: post: operationId: ToolsApi_createNewTool @@ -3179,13 +2892,6 @@ paths: Creates a new tool. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. @@ -3193,20 +2899,16 @@ paths: application/json: schema: $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_9 + tags: &ref_5 - tools security: - - bearer: [] + - bearerAuth: [] get: operationId: ToolsApi_getTools summary: Return a list of all tools. @@ -3214,49 +2916,36 @@ paths: Returns all tools. Only users with the Standard Registry role are allowed to make the request. parameters: + - name: pageSize + required: true + in: query + description: The numbers of items to return + schema: + type: number - name: pageIndex - required: false + required: true in: query description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 schema: type: number responses: '200': description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + $ref: '#/components/schemas/ToolDTO' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/push: post: operationId: ToolsApi_createNewToolAsync @@ -3265,13 +2954,6 @@ paths: Creates a new tool. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. @@ -3279,19 +2961,15 @@ paths: application/json: schema: $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/{id}: delete: operationId: ToolsApi_deleteTool @@ -3304,29 +2982,20 @@ paths: required: true in: path description: Tool ID - example: '000000000000000000000001' schema: type: string responses: '200': description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. + '500': + description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] get: operationId: ToolsApi_getToolById summary: Retrieves tool configuration. @@ -3338,7 +3007,6 @@ paths: required: true in: path description: Tool ID - example: '000000000000000000000001' schema: type: string responses: @@ -3358,9 +3026,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] put: operationId: ToolsApi_updateTool summary: Updates tool configuration. @@ -3372,16 +3040,8 @@ paths: required: true in: path description: Tool ID - example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. @@ -3399,9 +3059,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/{id}/publish: put: operationId: ToolsApi_publishTool @@ -3416,23 +3076,15 @@ paths: required: true in: path description: Tool ID - example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ToolValidationDTO' + $ref: '#/components/schemas/ToolDTO' '401': description: Unauthorized. '403': @@ -3443,9 +3095,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/{id}/push/publish: put: operationId: ToolsApi_publishToolAsync @@ -3460,16 +3112,8 @@ paths: required: true in: path description: Tool ID - example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' responses: '200': description: Successful operation. @@ -3487,9 +3131,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/validate: post: operationId: ToolsApi_validateTool @@ -3498,20 +3142,13 @@ paths: Validates selected tool. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: Tool configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' responses: '200': - description: Validation result. + description: '' content: application/json: schema: - $ref: '#/components/schemas/ToolValidationDTO' + type: object '401': description: Unauthorized. '403': @@ -3522,9 +3159,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/{id}/export/file: get: operationId: ToolsApi_toolExportFile @@ -3540,7 +3177,6 @@ paths: required: true in: path description: Tool ID - example: '000000000000000000000001' schema: type: string responses: @@ -3556,9 +3192,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/{id}/export/message: get: operationId: ToolsApi_toolExportMessage @@ -3572,7 +3208,6 @@ paths: required: true in: path description: Tool ID - example: '000000000000000000000001' schema: type: string responses: @@ -3581,7 +3216,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExportMessageDTO' + type: object '401': description: Unauthorized. '403': @@ -3592,9 +3227,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/import/message/preview: post: operationId: ToolsApi_toolImportMessagePreview @@ -3604,20 +3239,13 @@ paths: DB. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' responses: '200': - description: Tool preview. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ToolPreviewDTO' + type: object '401': description: Unauthorized. '403': @@ -3628,9 +3256,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/import/message: post: operationId: ToolsApi_toolImportMessage @@ -3640,13 +3268,6 @@ paths: DB. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' responses: '200': description: Successful operation. @@ -3664,9 +3285,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/import/file/preview: post: operationId: ToolsApi_toolImportFilePreview @@ -3676,20 +3297,13 @@ paths: from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: File. - content: - application/json: - schema: - type: string responses: '200': - description: Module preview. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ToolPreviewDTO' + type: object '401': description: Unauthorized. '403': @@ -3700,9 +3314,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/import/file: post: operationId: ToolsApi_toolImportFile @@ -3712,13 +3326,6 @@ paths: from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: File. - content: - application/json: - schema: - type: string responses: '200': description: Successful operation. @@ -3736,9 +3343,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/import/file-metadata: post: operationId: ToolsApi_toolImportFileWithMetadata @@ -3779,9 +3386,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/push/import/file: post: operationId: ToolsApi_toolImportFileAsync @@ -3791,13 +3398,6 @@ paths: from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: A zip file containing tool config. - content: - application/json: - schema: - type: string responses: '200': description: Successful operation. @@ -3815,9 +3415,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/push/import/file-metadata: post: operationId: ToolsApi_toolImportFileWithMetadataAsync @@ -3858,9 +3458,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/push/import/message: post: operationId: ToolsApi_toolImportMessageAsync @@ -3870,13 +3470,6 @@ paths: DB. Only users with the Standard Registry role are allowed to make the request. parameters: [] - requestBody: - required: true - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ImportMessageDTO' responses: '200': description: Successful operation. @@ -3894,9 +3487,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /tools/menu/all: get: operationId: ToolsApi_getMenu @@ -3907,13 +3500,13 @@ paths: parameters: [] responses: '200': - description: Modules. + description: '' content: application/json: schema: type: array items: - $ref: '#/components/schemas/ToolDTO' + type: object '401': description: Unauthorized. '403': @@ -3924,9 +3517,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 + tags: *ref_5 security: - - bearer: [] + - bearerAuth: [] /profiles/{username}: get: operationId: ProfileApi_getProfile @@ -3939,7 +3532,6 @@ paths: required: true in: path description: The name of the user for whom to fetch the information - example: username schema: type: string responses: @@ -3950,7 +3542,7 @@ paths: schema: $ref: '#/components/schemas/ProfileDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -3959,10 +3551,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_10 + tags: &ref_6 - profiles security: - - bearer: [] + - bearerAuth: [] put: operationId: ProfileApi_setUserProfile summary: Sets Hedera credentials for the user. @@ -3974,7 +3566,6 @@ paths: required: true in: path description: The name of the user for whom to update the information. - example: username schema: type: string requestBody: @@ -3988,7 +3579,7 @@ paths: '200': description: Created. '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -3997,9 +3588,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 + tags: *ref_6 security: - - bearer: [] + - bearerAuth: [] + /profiles/push/{username}: put: operationId: ProfileApi_setUserProfileAsync @@ -4012,7 +3604,6 @@ paths: required: true in: path description: The name of the user for whom to update the information. - example: username schema: type: string requestBody: @@ -4030,7 +3621,7 @@ paths: schema: $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -4039,9 +3630,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 + tags: *ref_6 security: - - bearer: [] + - bearerAuth: [] + /profiles/{username}/balance: get: operationId: ProfileApi_getUserBalance @@ -4054,7 +3646,6 @@ paths: required: true in: path description: The name of the user for whom to fetch the balance. - example: username schema: type: string responses: @@ -4065,7 +3656,7 @@ paths: schema: type: string '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -4074,9 +3665,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 + tags: *ref_6 security: - - bearer: [] + - bearerAuth: [] + /profiles/restore/{username}: put: operationId: ProfileApi_restoreUserProfile @@ -4087,7 +3679,6 @@ paths: required: true in: path description: The name of the user for whom to restore the information. - example: username schema: type: string requestBody: @@ -4105,7 +3696,7 @@ paths: schema: $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -4114,9 +3705,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 + tags: *ref_6 security: - - bearer: [] + - bearerAuth: [] + /profiles/restore/topics/{username}: put: operationId: ProfileApi_restoreTopic @@ -4127,7 +3719,6 @@ paths: required: true in: path description: The name of the user for whom to restore the information. - example: username schema: type: string requestBody: @@ -4145,7 +3736,7 @@ paths: schema: $ref: '#/components/schemas/TaskDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -4154,9 +3745,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 + tags: *ref_6 security: - - bearer: [] + - bearerAuth: [] + /profiles/did-document/validate: post: operationId: ProfileApi_validateDidDocument @@ -4178,7 +3770,7 @@ paths: schema: $ref: '#/components/schemas/DidDocumentStatusDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -4187,9 +3779,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 + tags: *ref_6 security: - - bearer: [] + - bearerAuth: [] + /profiles/did-keys/validate: post: operationId: ProfileApi_validateDidKeys @@ -4211,7 +3804,7 @@ paths: schema: $ref: '#/components/schemas/DidKeyStatusDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -4220,36 +3813,46 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 + tags: *ref_6 security: - - bearer: [] + - bearerAuth: [] + /policies: get: - operationId: PolicyApi_getPolicies + tags: + - policies + description: >- + Returns all policies. Only users with the Standard Registry and + Installer role are allowed to make the request. + security: + - bearerAuth: [] summary: Return a list of all policies. - description: Returns all policies. parameters: - - name: pageIndex - required: false - in: query + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number + examples: + pageSize: + summary: Example of a pageSize + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -4258,7 +3861,14 @@ paths: schema: type: array items: - $ref: '#/components/schemas/PolicyDTO' + allOf: + - $ref: '#/components/schemas/PolicyConfig' + - type: object + properties: + userRoles: + type: array + items: + type: string '401': description: Unauthorized. '403': @@ -4268,34 +3878,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_11 - - policies - security: - - bearer: [] + $ref: '#/components/schemas/Error' post: - operationId: PolicyApi_createPolicy - summary: Creates a new policy. + tags: + - policies description: >- Creates a new policy. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Creates a new policy. requestBody: + description: Object that contains policy configuration. required: true - description: Policy configuration. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PolicyConfig' responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' + '201': + description: Created. '401': description: Unauthorized. '403': @@ -4305,10 +3907,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/migrate-data: post: operationId: PolicyApi_migrateData @@ -4338,19 +3937,16 @@ paths: type: string id: type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: &ref_7 + - policies security: - - bearer: [] + - bearerAuth: [] /policies/push/migrate-data: post: operationId: PolicyApi_migrateDataAsync @@ -4361,7 +3957,7 @@ paths: parameters: [] requestBody: required: true - description: Migration configuration. + description: Migration config. content: application/json: schema: @@ -4372,42 +3968,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: object '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] /policies/push: post: - operationId: PolicyApi_createPolicyAsync - summary: Creates a new policy. + tags: + - policies description: >- Creates a new policy. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Creates a new policy. requestBody: + description: Object that contains policy configuration. required: true - description: Policy configuration. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PolicyConfig' responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -4417,108 +4011,80 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/push/{policyId}: post: operationId: PolicyApi_updatePolicyAsync - summary: Clones policy. - description: >- - Clones policy. Only users with the Standard Registry role are allowed to - make the request. + summary: '' parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - requestBody: - required: true - description: Policy configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' + required: true + description: Policy ID. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: object '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] delete: operationId: PolicyApi_deletePolicyAsync - summary: Remove policy. - description: >- - Remove policy. Only users with the Standard Registry role are allowed to - make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + '202': + description: '' + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] /policies/{policyId}: get: - operationId: PolicyApi_getPolicy - summary: Retrieves policy configuration. + tags: + - policies description: >- Retrieves policy configuration for the specified policy ID. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Selected policy ID. + summary: Retrieves policy configuration. + security: + - bearerAuth: [] responses: '200': - description: Policy configuration. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + allOf: + - $ref: '#/components/schemas/PolicyConfig' + - type: object + properties: + userRoles: + type: array + items: + type: string '401': description: Unauthorized. '403': @@ -4528,38 +4094,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' put: - operationId: PolicyApi_updatePolicy - summary: Updates policy configuration. + tags: + - policies description: >- Updates policy configuration for the specified policy ID. Only users with the Standard Registry role are allowed to make the request. + summary: Updates policy configuration. parameters: - - name: policyId + - in: path + name: policyId + description: Selected policy ID. required: true - in: path - description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: + description: Object that contains policy configuration. required: true - description: Policy configuration. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PolicyConfig' + security: + - bearerAuth: [] responses: '200': - description: Policy configuration. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PolicyConfig' '401': description: Unauthorized. '403': @@ -4569,40 +4134,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/publish: put: - operationId: PolicyApi_publishPolicy - summary: Publishes the policy onto IPFS. + tags: + - policies description: >- Publishes the policy with the specified (internal) policy ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Selected policy ID. requestBody: + description: Object that contains policy version. required: true content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + type: object + properties: + policyVersion: + type: string + summary: Publishes the policy onto IPFS. + security: + - bearerAuth: [] responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PoliciesValidationDTO' + $ref: '#/components/schemas/PublishPolicy' '401': description: Unauthorized. '403': @@ -4612,41 +4180,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/push/{policyId}/publish: put: - operationId: PolicyApi_publishPolicyAsync - summary: Publishes the policy onto IPFS. + tags: + - policies description: >- Publishes the policy with the specified (internal) policy ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. requestBody: + description: Object that contains policy version. required: true - description: Policy configuration. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + type: object + properties: + policyVersion: + type: string responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -4656,33 +4229,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/dry-run: put: - operationId: PolicyApi_dryRunPolicy - summary: Dry Run policy. + tags: + - policies description: >- Run policy without making any persistent changes or executing transaction. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Dry Run policy. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. responses: - '200': - description: Successful operation. + '201': + description: Created. content: application/json: schema: - $ref: '#/components/schemas/PoliciesValidationDTO' + $ref: '#/components/schemas/PublishPolicy' '401': description: Unauthorized. '403': @@ -4692,25 +4264,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/discontinue: put: operationId: PolicyApi_discontinuePolicy - summary: Discontinue policy. + summary: Discontunue policy. description: >- - Discontinue policy. Only users with the Standard Registry role are + Discontunue policy. Only users with the Standard Registry role are allowed to make the request. parameters: - name: policyId required: true in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string + description: Policy identifier. + schema: {} requestBody: required: true description: Discontinue details. @@ -4720,53 +4287,50 @@ paths: type: object properties: date: - type: string + type: number responses: '200': - description: Successful operation. + description: Policies. content: application/json: schema: type: array items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: object '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /policies/{policyId}/draft: put: - operationId: PolicyApi_draftPolicy - summary: Return policy to editing. + tags: + - policies description: >- Return policy to editing. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Return policy to editing. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PublishPolicy' '401': description: Unauthorized. '403': @@ -4776,32 +4340,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/validate: post: - operationId: PolicyApi_validatePolicy - summary: Validates policy. + tags: + - policies description: >- Validates selected policy. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Validates policy. requestBody: + description: Object that contains policy configuration. required: true - description: Policy configuration. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PolicyConfig' responses: '200': - description: Validation result. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyValidationDTO' + $ref: '#/components/schemas/ValidatePolicy' '401': description: Unauthorized. '403': @@ -4811,23 +4374,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/navigation: get: operationId: PolicyApi_getPolicyNavigation summary: Returns a policy navigation. description: Returns a policy navigation. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. responses: '200': description: Successful operation. @@ -4835,39 +4394,52 @@ paths: application/json: schema: type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] /policies/{policyId}/groups: get: - operationId: PolicyApi_getPolicyGroups - summary: Returns a list of groups the user is a member of. + tags: + - policies description: Returns a list of groups the user is a member of. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Selected policy ID. + summary: Returns a list of groups the user is a member of. + security: + - bearerAuth: [] responses: '200': description: Successful operation. content: application/json: schema: - type: object + type: array + items: + type: object + properties: + id: + type: string + uuid: + type: string + role: + type: string + groupLabel: + type: string + groupName: + type: string + active: + type: boolean '401': description: Unauthorized. '403': @@ -4877,38 +4449,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' post: - operationId: PolicyApi_setPolicyGroups - summary: Makes the selected group active. + tags: + - policies description: >- Makes the selected group active. if UUID is not set then returns the user to the default state. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Selected policy ID. + summary: Makes the selected group active. requestBody: + description: Selected group. required: true - description: Group content: application/json: schema: - $ref: '#/components/schemas/Object' + type: object + properties: + uuid: + type: string + security: + - bearerAuth: [] responses: '200': description: Successful operation. - content: - application/json: - schema: - type: object '401': description: Unauthorized. '403': @@ -4918,10 +4488,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/documents: get: operationId: PolicyApi_getPolicyDocuments @@ -4930,96 +4497,86 @@ paths: Get policy documents. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: policyId + - name: pageSize required: true - in: path - description: Policy Id - example: '000000000000000000000001' + in: query + description: Page size. schema: - type: string + type: number + - name: pageIndex + required: true + in: query + description: Page index. + schema: + type: number - name: type - required: false + required: true in: query description: Document type. - example: VC schema: enum: - VC - VP type: string - name: includeDocument - required: false + required: true in: query description: Include document field. - example: true schema: type: boolean - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number + - name: policyId + required: true + in: path + description: Policy identifier. + schema: {} responses: '200': description: Documents. headers: X-Total-Count: + description: Total documents count. schema: - type: integer - description: Total items in the collection. + type: number content: application/json: schema: type: array items: type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] - /policies/{policyId}/data: + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/blocks: get: - operationId: PolicyApi_downloadPolicyData - summary: Get policy data. + tags: + - policies description: >- - Get policy data. Only users with the Standard Registry role are allowed - to make the request. + Returns data from the root policy block. Only users with the Standard + Registry and Installer role are allowed to make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Selected policy ID. + summary: Retrieves data for the policy root block. + security: + - bearerAuth: [] responses: '200': - description: Policy data. + description: Successful operation. content: application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/PolicyBlock' '401': description: Unauthorized. '403': @@ -5029,33 +4586,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/data: - post: - operationId: PolicyApi_uploadPolicyData - summary: Upload policy data. + $ref: '#/components/schemas/Error' + /policies/{policyId}/blocks/{uuid}: + get: + tags: + - policies description: >- - Upload policy data. Only users with the Standard Registry role are + Requests block data. Only users with a role that described in block are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Policy data file - content: - application/json: - schema: - type: string - format: binary + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Selected policy ID. + - in: path + name: uuid + schema: + type: string + required: true + description: Selected block UUID. + summary: Requests block data. + security: + - bearerAuth: [] responses: '200': - description: Uploaded policy. + description: Successful operation. content: application/json: schema: - type: object + $ref: '#/components/schemas/PolicyBlockData' '401': description: Unauthorized. '403': @@ -5065,106 +4626,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/tag-block-map: - get: - operationId: PolicyApi_getTagBlockMap - summary: Get policy tag block map. - description: >- - Get policy tag block map. Only users with the Standard Registry role are - allowed to make the request. + $ref: '#/components/schemas/Error' + post: + tags: + - policies + description: Sends data to the specified block. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - responses: - '200': - description: Policy tag block map. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/virtual-keys: - get: - operationId: PolicyApi_downloadVirtualKeys - summary: Get policy virtual keys. - description: >- - Get policy virtual keys. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId required: true - in: path - description: Policy Id - example: '000000000000000000000001' + description: Selected policy ID. + - in: path + name: uuid schema: type: string - responses: - '200': - description: Policy virtual keys. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - post: - operationId: PolicyApi_uploadVirtualKeys - summary: Upload policy virtual keys. - description: >- - Upload policy virtual keys. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string + description: Selected block UUID. + summary: Sends data to the specified block. requestBody: + description: Object with the data to be sent to the block. required: true - description: Virtual keys file content: application/json: schema: - type: string - format: binary + type: object + security: + - bearerAuth: [] responses: '200': - description: Operation completed. + description: Successful operation. '401': description: Unauthorized. '403': @@ -5174,208 +4666,162 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/blocks: - get: - operationId: PolicyApi_getPolicyBlocks - summary: Retrieves data for the policy root block. - description: >- - Returns data from the root policy block. Only users with the Standard - Registry and Installer role are allowed to make the request. + $ref: '#/components/schemas/Error' + /policies/{policyId}/tag/{tagName}/blocks: + post: + operationId: PolicyApi_setBlocksByTagName + summary: Sends data to the specified block. + description: Sends data to the specified block. parameters: - - name: policyId + - in: path + name: policyId + schema: + type: string required: true - in: path - description: Policy Id - example: '000000000000000000000001' + description: Policy ID. + - in: path + name: tagName schema: type: string + required: true + description: Tag name. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: object '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] - /policies/{policyId}/blocks/{uuid}: + - bearerAuth: [] + - bearerAuth: [] get: - operationId: PolicyApi_getBlockData + operationId: PolicyApi_getBlocksByTagName summary: Requests block data. description: >- - Requests block data. Only users with a role that described in block are - allowed to make the request. + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: uuid required: true - in: path - description: Block Identifier - example: 00000000-0000-0000-0000-000000000000 + description: Policy ID. + - in: path + name: tagName schema: type: string + required: true + description: Tag name. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: object '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] - post: - operationId: PolicyApi_setBlockData - summary: Sends data to the specified block. - description: Sends data to the specified block. + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/tag/{tagName}: + get: + operationId: PolicyApi_getBlockByTagName + summary: Requests block data. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: uuid required: true - in: path - description: Block Identifier - example: 00000000-0000-0000-0000-000000000000 + description: Policy ID. + - in: path + name: tagName schema: type: string - requestBody: - required: true - description: Data - content: - application/json: - schema: - $ref: '#/components/schemas/Object' + required: true + description: Tag name. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: object '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] - /policies/{policyId}/tag/{tagName}/blocks: - post: - operationId: PolicyApi_setBlocksByTagName - summary: Sends data to the specified block. - description: Sends data to the specified block. + - bearerAuth: [] + - bearerAuth: [] + /policies/{policyId}/blocks/{uuid}/parents: + get: + operationId: PolicyApi_getBlockParents parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: tagName required: true - in: path - description: Block name (Tag) - example: block-tag + description: Policy ID. + - in: path + name: uuid schema: type: string - requestBody: - required: true - description: Data - content: - application/json: - schema: - $ref: '#/components/schemas/Object' + required: true + description: uuid. responses: '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BlockDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + description: '' + tags: *ref_7 + /policies/{policyId}/export/file: get: - operationId: PolicyApi_getBlocksByTagName - summary: Requests block data. + tags: + - policies description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. + Returns a zip file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: tagName required: true - in: path - description: Block name (Tag) - example: block-tag - schema: - type: string + description: Selected policy ID. + security: + - bearerAuth: [] + summary: >- + Return policy and its artifacts in a zip file format for the specified + policy. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/BlockDTO' + $ref: '#/components/schemas/ExportPolicy' '401': description: Unauthorized. '403': @@ -5385,39 +4831,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/tag/{tagName}: + $ref: '#/components/schemas/Error' + /policies/{policyId}/export/message: get: - operationId: PolicyApi_getBlockByTagName - summary: Requests block config. + tags: + - policies description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. + Returns the Hedera message ID for the specified policy published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: tagName required: true - in: path - description: Block name (Tag) - example: block-tag - schema: - type: string + description: Selected policy ID. + security: + - bearerAuth: [] + summary: Return Heder message ID for the specified published policy. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/BlockDTO' + $ref: '#/components/schemas/ExportPolicy' '401': description: Unauthorized. '403': @@ -5427,30 +4866,22 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/blocks/{uuid}/parents: + $ref: '#/components/schemas/Error' + /policies/{policyId}/export/xlsx: get: - operationId: PolicyApi_getBlockParents - summary: Requests block's parents. + operationId: PolicyApi_getPolicyExportXlsx + summary: >- + Return policy and its artifacts in a xlsx file format for the specified + policy. description: >- - Requests block's parents. Only users with a role that described in block - are allowed to make the request. + Returns a xlsx file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. parameters: - name: policyId required: true in: path description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: uuid - required: true - in: path - description: Block Identifier - example: 00000000-0000-0000-0000-000000000000 schema: type: string responses: @@ -5459,11 +4890,10 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/BlockDTO' + type: string + format: binary '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -5472,155 +4902,52 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] - /policies/{policyId}/export/file: - get: - operationId: PolicyApi_getPolicyExportFile - summary: >- - Return policy and its artifacts in a zip file format for the specified - policy. - description: >- - Returns a zip file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/export/message: - get: - operationId: PolicyApi_getPolicyExportMessage - summary: Return Heder message ID for the specified published policy. - description: >- - Returns the Hedera message ID for the specified policy published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Message. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportMessageDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/{policyId}/export/xlsx: - get: - operationId: PolicyApi_getPolicyExportXlsx - summary: >- - Return policy and its artifacts in a xlsx file format for the specified - policy. - description: >- - Returns a xlsx file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] - /policies/import/message: - post: - operationId: PolicyApi_importPolicyFromMessage - summary: Imports new policy from IPFS. + - bearerAuth: [] + + /policies/import/message: + post: + tags: + - policies description: >- Imports new policy and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 + - in: query + name: versionOfTopicId schema: type: string + description: The topic ID of policy version. + examples: + pageIndex: + summary: Example of a topic ID of policy version. + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new policy from IPFS. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the Policy. required: true - description: Message. content: application/json: schema: - $ref: '#/components/schemas/ImportMessageDTO' + type: object + properties: + messageId: + type: string responses: - '200': - description: Created policy. + '201': + description: Created. content: application/json: schema: type: array items: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PolicyConfig' '401': description: Unauthorized. '403': @@ -5630,40 +4957,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/push/import/message: post: - operationId: PolicyApi_importPolicyFromMessageAsync - summary: Imports new policy from IPFS. + tags: + - policies description: >- Imports new policy and all associated artifacts from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string + security: + - bearerAuth: [] + summary: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the Policy. required: true - description: Message. content: application/json: schema: - $ref: '#/components/schemas/ImportMessageDTO' + type: object + properties: + messageId: + type: string responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -5673,32 +4999,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/import/message/preview: post: - operationId: PolicyApi_importMessage - summary: Policy preview from IPFS. + tags: + - policies description: >- Previews the policy from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + summary: Policy preview from IPFS. + security: + - bearerAuth: [] requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the policy. required: true - description: Message. content: application/json: schema: - $ref: '#/components/schemas/ImportMessageDTO' + type: object + properties: + messageId: + type: string responses: '200': - description: Policy preview. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyPreviewDTO' + $ref: '#/components/schemas/PreviewPolicy' '401': description: Unauthorized. '403': @@ -5708,32 +5038,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/push/import/message/preview: post: - operationId: PolicyApi_importFromMessagePreview - summary: Policy preview from IPFS. + tags: + - policies description: >- Previews the policy from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Previews the policy from IPFS without loading it into the local DB. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the policy. required: true - description: Message. content: application/json: schema: - $ref: '#/components/schemas/ImportMessageDTO' + type: object + properties: + messageId: + type: string responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -5743,42 +5077,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/import/file: post: - operationId: PolicyApi_importPolicyFromFile - summary: Imports new policy from a zip file. + tags: + - policies description: >- Imports new policy and all associated artifacts, such as schemas and VCs, from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 + - in: query + name: versionOfTopicId schema: type: string + description: The topic ID of policy version. + examples: + pageIndex: + summary: Example of a topic ID of policy version. + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new policy from a zip file. requestBody: + description: >- + A zip file that contains the policy and associated schemas and VCs to + be imported. required: true - description: A zip file containing policy config. content: - application/json: + binary/octet-stream: schema: type: string + format: binary responses: - '200': - description: Created policy. + '201': + description: Created. content: application/json: schema: type: array items: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/PolicyConfig' '401': description: Unauthorized. '403': @@ -5788,10 +5127,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/import/file-metadata: post: operationId: PolicyApi_importPolicyFromFileWithMetadata @@ -5802,10 +5138,9 @@ paths: Standard Registry role are allowed to make the request. parameters: - name: versionOfTopicId - required: false + required: true in: query - description: The topic ID of policy version. - example: 0.0.00000001 + description: Topic Id schema: type: string requestBody: @@ -5828,11 +5163,9 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' + type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -5841,39 +5174,40 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] + /policies/push/import/file: post: - operationId: PolicyApi_importPolicyFromFileAsync - summary: Imports new policy from a zip file. + tags: + - policies description: >- Imports new policy and all associated artifacts, such as schemas and VCs, from the provided zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: false - in: query - description: The topic ID of policy version. - example: 0.0.00000001 - schema: - type: string + security: + - bearerAuth: [] + summary: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. requestBody: + description: >- + A zip file that contains the policy and associated schemas and VCs to + be imported. required: true - description: A zip file containing policy config. content: - application/json: + binary/octet-stream: schema: type: string + format: binary responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -5883,10 +5217,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/push/import/file-metadata: post: operationId: PolicyApi_importPolicyFromFileWithMetadataAsync @@ -5897,10 +5228,9 @@ paths: Standard Registry role are allowed to make the request. parameters: - name: versionOfTopicId - required: false + required: true in: query - description: The topic ID of policy version. - example: 0.0.00000001 + description: Topic Id schema: type: string requestBody: @@ -5923,9 +5253,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -5934,32 +5264,38 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] + /policies/import/file/preview: post: - operationId: PolicyApi_importPolicyFromFilePreview - summary: Policy preview from a zip file. + tags: + - policies description: >- Previews the policy from a zip file without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + summary: Policy preview from a zip file. + security: + - bearerAuth: [] requestBody: + description: >- + A zip file that contains the policy and associated schemas and VCs to + be viewed. required: true - description: A zip file containing policy config. content: - application/json: + binary/octet-stream: schema: type: string + format: binary responses: '200': - description: Policy preview. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/PolicyPreviewDTO' + $ref: '#/components/schemas/PreviewPolicy' '401': description: Unauthorized. '403': @@ -5969,10 +5305,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/import/xlsx: post: operationId: PolicyApi_importPolicyFromXlsx @@ -5986,7 +5319,6 @@ paths: required: true in: query description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -6004,7 +5336,7 @@ paths: schema: type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -6013,9 +5345,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] + /policies/push/import/xlsx: post: operationId: PolicyApi_importPolicyFromXlsxAsync @@ -6029,7 +5362,6 @@ paths: required: true in: query description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -6045,9 +5377,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -6056,9 +5388,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] + /policies/import/xlsx/preview: post: operationId: PolicyApi_importPolicyFromXlsxPreview @@ -6083,7 +5416,7 @@ paths: schema: type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -6092,51 +5425,49 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 security: - - bearer: [] + - bearerAuth: [] + /policies/blocks/about: get: operationId: PolicyApi_getBlockAbout - summary: Returns block descriptions. - description: >- - Returns block descriptions. Only users with the Standard Registry role - are allowed to make the request. parameters: [] responses: '200': - description: Block descriptions. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + description: '' + tags: *ref_7 /policies/{policyId}/dry-run/users: get: - operationId: PolicyApi_getDryRunUsers - summary: Returns virtual users. + tags: + - policies description: >- - Returns virtual users. Only users with the Standard Registry role are - allowed to make the request. + Returns all virtual users. Only users with the Standard Registry role + are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns all virtual users. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. responses: '200': - description: Virtual users. + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + username: + type: string + did: + type: string '401': description: Unauthorized. '403': @@ -6146,28 +5477,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/dry-run/user: post: - operationId: PolicyApi_setDryRunUser - summary: Creates virtual users. + tags: + - policies description: >- - Creates virtual users. Only users with the Standard Registry role are - allowed to make the request. + Create a new virtual account. Only users with the Standard Registry role + are allowed to make the request. + security: + - bearerAuth: [] + summary: Create a new virtual account. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. responses: '200': - description: Virtual users. + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + username: + type: string + did: + type: string '401': description: Unauthorized. '403': @@ -6177,35 +5518,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/dry-run/login: post: - operationId: PolicyApi_loginDryRunUser - summary: Change active virtual user. + tags: + - policies description: >- - Change active virtual user. Only users with the Standard Registry role - are allowed to make the request. + Logs virtual user into the system. Only users with the Standard Registry + role are allowed to make the request. + security: + - bearerAuth: [] + summary: Logs virtual user into the system. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. requestBody: + description: Virtual user required: true - description: Credentials. content: application/json: schema: - $ref: '#/components/schemas/Object' + type: object + properties: + did: + type: string responses: '200': - description: Virtual users. + description: Successful operation. + content: + application/json: + schema: + type: array + items: + type: object + properties: + username: + type: string + did: + type: string '401': description: Unauthorized. '403': @@ -6215,35 +5569,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/dry-run/restart: post: - operationId: PolicyApi_restartDryRun - summary: Clear dry-run state. + tags: + - policies description: >- - Clear dry-run state. Only users with the Standard Registry role are - allowed to make the request. + Restarts the execution of the policy. Clear data in database. Only users + with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Restarts the execution of the policy. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - requestBody: - required: true - description: . - content: - application/json: - schema: - type: string + required: true + description: Policy ID. responses: '200': - description: . + description: Successful operation. '401': description: Unauthorized. '403': @@ -6253,55 +5599,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/dry-run/transactions: get: - operationId: PolicyApi_getDryRunTransactions - summary: Get dry-run details (Transactions). + tags: + - policies description: >- - Get dry-run details (Transactions). Only users with the Standard + Returns lists of virtual transactions. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns lists of virtual transactions. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number + required: true + description: Policy ID. responses: '200': - description: Transactions. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. + description: Successful operation. content: application/json: schema: type: array items: type: object + properties: + createDate: + type: string + type: + type: string + hederaAccountId: + type: string '401': description: Unauthorized. '403': @@ -6311,55 +5642,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/dry-run/artifacts: get: - operationId: PolicyApi_getDryRunArtifacts - summary: Get dry-run details (Artifacts). + tags: + - policies description: >- - Get dry-run details (Artifacts). Only users with the Standard Registry - role are allowed to make the request. + Returns lists of virtual artifacts. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns lists of virtual artifacts. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number + required: true + description: Policy ID. responses: '200': - description: Artifacts. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. + description: Successful operation. content: application/json: schema: type: array items: type: object + properties: + createDate: + type: string + type: + type: string + owner: + type: string '401': description: Unauthorized. '403': @@ -6369,55 +5685,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/dry-run/ipfs: get: - operationId: PolicyApi_getDryRunIpfs - summary: Get dry-run details (Files). + tags: + - policies description: >- - Get dry-run details (Files). Only users with the Standard Registry role - are allowed to make the request. + Returns lists of virtual artifacts. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns lists of virtual artifacts. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 20 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number + required: true + description: Policy ID. responses: '200': - description: Files. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. + description: Successful operation. content: application/json: schema: type: array items: type: object + properties: + createDate: + type: string + documentURL: + type: string + document: + type: object '401': description: Unauthorized. '403': @@ -6427,28 +5728,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/{policyId}/multiple: - get: - operationId: PolicyApi_getMultiplePolicies - summary: Requests policy links. + post: + tags: + - policies description: >- - Requests policy links. Only users with a role that described in block - are allowed to make the request. + Creates a link between the current policy and the main policy. Or + creates a group making the current policy the main one. + security: + - bearerAuth: [] + summary: Creates Multi policy config. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy ID. + requestBody: + description: Multi policy config. + required: true + content: + application/json: + schema: + type: object + required: + - mainPolicyTopicId + - synchronizationTopicId + properties: + mainPolicyTopicId: + type: string + synchronizationTopicId: + type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/MultiPolicyConfig' '401': description: Unauthorized. '403': @@ -6458,34 +5777,28 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + $ref: '#/components/schemas/Error' + get: + tags: + - policies + description: Requests Multi policy config. security: - - bearer: [] - post: - operationId: PolicyApi_setMultiplePolicies - summary: Creates policy link. - description: >- - Creates policy link. Only users with a role that described in block are - allowed to make the request. + - bearerAuth: [] + summary: Requests Multi policy config. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string - requestBody: - required: true - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/Object' + required: true + description: Policy ID. responses: '200': description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/MultiPolicyConfig' '401': description: Unauthorized. '403': @@ -6495,10 +5808,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /policies/methodologies/categories: get: operationId: PolicyApi_getPolicyCategoriesAsync @@ -6520,7 +5830,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 /policies/methodologies/search: post: operationId: PolicyApi_getPoliciesByCategory @@ -6539,7 +5849,7 @@ paths: value: categoryIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' text: abc responses: '200': @@ -6547,38 +5857,36 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' + type: object '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 + tags: *ref_7 /schema/{schemaId}: get: - operationId: SingleSchemaApi_getSchema + tags: + - schema + description: Returns schema by schema ID. + security: + - bearerAuth: [] summary: Returns schema by schema ID. - description: >- - Returns schema by schema ID. Only users with the Standard Registry role - are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -6588,11 +5896,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_12 - - schema - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schema/{schemaId}/parents: get: operationId: SingleSchemaApi_getSchemaParents @@ -6624,9 +5928,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: &ref_8 + - schema security: - - bearer: [] + - bearerAuth: [] /schema/{schemaId}/tree: get: operationId: SingleSchemaApi_getSchemaTree @@ -6665,71 +5970,43 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 + tags: *ref_8 security: - - bearer: [] + - bearerAuth: [] /schemas: get: - operationId: SchemaApi_getSchemasPage - summary: Return a list of all schemas. + tags: + - schemas description: Returns all schemas. + security: + - bearerAuth: [] + summary: Returns all schemas. parameters: - - name: pageIndex - required: false - in: query + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number - - name: category - required: false - in: query - description: Schema category - example: POLICY - schema: - type: string - - name: policyId - required: false - in: query - description: Policy id - example: '000000000000000000000001' - schema: - type: string - - name: moduleId - required: false - in: query - description: Module id - example: '000000000000000000000001' - schema: - type: string - - name: toolId - required: false - in: query - description: Tool id - example: '000000000000000000000001' - schema: - type: string - - name: topicId - required: false - in: query - description: Topic id - example: 0.0.1 - schema: - type: string + examples: + pageSize: + summary: Example of a pageSize + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -6738,7 +6015,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -6748,34 +6025,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_13 + $ref: '#/components/schemas/Error' + /schemas/{topicId}: + post: + tags: - schemas - security: - - bearer: [] - put: - operationId: SchemaApi_setSchema - summary: Updates the schema. description: >- - Updates the schema. Only users with the Standard Registry role are + Creates new schema. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Create new schema. requestBody: - required: true description: Object that contains a valid schema. + required: true content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' + '201': + description: Created. '401': description: Unauthorized. '403': @@ -6785,51 +6066,50 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{topicId}: + $ref: '#/components/schemas/Error' get: - operationId: SchemaApi_getSchemasPageByTopicId - summary: Return a list of all schemas. - description: Returns all schemas. + tags: + - schemas + description: Returns all schemas by topicId. + security: + - bearerAuth: [] + summary: Returns all schemas by topicId. parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 + - in: path + name: topicId schema: type: string - - name: pageIndex - required: false - in: query + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number - - name: category - required: false - in: query - description: Schema category - example: POLICY - schema: - type: string + examples: + pageSize: + summary: Example of a pageSize + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -6838,50 +6118,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - post: - operationId: SchemaApi_createNewSchema - summary: Creates a new schema. - description: >- - Creates a new schema. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -6891,10 +6128,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/type/{schemaType}: get: operationId: SchemaApi_getSchemaByType @@ -6924,9 +6158,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: &ref_9 + - schemas security: - - bearer: [] + - bearerAuth: [] /schemas/list/all: get: operationId: SchemaApi_getAll @@ -6954,9 +6189,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] /schemas/list/sub: get: operationId: SchemaApi_getSub @@ -6966,17 +6201,15 @@ paths: are allowed to make the request. parameters: - name: category - required: false + required: true in: query description: Schema category - example: POLICY schema: type: string - name: topicId - required: false + required: true in: query description: Topic Id - example: 0.0.1 schema: type: string responses: @@ -6998,9 +6231,9 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] /schemas/push/copy: post: operationId: SchemaApi_copySchemaAsync @@ -7033,38 +6266,45 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /schemas/push/{topicId}: post: - operationId: SchemaApi_createNewSchemaAsync - summary: Creates a new schema. + tags: + - schemas description: >- - Creates a new schema. Only users with the Standard Registry role are + Creates new schema. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Create new schema. parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 + - in: path + name: topicId schema: type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 requestBody: - required: true description: Object that contains a valid schema. + required: true content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -7074,25 +6314,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/{schemaId}: - delete: - operationId: SchemaApi_deleteSchema - summary: Deletes the schema with the provided schema ID. + put: + tags: + - schemas description: >- - Deletes the schema with the provided schema ID. Only users with the + Updates the schema with the provided schema ID. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Updates the schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' responses: '200': description: Successful operation. @@ -7101,7 +6347,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7111,52 +6357,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/{schemaId}/publish: - put: - operationId: SchemaApi_publishSchema - summary: Publishes the schema with the provided schema ID. + $ref: '#/components/schemas/Error' + delete: + tags: + - schemas description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string - requestBody: - required: true - description: Object that contains version. - content: - application/json: - schema: - $ref: '#/components/schemas/VersionSchemaDTO' - examples: - Version: - value: - version: 1.0.0 + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Deletes the schema. responses: '200': description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7166,45 +6392,45 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - /schemas/push/{schemaId}/publish: + $ref: '#/components/schemas/Error' + /schemas/{schemaId}/publish: put: - operationId: SchemaApi_publishSchemaAsync - summary: Publishes the schema with the provided schema ID. + tags: + - schemas description: >- Publishes the schema with the provided (internal) schema ID onto IPFS, sends a message featuring IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Publishes the schema. requestBody: + description: Object that contains policy version. required: true - description: Object that contains version. content: application/json: schema: - $ref: '#/components/schemas/VersionSchemaDTO' - examples: - Version: - value: - version: 1.0.0 + type: object + properties: + version: + type: string responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + type: array + items: + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7214,29 +6440,77 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + $ref: '#/components/schemas/Error' + /schemas/push/{schemaId}/publish: + put: + tags: + - schemas + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. security: - - bearer: [] + - bearerAuth: [] + summary: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + parameters: + - in: path + name: schemaId + schema: + type: string + required: true + description: Schema ID. + requestBody: + description: Object that contains policy version. + required: true + content: + application/json: + schema: + type: object + properties: + version: + type: string + responses: + '202': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /schemas/import/message/preview: post: - operationId: SchemaApi_importFromMessagePreview - summary: Previews the schema from IPFS without loading it into the local DB. + tags: + - schemas description: >- Previews the schema from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Schema preview from IPFS. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. required: true - description: Object that contains version. content: application/json: schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' + type: object + properties: + messageId: + type: string responses: '200': description: Successful operation. @@ -7245,7 +6519,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7255,36 +6529,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/push/import/message/preview: post: - operationId: SchemaApi_importFromMessagePreviewAsync - summary: Previews the schema from IPFS without loading it into the local DB. + tags: + - schemas description: >- Previews the schema from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Schema preview from IPFS. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. required: true - description: Object that contains version. content: application/json: schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' + type: object + properties: + messageId: + type: string responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -7294,25 +6568,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/import/file/preview: post: - operationId: SchemaApi_importFromFilePreview - summary: Previews the schema from a zip file. + tags: + - schemas description: >- Previews the schema from a zip file. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Schema preview from a zip file. requestBody: + description: A zip file containing the schema to be viewed. required: true - description: A zip file containing schema to be imported. content: - application/json: + binary/octet-stream: schema: type: string + format: binary responses: '200': description: Successful operation. @@ -7321,7 +6595,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7331,50 +6605,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/{topicId}/import/message: post: - operationId: SchemaApi_importFromMessage - summary: Imports new schema from IPFS into the local DB. + tags: + - schemas description: >- Imports new schema from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 + - in: path + name: topicId schema: type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new schema from IPFS. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. required: true - description: Object that contains version. content: application/json: schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' + type: object + properties: + messageId: + type: string responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. + '201': + description: Created. content: application/json: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7384,43 +6657,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/push/{topicId}/import/message: post: - operationId: SchemaApi_importFromMessageAsync - summary: Imports new schema from IPFS into the local DB. + tags: + - schemas description: >- Imports new schema from IPFS into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string + security: + - bearerAuth: [] + summary: Imports new schema from IPFS. requestBody: + description: >- + Object that contains the identifier of the Hedera message which + contains the IPFS CID of the schema. required: true - description: Object that contains version. content: application/json: schema: - $ref: '#/components/schemas/MessageSchemaDTO' - examples: - Message: - value: - messageId: '0000000000.000000001' + type: object + properties: + messageId: + type: string + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -7430,46 +6707,45 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/{topicId}/import/file: post: - operationId: SchemaApi_importToTopicFromFile - summary: Imports new schema from a zip file into the local DB. + tags: + - schemas description: >- Imports new schema from a zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 + - in: path + name: topicId schema: type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 + security: + - bearerAuth: [] + summary: Imports new schema from a zip file. requestBody: - required: true description: A zip file containing schema to be imported. content: - application/json: + binary/octet-stream: schema: type: string + format: binary + required: true responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. + '201': + description: Created. content: application/json: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7479,39 +6755,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/push/{topicId}/import/file: post: - operationId: SchemaApi_importToTopicFromFileAsync - summary: Imports new schema from a zip file into the local DB. + tags: + - schemas description: >- Imports new schema from a zip file into the local DB. Only users with the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - example: 0.0.1 - schema: - type: string + security: + - bearerAuth: [] + summary: Imports new schema from a zip file. requestBody: - required: true description: A zip file containing schema to be imported. content: - application/json: + binary/octet-stream: schema: type: string + format: binary + required: true + parameters: + - in: path + name: topicId + schema: + type: string + required: true + description: Topic ID. + examples: + topicId: + summary: Example of a Topic ID + value: 0.0.00000001 responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -7521,33 +6801,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/{schemaId}/export/message: - get: - operationId: SchemaApi_exportMessage - summary: Returns Hedera message IDs of the published schemas. + post: + tags: + - schemas description: >- Returns Hedera message IDs of the published schemas, these messages contain IPFS CIDs of these schema files. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: List Hedera message IDs of published schemas. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Selected schema ID. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ExportSchemaDTO' + $ref: '#/components/schemas/ExportSchema' '401': description: Unauthorized. '403': @@ -7557,28 +6836,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/{schemaId}/export/file: - get: - operationId: SchemaApi_exportToFile - summary: Returns schema files for the schema. + post: + tags: + - schemas description: >- - Returns schema files for the schema. Only users with the Standard + Returns schema files for the schemas. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Return zip file with schemas. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Selected schema ID. responses: '200': - description: Successful operation. Response zip file. + description: Successful operation. Response zip file '401': description: Unauthorized. '403': @@ -7588,38 +6866,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/system/{username}: post: - operationId: SchemaApi_postSystemSchema - summary: Creates a new system schema. + tags: + - schemas description: >- - Creates a new system schema. Only users with the Standard Registry role + Creates new system schema. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: username - required: true - in: path - description: username - example: username + - in: path + name: username schema: type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Creates new system schema. requestBody: + description: Object that contains a valid schema. required: true content: application/json: schema: - $ref: '#/components/schemas/SystemSchemaDTO' + $ref: '#/components/schemas/Schema' responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' + '201': + description: Created. '401': description: Unauthorized. '403': @@ -7629,54 +6903,57 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' get: - operationId: SchemaApi_getSystemSchema - summary: Return a list of all system schemas. + tags: + - schemas description: >- - Returns all system schemas. Only users with the Standard Registry role - are allowed to make the request. + Returns all system schemas by username. Only users with the Standard + Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Returns all system schemas by username. parameters: - - name: username - required: true - in: path - description: username - example: username + - in: path + name: username schema: type: string - - name: pageIndex - required: false - in: query + required: true + description: Username. + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result - set - example: 0 + set. + examples: + pageIndex: + summary: Example of a pageIndex. + value: 0 + - in: query + name: pageSize schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number + type: integer + description: The number of items to return. + examples: + pageSize: + summary: Example of a pageSize. + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer - description: Total items in the collection. + description: Total number of items in the collection. content: application/json: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7686,28 +6963,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/system/{schemaId}: - delete: - operationId: SchemaApi_deleteSystemSchema - summary: Deletes the system schema with the provided schema ID. + put: + tags: + - schemas description: >- - Deletes the system schema with the provided schema ID. Only users with + Updates the system schema with the provided schema ID. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Updates the schema. + requestBody: + description: Object that contains a valid schema. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Schema' responses: '200': description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7717,31 +7006,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] - put: - operationId: SchemaApi_setSystemSchema - summary: Updates the system schema. + $ref: '#/components/schemas/Error' + delete: + tags: + - schemas description: >- - Updates the system schema. Only users with the Standard Registry role - are allowed to make the request. + Deletes the system schema with the provided schema ID. Only users with + the Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: 0.0.1 + - in: path + name: schemaId schema: type: string - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Deletes the schema. responses: '200': description: Successful operation. @@ -7750,7 +7031,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7760,31 +7041,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/system/{schemaId}/active: put: - operationId: SchemaApi_activeSystemSchema - summary: >- - Makes the selected scheme active. Other schemes of the same type become - inactive + tags: + - schemas description: >- Makes the selected scheme active. Other schemes of the same type become - inactive Only users with the Standard Registry role are allowed to make + inactive. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema ID - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Publishes the schema. + requestBody: + description: Object that contains policy version. + required: true + content: + application/json: + schema: + type: object + properties: + version: + type: string responses: '200': description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7794,21 +7088,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/system/entity/{schemaEntity}: get: - operationId: SchemaApi_getSchemaEntity - summary: Finds the schema using the schema type. + tags: + - schemas description: Finds the schema using the schema type. parameters: - - name: schemaEntity - required: true - in: path - description: Entity name - example: STANDARD_REGISTRY + - in: path + name: schemaEntity schema: type: string enum: @@ -7818,13 +7106,18 @@ paths: - MINT_TOKEN - WIPE_TOKEN - MINT_NFTOKEN + required: true + description: schema type. + security: + - bearerAuth: [] + summary: Returns schema by schema type. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -7834,10 +7127,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /schemas/{schemaId}/export/xlsx: get: operationId: SchemaApi_getPolicyExportXlsx @@ -7850,7 +7140,6 @@ paths: required: true in: path description: Schema ID - example: '000000000000000000000001' schema: type: string responses: @@ -7862,7 +7151,7 @@ paths: type: string format: binary '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -7871,9 +7160,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] + /schemas/{topicId}/import/xlsx: post: operationId: SchemaApi_importPolicyFromXlsx @@ -7886,7 +7176,6 @@ paths: required: true in: path description: Topic Id - example: 0.0.1 schema: type: string requestBody: @@ -7904,7 +7193,7 @@ paths: schema: type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -7913,9 +7202,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] + /schemas/push/{topicId}/import/xlsx: post: operationId: SchemaApi_importPolicyFromXlsxAsync @@ -7928,7 +7218,6 @@ paths: required: true in: path description: Topic Id - example: 0.0.1 schema: type: string requestBody: @@ -7946,7 +7235,7 @@ paths: schema: type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -7955,9 +7244,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] + /schemas/import/xlsx/preview: post: operationId: SchemaApi_importPolicyFromXlsxPreview @@ -7981,7 +7271,7 @@ paths: schema: type: object '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -7990,9 +7280,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] + /schemas/export/template: get: operationId: SchemaApi_exportTemplate @@ -8010,7 +7301,7 @@ paths: type: string format: binary '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -8019,25 +7310,27 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 + tags: *ref_9 security: - - bearer: [] + - bearerAuth: [] + /settings: - post: - operationId: SettingsApi_updateSettings - summary: Set settings. - description: Set settings. For users with the Standard Registry role only. - parameters: [] - requestBody: - required: true - description: Settings. - content: - application/json: - schema: - $ref: '#/components/schemas/SettingsDTO' + get: + tags: + - settings + description: >- + Returns current settings. For users with the Standard Registry role + only. + security: + - bearerAuth: [] + summary: Returns current settings. responses: '200': description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CommonSettings' '401': description: Unauthorized. '403': @@ -8047,25 +7340,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_14 + $ref: '#/components/schemas/Error' + post: + tags: - settings + description: Set settings. For users with the Standard Registry role only. security: - - bearer: [] - get: - operationId: SettingsApi_getSettings - summary: Returns current settings. - description: >- - Returns current settings. For users with the Standard Registry role - only. - parameters: [] + - bearerAuth: [] + summary: Set settings. responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SettingsDTO' + '201': + description: Created. '401': description: Unauthorized. '403': @@ -8075,123 +7360,119 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - security: - - bearer: [] + $ref: '#/components/schemas/CommonSettings' /settings/environment: get: - operationId: SettingsApi_getEnvironment - summary: Returns current environment name. + tags: + - settings description: Returns current environment name. - parameters: [] + security: + - bearerAuth: [] + summary: Returns current environment name. responses: '200': description: Successful operation. content: - application/json: + text/plain: schema: type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. + example: testnet '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /settings/about: get: operationId: SettingsApi_getAbout - summary: Returns package version. - description: Returns package version. For users with the Standard Registry role only. parameters: [] responses: '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - security: - - bearer: [] + description: '' + tags: + - settings /tags: post: operationId: TagsApi_setTags - summary: Creates new tag. - description: Creates new tag. parameters: [] - requestBody: - required: true - description: Object that contains tag information. - content: - application/json: - schema: - $ref: '#/components/schemas/TagDTO' responses: - '200': - description: Created tag. - content: - application/json: - schema: - $ref: '#/components/schemas/TagDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_15 + '201': + description: '' + tags: - tags - security: - - bearer: [] /tags/search: post: - operationId: TagsApi_searchTags - summary: Search tags. + tags: + - tags description: Search tags. - parameters: [] + security: + - bearerAuth: [] requestBody: + description: Object that contains filters. required: true - description: Object that contains filters content: application/json: schema: - $ref: '#/components/schemas/TagFilterDTO' + oneOf: + - type: object + required: + - entity + - target + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + target: + type: string + - type: object + required: + - entity + - targets + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + targets: + type: array + items: + type: string examples: Single: value: entity: PolicyDocument - target: '0000000000.000000001' + target: targetId1 Multiple: value: entity: PolicyDocument targets: - - '0000000000.000000001' - - '0000000000.000000001' + - targetId1 + - targetId2 + summary: Search tags. responses: '200': - description: Created tag. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TagMapDTO' + description: a (targetId, Tags) map. `targetId1` is an example key + properties: + targetId1: + $ref: '#/components/schemas/TagMap' + additionalProperties: + $ref: '#/components/schemas/TagMap' '401': description: Unauthorized. '403': @@ -8201,23 +7482,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tags/{uuid}: delete: - operationId: TagsApi_deleteTag - summary: Delete tag. + tags: + - tags description: Delete tag. + security: + - bearerAuth: [] + summary: Delete tag. parameters: - - name: uuid - required: true - in: path - description: Tag identifier - example: 00000000-0000-0000-0000-000000000000 + - in: path + name: uuid schema: type: string + example: 00000000-0000-0000-0000-000000000000 + required: true + description: Tag identifier responses: '200': description: Successful operation. @@ -8234,35 +7515,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tags/synchronization: post: - operationId: TagsApi_synchronizationTags - summary: Synchronization of tags with an external network. - description: Synchronization of tags with an external network. - parameters: [] + tags: + - tags + description: synchronization. + security: + - bearerAuth: [] requestBody: + description: Object that contains filters. required: true - description: Object that contains filters content: application/json: schema: - $ref: '#/components/schemas/TagFilterDTO' - examples: - Single: - value: - entity: PolicyDocument - target: '0000000000.000000001' + type: object + required: + - entity + - target + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: targetId + summary: synchronization. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TagMapDTO' + $ref: '#/components/schemas/TagMap' '401': description: Unauthorized. '403': @@ -8272,39 +7564,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tags/schemas: get: - operationId: TagsApi_getSchemas - summary: Return a list of all tag schemas. - description: >- - Returns all tag schemas. Only users with the Standard Registry role are - allowed to make the request. + tags: + - tags + description: Returns all schema. + security: + - bearerAuth: [] + summary: Returns all schemas. parameters: - - name: pageIndex - required: false - in: query + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number + examples: + pageSize: + summary: Example of a pageSize + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -8313,7 +7607,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -8323,31 +7617,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' post: - operationId: TagsApi_postSchemas - summary: Creates a new tag schema. + tags: + - tags description: >- - Creates a new tag schema. Only users with the Standard Registry role are + Creates new schema. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Creates new schema. requestBody: + description: Object that contains a valid schema. required: true - description: Schema config. content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' responses: '201': - description: Created schema. + description: Created. content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -8357,25 +7650,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tags/schemas/{schemaId}: delete: - operationId: TagsApi_deleteSchema - summary: Deletes the schema. + tags: + - tags description: >- Deletes the schema with the provided schema ID. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Delete the schema. parameters: - - name: schemaId - required: true - in: path - description: Schema Identifier - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. responses: '200': description: Successful operation. @@ -8392,31 +7684,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' put: - operationId: TagsApi_updateSchema - summary: Updates schema configuration. + tags: + - tags description: >- - Updates schema configuration for the specified schema ID. Only users - with the Standard Registry role are allowed to make the request. + Updates the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema Identifier - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Updates the schema. requestBody: + description: Object that contains a valid schema. required: true - description: Schema config. content: application/json: schema: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' responses: '200': description: Successful operation. @@ -8425,7 +7716,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -8435,27 +7726,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tags/schemas/{schemaId}/publish: put: - operationId: TagsApi_publishTag - summary: Publishes the schema. + tags: + - tags description: >- Publishes the schema with the provided (internal) schema ID onto IPFS, sends a message featuring IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: schemaId - required: true - in: path - description: Schema Identifier - example: '000000000000000000000001' + - in: path + name: schemaId schema: type: string + required: true + description: Schema ID. + security: + - bearerAuth: [] + summary: Publishes the schema. responses: '200': description: Successful operation. @@ -8464,7 +7754,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -8474,18 +7764,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tags/schemas/published: get: - operationId: TagsApi_getPublished + tags: + - tags + description: Return a list of all published schemas. + security: + - bearerAuth: [] summary: Return a list of all published schemas. - description: >- - Return a list of all published schemas. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] responses: '200': description: Successful operation. @@ -8494,7 +7781,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/SchemaDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -8504,30 +7791,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tasks/{taskId}: get: - operationId: TaskApi_getTask - summary: Returns task statuses by Id. + tags: + - tasks description: Returns task statuses by Id. + security: + - bearerAuth: [] + summary: Returns task statuses. parameters: - - name: taskId - required: true - in: path - description: Task Id - example: 00000000-0000-0000-0000-000000000000 + - in: path + name: taskId schema: type: string + required: true + description: Task ID. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskStatusDTO' + $ref: '#/components/schemas/TaskStatus' '401': description: Unauthorized. '403': @@ -8537,68 +7823,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - tasks - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens: get: - operationId: TokensApi_getTokens - summary: Return a list of tokens. + tags: + - tokens description: >- Returns all tokens. For the Standard Registry role it returns only the list of tokens, for other users it also returns token balances as well as the KYC, Freeze, and Association statuses. Not allowed for the Auditor role. - parameters: - - name: policyId - required: false - in: query - description: Policy Id - example: '000000000000000000000001' - schema: - type: string - - name: status - required: false - in: query - description: Token status - example: All - schema: - enum: - - Associated - - All - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number + security: + - bearerAuth: [] + summary: Return a list of tokens. responses: '200': description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: type: array items: - $ref: '#/components/schemas/TokenDTO' + allOf: + - $ref: '#/components/schemas/TokenInfo' + - type: object + properties: + policies: + type: array + items: + type: string '401': description: Unauthorized. '403': @@ -8608,68 +7861,45 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_16 - - tokens - security: - - bearer: [] + $ref: '#/components/schemas/Error' post: - operationId: TokensApi_newToken - summary: Creates a new token. + tags: + - tokens description: >- Creates a new token. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Creates a new token. requestBody: - required: true description: Object that contains token information. + required: true content: application/json: schema: - $ref: '#/components/schemas/TokenDTO' + $ref: '#/components/schemas/Token' responses: - '200': - description: Successful operation. + '201': + description: Created. content: application/json: schema: type: array items: - $ref: '#/components/schemas/TokenDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - put: - operationId: TokensApi_updateToken - summary: Update token. - description: >- - Update token. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Object that contains token information. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - responses: - '200': - description: Updated token. + allOf: + - $ref: '#/components/schemas/TokenInfo' + - type: object + properties: + policies: + type: array + items: + type: string + '400': + description: Bad Request. content: application/json: schema: - $ref: '#/components/schemas/TokenDTO' + $ref: '#/components/schemas/Error' '401': description: Unauthorized. '403': @@ -8679,32 +7909,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/push: post: - operationId: TokensApi_pushTokenAsync - summary: Creates a new token. + tags: + - tokens description: >- Creates a new token. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Creates a new token. requestBody: - required: true description: Object that contains token information. + required: true content: application/json: schema: - $ref: '#/components/schemas/TokenDTO' + $ref: '#/components/schemas/Token' responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -8714,31 +7943,42 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}: + delete: + operationId: TokensApi_deleteTokenAsync + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + responses: + '202': + description: '' + tags: &ref_10 + - tokens + /tokens/{tokenId}/associate: put: - operationId: TokensApi_updateTokenAsync - summary: Update token. + tags: + - tokens description: >- - Update token. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Object that contains token information. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - in: path + name: tokenId + schema: + type: string + required: true + description: Token ID. + security: + - bearerAuth: [] + summary: Associates the user with the provided Hedera token. responses: '200': description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' '401': description: Unauthorized. '403': @@ -8748,32 +7988,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}: - delete: - operationId: TokensApi_deleteTokenAsync - summary: Deletes the token with the provided schema ID. + $ref: '#/components/schemas/Error' + /tokens/push/{tokenId}/associate: + put: + tags: + - tokens description: >- - Deletes the token with the provided schema ID. Only users with the + Associates the user with the provided Hedera token. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Associates the user with the provided Hedera token. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string + required: true + description: Token ID. responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -8783,102 +8022,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/{tokenId}/associate: + $ref: '#/components/schemas/Error' + /tokens/{tokenId}/dissociate: put: - operationId: TokensApi_associateToken - summary: Associates the user with the provided Hedera token. + tags: + - tokens description: >- - Associates the user with the provided Hedera token. Only users with the - Installer role are allowed to make the request. + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /tokens/push/{tokenId}/associate: - put: - operationId: TokensApi_associateTokenAsync - summary: Associates the user with the provided Hedera token. - description: >- - Associates the user with the provided Hedera token. Only users with the - Installer role are allowed to make the request. - parameters: - - name: tokenId required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 + description: Token ID. security: - - bearer: [] - /tokens/{tokenId}/dissociate: - put: - operationId: TokensApi_dissociateToken + - bearerAuth: [] summary: Associate the user with the provided Hedera token. - description: >- - Disassociates the user with the provided Hedera token. Only users with - the Installer role are allowed to make the request. - parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' - schema: - type: string responses: - '200': + '202': description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfoDTO' '401': description: Unauthorized. '403': @@ -8888,32 +8052,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/push/{tokenId}/dissociate: put: - operationId: TokensApi_dissociateTokenAsync - summary: Associate the user with the provided Hedera token. + tags: + - tokens description: >- Disassociates the user with the provided Hedera token. Only users with - the Installer role are allowed to make the request. + the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Disassociates the user with the provided Hedera token. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string + required: true + description: Token ID. responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -8923,39 +8086,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/{tokenId}/{username}/grant-kyc: put: - operationId: TokensApi_grantKyc - summary: Sets the KYC flag for the user. + tags: + - tokens description: >- Sets the KYC flag for the user. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Sets the KYC flag for the user. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfoDTO' + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': description: Unauthorized. '403': @@ -8965,39 +8132,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/push/{tokenId}/{username}/grant-kyc: put: - operationId: TokensApi_grantKycAsync - summary: Sets the KYC flag for the user. + tags: + - tokens description: >- Sets the KYC flag for the user. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Sets the KYC flag for the user. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -9007,39 +8172,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/{tokenId}/{username}/revoke-kyc: put: - operationId: TokensApi_revokeKyc - summary: Unsets the KYC flag for the user. + tags: + - tokens description: >- Unsets the KYC flag for the user. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Unsets the KYC flag for the user. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfoDTO' + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': description: Unauthorized. '403': @@ -9049,39 +8218,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/push/{tokenId}/{username}/revoke-kyc: put: - operationId: TokensApi_revokeKycAsync - summary: Unsets the KYC flag for the user. + tags: + - tokens description: >- Unsets the KYC flag for the user. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Unsets the KYC flag for the user. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -9091,39 +8258,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/{tokenId}/{username}/freeze: put: - operationId: TokensApi_freezeToken - summary: Freeze transfers of the specified token for the user. + tags: + - tokens description: >- Freezes transfers of the specified token for the user. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Freeze transfers of the specified token for the user. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfoDTO' + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': description: Unauthorized. '403': @@ -9133,39 +8304,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/{tokenId}/{username}/unfreeze: put: - operationId: TokensApi_unfreezeToken - summary: Unfreezes transfers of the specified token for the user. + tags: + - tokens description: >- Unfreezes transfers of the specified token for the user. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. + security: + - bearerAuth: [] + summary: Unfreezes transfers of the specified token for the user. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfoDTO' + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': description: Unauthorized. '403': @@ -9175,39 +8350,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/push/{tokenId}/{username}/freeze: put: - operationId: TokensApi_freezeTokenAsync - summary: Freeze transfers of the specified token for the user. + tags: + - tokens description: >- Freezes transfers of the specified token for the user. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Freeze transfers of the specified token for the user. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -9217,39 +8390,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/push/{tokenId}/{username}/unfreeze: put: - operationId: TokensApi_unfreezeTokenAsync - summary: Unfreezes transfers of the specified token for the user. + tags: + - tokens description: >- Unfreezes transfers of the specified token for the user. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] + summary: Unfreezes transfers of the specified token for the user. parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. responses: - '200': + '202': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' + $ref: '#/components/schemas/Task' '401': description: Unauthorized. '403': @@ -9259,39 +8430,42 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/{tokenId}/{username}/info: get: - operationId: TokensApi_getTokenInfo - summary: Returns user information for the selected token. + tags: + - tokens description: >- Returns user information for the selected token. Only users with the Standard Registry role are allowed to make the request. + security: + - bearerAuth: [] parameters: - - name: tokenId - required: true - in: path - description: Token ID - example: '000000000000000000000001' + - in: path + name: tokenId schema: type: string - - name: username required: true - in: path - description: Username - example: username + description: Token ID. + - in: path + name: username schema: type: string + required: true + description: Username. responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TokenInfoDTO' + $ref: '#/components/schemas/TokenInfo' + '400': + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' '401': description: Unauthorized. '403': @@ -9301,10 +8475,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /tokens/{tokenId}/serials: get: operationId: TokensApi_getTokenSerials @@ -9314,8 +8485,8 @@ paths: - name: tokenId required: true in: path - description: Token ID - example: '000000000000000000000001' + description: Token identifier + example: 0.0.1 schema: type: string responses: @@ -9337,26 +8508,26 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 + tags: *ref_10 security: - - bearer: [] - /tokens/menu/all: + - bearerAuth: [] + /themes: get: - operationId: TokensApi_getMenu - summary: Return a list of tokens. - description: >- - Returns tokens menu. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] + tags: + - themes + description: Returns all themes. + security: + - bearerAuth: [] + summary: Return a list of all themes. responses: '200': - description: Modules. + description: Successful operation. content: application/json: schema: type: array items: - $ref: '#/components/schemas/TokenDTO' + $ref: '#/components/schemas/Theme' '401': description: Unauthorized. '403': @@ -9366,62 +8537,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_16 - security: - - bearer: [] - /themes: + $ref: '#/components/schemas/Error' post: - operationId: ThemesApi_setThemes + tags: + - themes + description: Creates a new theme. + security: + - bearerAuth: [] summary: Creates a new theme. - description: >- - Creates a new theme. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] requestBody: + description: Object that contains theme configuration. required: true - description: Object that contains a theme. content: application/json: schema: - $ref: '#/components/schemas/ThemeDTO' + $ref: '#/components/schemas/Theme' responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ThemeDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_17 - - themes - security: - - bearer: [] - get: - operationId: ThemesApi_getThemes - summary: Returns a list of all themes. - description: >- - Returns a list of all themes. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ThemeDTO' + '201': + description: Created. '401': description: Unauthorized. '403': @@ -9431,39 +8564,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /themes/{themeId}: put: - operationId: ThemesApi_updateTheme + tags: + - themes + description: Updates theme configuration for the specified theme ID. summary: Updates theme configuration. - description: >- - Updates theme configuration for the specified theme ID. Only users with - the Standard Registry role are allowed to make the request. parameters: - - name: themeId + - in: path + name: themeId + description: Selected theme ID. required: true - in: path - description: Theme Identifier - example: '000000000000000000000001' schema: type: string requestBody: + description: Object that contains theme configuration. required: true - description: Object that contains a theme. content: application/json: schema: - $ref: '#/components/schemas/ThemeDTO' + $ref: '#/components/schemas/Theme' + security: + - bearerAuth: [] responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/ThemeDTO' + $ref: '#/components/schemas/Theme' '401': description: Unauthorized. '403': @@ -9473,24 +8603,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] + $ref: '#/components/schemas/Error' delete: - operationId: ThemesApi_deleteTheme - summary: Deletes the theme. - description: >- - Deletes the theme with the provided theme ID. Only users with the - Standard Registry role are allowed to make the request. + tags: + - themes + description: Deletes the theme with the provided theme ID. parameters: - - name: themeId - required: true - in: path - description: Theme Identifier - example: '000000000000000000000001' + - in: path + name: themeId schema: type: string + required: true + description: Theme ID. + security: + - bearerAuth: [] + summary: Deletes the theme. responses: '200': description: Successful operation. @@ -9507,32 +8634,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /themes/import/file: post: - operationId: ThemesApi_importTheme + tags: + - themes + description: Imports new theme from the provided zip file into the local DB. + security: + - bearerAuth: [] summary: Imports new theme from a zip file. - description: >- - Imports new theme from the provided zip file into the local DB. Only - users with the Standard Registry role are allowed to make the request. - parameters: [] requestBody: + description: A zip file that contains the theme to be imported. required: true - description: A zip file containing theme to be imported. content: - application/json: + binary/octet-stream: schema: type: string + format: binary responses: - '200': - description: Successful operation. + '201': + description: Created. content: application/json: schema: - $ref: '#/components/schemas/ThemeDTO' + $ref: '#/components/schemas/Theme' '401': description: Unauthorized. '403': @@ -9542,28 +8667,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /themes/{themeId}/export/file: get: - operationId: ThemesApi_exportTheme - summary: Returns a zip file containing the theme. - description: >- - Returns a zip file containing the theme. Only users with the Standard - Registry role are allowed to make the request. + tags: + - themes + description: Returns a zip file containing the theme. parameters: - - name: themeId - required: true - in: path - description: Theme Identifier - example: '000000000000000000000001' + - in: path + name: themeId schema: type: string + required: true + description: Selected theme ID. + security: + - bearerAuth: [] + summary: Returns a zip file containing the theme. responses: '200': - description: Successful operation. Response zip file. + description: Successful operation. Response zip file '401': description: Unauthorized. '403': @@ -9573,54 +8695,53 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_17 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /trust-chains: get: - operationId: TrustChainsApi_getTrustChains - summary: Returns a list of all VP documents. + tags: + - trustchains description: >- - Returns a list of all VP documents. Only users with the Standard - Registry role are allowed to make the request. + Requests all VP documents. Only users with the Auditor role are allowed + to make the request. + security: + - bearerAuth: [] + summary: Returns a list of all VP documents. parameters: - - name: pageIndex - required: false - in: query + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number - - name: policyId - required: false - in: query - description: Policy Id - example: '000000000000000000000001' + examples: + pageSize: + summary: Example of a pageSize + value: 100 + - in: query + name: policyId schema: type: string - - name: policyOwner - required: false - in: query - description: Policy Owner - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + description: Selected policy ID. + - in: query + name: policyOwner schema: type: string + description: Selected Standard Registry (DID). responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -9629,7 +8750,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/VpDocumentDTO' + $ref: '#/components/schemas/VerifiablePresentation' '401': description: Unauthorized. '403': @@ -9639,77 +8760,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_18 - - trust-chains - security: - - bearer: [] + $ref: '#/components/schemas/Error' /trust-chains/{hash}: get: - operationId: TrustChainsApi_getTrustChainByHash - summary: Builds and returns a trustchain, from the VP to the root VC document. + tags: + - trustchains description: >- Builds and returns a trustchain, from the VP to the root VC document. - Only users with the Standard Registry role are allowed to make the - request. + Only users with the Auditor role are allowed to make the request. parameters: - - name: hash - required: true - in: path - description: Hash - example: hash + - in: path + name: hash schema: type: string + required: true + description: Hash or ID of a VP document. + security: + - bearerAuth: [] + summary: Returns a trustchain for a VP document. responses: '200': description: Successful operation. content: application/json: schema: - type: object - properties: - chain: - type: array - items: - type: object - properties: - id: - type: string - type: - type: string - tag: - type: string - label: - type: string - schema: - type: string - owner: - type: string - document: - type: object - required: - - id - - type - - tag - - label - - schema - - owner - - document - userMap: - type: array - items: - type: object - properties: - did: - type: string - username: - type: string - required: - - did - - username - required: - - chain - - userMap + $ref: '#/components/schemas/TrustChains' '401': description: Unauthorized. '403': @@ -9719,32 +8794,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_18 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /wizard/policy: post: - operationId: WizardApi_setPolicy - summary: Creates a new policy. + tags: + - wizard description: >- Creates a new policy by wizard. Only users with the Standard Registry role are allowed to make the request. - parameters: [] + security: + - bearerAuth: [] + summary: Creates a new policy. requestBody: - required: true description: Object that contains wizard configuration. + required: true content: application/json: schema: - $ref: '#/components/schemas/WizardConfigDTO' + $ref: '#/components/schemas/WizardConfig' responses: - '200': + '201': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/WizardResultDTO' + type: object + properties: + policyId: + type: string + wizardConfig: + $ref: '#/components/schemas/WizardConfig' '401': description: Unauthorized. '403': @@ -9754,11 +8833,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_19 - - wizard - security: - - bearer: [] + $ref: '#/components/schemas/Error' /wizard/push/policy: post: operationId: WizardApi_setPolicyAsync @@ -9769,60 +8844,146 @@ paths: parameters: [] requestBody: required: true - description: Object that contains wizard configuration. content: application/json: schema: - $ref: '#/components/schemas/WizardConfigAsyncDTO' + type: object + properties: + saveState: + type: boolean + wizardConfig: + type: object + required: + - policy + - roles + - schemas + - trustChain + properties: + roles: + type: array + items: + type: string + policy: + type: object + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + type: array + items: + type: object + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string + trustChain: + type: array + items: + type: object + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. + type: boolean '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_19 - security: - - bearer: [] + tags: + - wizard /wizard/{policyId}/config: post: - operationId: WizardApi_setPolicyConfig - summary: Get policy config. + tags: + - wizard description: >- Get policy config by wizard. Only users with the Standard Registry role are allowed to make the request. parameters: - - name: policyId - required: true - in: path - description: Policy Id - example: '000000000000000000000001' + - in: path + name: policyId schema: type: string + required: true + description: Policy identifier. + security: + - bearerAuth: [] + summary: Get policy config. requestBody: - required: true description: Object that contains wizard configuration. + required: true content: application/json: schema: - $ref: '#/components/schemas/WizardConfigDTO' + $ref: '#/components/schemas/WizardConfig' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/WizardPreviewDTO' + type: object + properties: + policyConfig: + $ref: '#/components/schemas/PolicyConfig' + wizardConfig: + $ref: '#/components/schemas/WizardConfig' '401': description: Unauthorized. '403': @@ -9832,59 +8993,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_19 - security: - - bearer: [] + $ref: '#/components/schemas/Error' /branding: post: operationId: BrandingApi_setBranding - summary: Update branding. - description: >- - Update branding. Only users with the Standard Registry role are allowed - to make the request. parameters: [] - requestBody: - required: true - description: Object that contains config. - content: - application/json: - schema: - $ref: '#/components/schemas/BrandingDTO' responses: - '200': - description: Successful operation. '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_20 + description: Unauthorized + tags: &ref_11 - branding security: - - bearer: [] + - bearerAuth: [] get: operationId: BrandingApi_getBranding parameters: [] responses: '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BrandingDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_20 + description: '' + tags: *ref_11 /suggestions: post: operationId: SuggestionsApi_policySuggestions @@ -9895,7 +9022,6 @@ paths: parameters: [] requestBody: required: true - description: Data. content: application/json: schema: @@ -9919,10 +9045,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_21 + tags: &ref_12 - suggestions security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /suggestions/config: post: operationId: SuggestionsApi_setPolicySuggestionsConfig @@ -9933,7 +9060,6 @@ paths: parameters: [] requestBody: required: true - description: Suggestions config. content: application/json: schema: @@ -9947,17 +9073,16 @@ paths: $ref: '#/components/schemas/SuggestionsConfigDTO' '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_21 + tags: *ref_12 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] get: operationId: SuggestionsApi_getPolicySuggestionsConfig summary: Get suggestions config @@ -9974,47 +9099,30 @@ paths: $ref: '#/components/schemas/SuggestionsConfigDTO' '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_21 + tags: *ref_12 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /notifications: get: operationId: NotificationsApi_getAllNotifications summary: Get all notifications description: Returns all notifications. - parameters: - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number + parameters: [] responses: '200': description: Successful operation. Returns notifications and count. headers: X-Total-Count: + description: Count of notifications schema: - type: integer - description: Total items in the collection. + type: number content: application/json: schema: @@ -10023,18 +9131,17 @@ paths: $ref: '#/components/schemas/NotificationDTO' '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_22 + tags: &ref_13 - notifications security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /notifications/new: get: operationId: NotificationsApi_getNewNotifications @@ -10052,17 +9159,16 @@ paths: $ref: '#/components/schemas/NotificationDTO' '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 + tags: *ref_13 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /notifications/progresses: get: operationId: NotificationsApi_getProgresses @@ -10080,17 +9186,16 @@ paths: $ref: '#/components/schemas/ProgressDTO' '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 + tags: *ref_13 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /notifications/read/all: post: operationId: NotificationsApi_readAll @@ -10108,17 +9213,16 @@ paths: $ref: '#/components/schemas/NotificationDTO' '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 + tags: *ref_13 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /notifications/delete/{notificationId}: delete: operationId: NotificationsApi_delete @@ -10128,8 +9232,6 @@ paths: - name: notificationId required: true in: path - description: Notification Identifier - example: 00000000-0000-0000-0000-000000000000 schema: type: string responses: @@ -10141,17 +9243,16 @@ paths: type: number '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_22 + tags: *ref_13 security: - - bearer: [] + - bearerAuth: [] + - bearerAuth: [] /projects/search: post: operationId: ProjectsAPI_projectSearch @@ -10185,11 +9286,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_23 + tags: &ref_14 - projects /projects/compare/documents: post: - operationId: ProjectsAPI_compareDocumentsV2 + operationId: ProjectsAPI_compareDocuments summary: Compare documents. description: Compare documents. parameters: [] @@ -10204,26 +9305,26 @@ paths: Filter1: value: documentId1: '000000000000000000000001' - documentId2: '000000000000000000000001' + documentId2: '000000000000000000000002' Filter2: value: documentIds: - '000000000000000000000001' - - '000000000000000000000001' + - '000000000000000000000002' responses: '200': description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/CompareDocumentsV2DTO' + $ref: '#/components/schemas/CompareDocumentsDTO' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_23 + tags: *ref_14 /projects/properties: get: operationId: ProjectsAPI_getPolicyProperties @@ -10245,7 +9346,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_23 + tags: *ref_14 /record/{policyId}/status: get: operationId: RecordApi_getRecordStatus @@ -10258,7 +9359,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string responses: @@ -10269,7 +9369,7 @@ paths: schema: $ref: '#/components/schemas/RecordStatusDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10278,10 +9378,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_24 + tags: &ref_15 - record security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/recording/start: post: operationId: RecordApi_startRecord @@ -10294,7 +9395,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -10312,7 +9412,7 @@ paths: schema: type: boolean '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10321,9 +9421,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/recording/stop: post: operationId: RecordApi_stopRecord @@ -10336,7 +9437,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -10355,7 +9455,7 @@ paths: type: string format: binary '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10364,9 +9464,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/recording/actions: get: operationId: RecordApi_getRecordActions @@ -10379,7 +9480,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string responses: @@ -10392,7 +9492,7 @@ paths: items: $ref: '#/components/schemas/RecordActionDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10401,9 +9501,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/running/start: post: operationId: RecordApi_runRecord @@ -10416,7 +9517,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -10434,7 +9534,7 @@ paths: schema: type: boolean '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10443,9 +9543,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/running/stop: post: operationId: RecordApi_stopRunning @@ -10458,7 +9559,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -10476,7 +9576,7 @@ paths: schema: type: boolean '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10485,9 +9585,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/running/results: get: operationId: RecordApi_getRecordResults @@ -10500,7 +9601,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string responses: @@ -10511,7 +9611,7 @@ paths: schema: $ref: '#/components/schemas/RunningResultDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10520,9 +9620,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/running/details: get: operationId: RecordApi_getRecordDetails @@ -10535,7 +9636,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string responses: @@ -10546,7 +9646,7 @@ paths: schema: $ref: '#/components/schemas/RunningDetailsDTO' '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10555,9 +9655,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/running/fast-forward: post: operationId: RecordApi_fastForward @@ -10570,7 +9671,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -10588,7 +9688,7 @@ paths: schema: type: boolean '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10597,9 +9697,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/running/retry: post: operationId: RecordApi_retryStep @@ -10612,7 +9713,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -10630,7 +9730,7 @@ paths: schema: type: boolean '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10639,9 +9739,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /record/{policyId}/running/skip: post: operationId: RecordApi_skipStep @@ -10654,7 +9755,6 @@ paths: required: true in: path description: Policy Id - example: '000000000000000000000001' schema: type: string requestBody: @@ -10672,7 +9772,7 @@ paths: schema: type: boolean '401': - description: Unauthorized. + description: Unauthorized '403': description: Forbidden. '500': @@ -10681,9 +9781,10 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_24 + tags: *ref_15 security: - - bearer: [] + - bearerAuth: [] + /ai-suggestions/ask: get: operationId: AISuggestionsAPI_getAIAnswer @@ -10694,7 +9795,6 @@ paths: required: true in: query description: The question of choosing a methodology - example: Find me large scale projects schema: type: string responses: @@ -10710,7 +9810,7 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_25 + tags: &ref_16 - ai-suggestions /ai-suggestions/rebuild-vector: put: @@ -10720,33 +9820,30 @@ paths: parameters: [] responses: '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_25 - /permissions: + description: '' + tags: *ref_16 + /schemas/type/{type}: get: - operationId: PermissionsApi_getPermissions - summary: Return a list of all permissions. - description: Returns all permissions. - parameters: [] + tags: + - schemas + description: Finds the schema using the json document type. + parameters: + - in: path + name: type + schema: + type: string + required: true + description: JSON type. + security: + - bearerAuth: [] + summary: Returns schema by type. responses: '200': description: Successful operation. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PermissionsDTO' + $ref: '#/components/schemas/Schema' '401': description: Unauthorized. '403': @@ -10756,54 +9853,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_26 - - permissions - security: - - bearer: [] - /permissions/roles: + $ref: '#/components/schemas/Error' + /policies/{policyId}/tag/{tag}: get: - operationId: PermissionsApi_getRoles - summary: Return a list of all roles. - description: Returns all roles. + tags: + - policies + description: >- + Requests block ID from a policy by tag. Only users with the Standard + Registry and Installer roles are allowed to make the request. parameters: - - name: name - required: false - in: query - description: Filter by role name - example: name + - in: path + name: policyId schema: type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 + required: true + description: Selected policy ID. + - in: path + name: tag schema: - type: number + type: string + required: true + description: Tag from the selected policy. + summary: Requests block ID from a policy by tag. + security: + - bearerAuth: [] responses: '200': description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/RoleDTO' + type: object + properties: + id: + type: string '401': description: Unauthorized. '403': @@ -10813,29 +9896,42 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] + $ref: '#/components/schemas/Error' + /policies/{policyId}/tag/{tag}/blocks: post: - operationId: PermissionsApi_createRole - summary: Creates new role. - description: Creates new role. - parameters: [] + tags: + - policies + description: Sends data to the specified block. + security: + - bearerAuth: [] + summary: Sends data to the specified block. + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy ID. + - in: path + name: tag + schema: + type: string + required: true + description: Tag from the selected policy. requestBody: + description: Object with the data to be sent to the block. required: true - description: Object that contains role information. content: application/json: schema: - $ref: '#/components/schemas/RoleDTO' + type: object responses: '200': - description: Created role. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/RoleDTO' + $ref: '#/components/schemas/PolicyBlockData' '401': description: Unauthorized. '403': @@ -10845,37 +9941,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 + $ref: '#/components/schemas/Error' + get: + tags: + - policies + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. security: - - bearer: [] - /permissions/roles/{id}: - put: - operationId: PermissionsApi_updateRole - summary: Updates role configuration. - description: Updates role configuration for the specified role ID. + - bearerAuth: [] + summary: Requests block data. parameters: - - name: id + - in: path + name: policyId + schema: + type: string required: true - in: path - description: Role Identifier - example: '000000000000000000000001' + description: Policy ID. + - in: path + name: tag schema: type: string - requestBody: - required: true - description: Role configuration. - content: - application/json: - schema: - $ref: '#/components/schemas/RoleDTO' + required: true + description: Tag from the selected policy. responses: '200': - description: Role configuration. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/RoleDTO' + $ref: '#/components/schemas/PolicyBlockData' '401': description: Unauthorized. '403': @@ -10885,73 +9980,74 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 + $ref: '#/components/schemas/Error' + /ipfs/file/: + post: + tags: + - ipfs + description: Add file to ipfs. + summary: Add file to ipfs. + requestBody: + description: Data array of file. + required: true + content: + binary/octet-stream: + schema: + type: string + format: binary security: - - bearer: [] - delete: - operationId: PermissionsApi_deleteModule - summary: Deletes the role. - description: Deletes the role with the provided role ID. - parameters: - - name: id - required: true - in: path - description: Role Identifier - example: '000000000000000000000001' - schema: - type: string + - bearerAuth: [] responses: - '200': - description: Successful operation. + '201': + description: Created. content: application/json: schema: - type: boolean + description: CID of added file. + type: string '401': description: Unauthorized. - '403': - description: Forbidden. '500': description: Internal server error. content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/roles/default: + $ref: '#/components/schemas/Error' + /artifacts/{policyId}: post: - operationId: PermissionsApi_setDefaultRole - summary: Set default role. - description: Set the role as default for new users. - parameters: [] + tags: + - artifacts + description: Upload artifact. For users with the Standard Registry role only. + security: + - bearerAuth: [] requestBody: - required: true - description: Object that contains role information. content: - application/json: + multipart/form-data: schema: type: object properties: - id: - type: string - description: Role Identifier - example: '000000000000000000000001' - required: - - id - examples: - Default: - value: - id: '000000000000000000000001' + artifacts: + type: array + items: + type: string + format: binary + parameters: + - in: path + name: policyId + schema: + type: string + required: true + description: Policy identifier + summary: Upload Artifact. responses: '200': - description: Created role. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/RoleDTO' + type: array + items: + $ref: '#/components/schemas/Artifact' '401': description: Unauthorized. '403': @@ -10961,61 +10057,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users: + $ref: '#/components/schemas/Error' + /artifact: get: - operationId: PermissionsApi_getUsers - summary: Return a list of all users. - description: Returns all users. + deprecated: true + tags: + - artifacts + description: Returns all artifacts. + security: + - bearerAuth: [] + summary: Returns all artifacts. parameters: - - name: pageIndex - required: false - in: query + - in: query + name: policyId + schema: + type: string + description: Policy identifier + - in: query + name: pageIndex + schema: + type: integer description: >- The number of pages to skip before starting to collect the result set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query + examples: + pageIndex: + summary: Example of a pageIndex + value: 0 + - in: query + name: pageSize + schema: + type: integer description: The numbers of items to return - example: 20 - schema: - type: number - - name: role - required: false - in: query - description: Filter by role - example: '000000000000000000000001' - schema: - type: string - - name: status - required: false - in: query - description: Filter by status - example: Active - schema: - enum: - - Active - - Inactive - type: string - - name: username - required: false - in: query - description: Filter by username - example: username - schema: - type: string + examples: + pageSize: + summary: Example of a pageSize + value: 100 responses: '200': description: Successful operation. headers: - X-Total-Count: + x-total-count: schema: type: integer description: Total items in the collection. @@ -11024,7 +10106,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/UserDTO' + $ref: '#/components/schemas/Artifact' '401': description: Unauthorized. '403': @@ -11034,30 +10116,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 + $ref: '#/components/schemas/Error' + /artifact/{policyId}: + post: + deprecated: true + tags: + - artifacts + description: Upload artifact. For users with the Standard Registry role only. security: - - bearer: [] - /permissions/users/{username}: - get: - operationId: PermissionsApi_getUser - summary: Updates user permissions. - description: Updates user permissions for the specified username. + - bearerAuth: [] + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + artifacts: + type: array + items: + type: string + format: binary parameters: - - name: username - required: true - in: path - description: User Identifier - example: username + - in: path + name: policyId schema: type: string + required: true + description: Policy identifier + summary: Upload Artifact. responses: '200': - description: User permissions. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + type: array + items: + $ref: '#/components/schemas/Artifact' '401': description: Unauthorized. '403': @@ -11067,43 +10162,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 + $ref: '#/components/schemas/Error' + /artifact/{artifactId}: + delete: + deprecated: true + tags: + - artifacts + description: Delete artifact. security: - - bearer: [] - put: - operationId: PermissionsApi_updateUser - summary: Updates user permissions. - description: Updates user permissions for the specified username. + - bearerAuth: [] + summary: Delete artifact. parameters: - - name: username - required: true - in: path - description: User Identifier - example: username + - in: path + name: artifactId schema: type: string - requestBody: - required: true - description: User permissions. - content: - application/json: - schema: - type: array - items: - type: string - examples: - Roles: - value: - - '000000000000000000000001' - - '000000000000000000000001' + required: true + description: Artifact identifier responses: '200': - description: User permissions. + description: Successful operation. content: application/json: schema: - $ref: '#/components/schemas/UserDTO' + type: boolean '401': description: Unauthorized. '403': @@ -11113,194 +10195,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 + $ref: '#/components/schemas/Error' + /tags/: + post: + tags: + - tags + description: Creates new tag. security: - - bearer: [] - /permissions/users/{username}/policies: - get: - operationId: PermissionsApi_getAssignedPolicies - summary: Return a list of all roles. - description: Returns all roles. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - - name: pageIndex - required: false - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - - name: pageSize - required: false - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: status - required: false - in: query - description: Filter by status - example: Active - schema: - enum: - - ALL - - DRAFT - - DRY-RUN - - PUBLISH_ERROR - - DISCONTINUED - - PUBLISH - type: string - responses: - '200': - description: Successful operation. - headers: - X-Total-Count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}/policies/assign: - post: - operationId: PermissionsApi_assignPolicy - summary: Assign policy. - description: Assign policy. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - requestBody: - required: true - description: Options. - content: - application/json: - schema: - $ref: '#/components/schemas/AssignPolicyDTO' - responses: - '200': - description: Assigned policy. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}/delegate: - put: - operationId: PermissionsApi_delegateRole - summary: Delegate user permissions. - description: Delegate user permissions for the specified username. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string + - bearerAuth: [] + summary: Creates new tag. requestBody: + description: Object that contains tag information. required: true - description: User permissions. content: application/json: schema: - type: array - items: - type: string - examples: - Roles: - value: - - '000000000000000000000001' - - '000000000000000000000001' + $ref: '#/components/schemas/Tag' responses: - '200': - description: User permissions. - content: - application/json: - schema: - $ref: '#/components/schemas/UserDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. + '201': + description: Created. content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] - /permissions/users/{username}/policies/delegate: - post: - operationId: PermissionsApi_delegatePolicy - summary: Delegate policy. - description: Delegate policy. - parameters: - - name: username - required: true - in: path - description: User Identifier - example: username - schema: - type: string - requestBody: - required: true - description: Options. - content: - application/json: - schema: - $ref: '#/components/schemas/AssignPolicyDTO' - responses: - '200': - description: Assigned policy. + $ref: '#/components/schemas/Tag' + '400': + description: Bad Request. content: application/json: schema: - $ref: '#/components/schemas/PolicyDTO' + $ref: '#/components/schemas/Error' '401': description: Unauthorized. '403': @@ -11310,10 +10233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_26 - security: - - bearer: [] + $ref: '#/components/schemas/Error' info: title: Guardian description: >- @@ -11322,7 +10242,7 @@ info: the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation. - version: 2.25.0 + version: 2.23.1 contact: name: API developer url: https://envisionblockchain.com @@ -11336,65 +10256,63 @@ servers: description: version 1.0 components: securitySchemes: - bearer: + bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: - AccountsSessionResponseDTO: + AccountsResponseDTO: type: object properties: username: type: string role: type: string - accessToken: + did: type: string required: - username - role - - accessToken + - did InternalServerErrorDTO: type: object properties: code: type: number - example: 500 message: type: string - example: Error message required: - code - message - AccountsResponseDTO: + RegisterUserDTO: type: object properties: username: type: string - role: + password: type: string - did: + password_confirmation: + type: string + role: type: string required: - username + - password + - password_confirmation - role - - did - RegisterUserDTO: + AccountsSessionResponseDTO: type: object properties: username: type: string - password: - type: string - password_confirmation: - type: string role: type: string + accessToken: + type: string required: - username - - password - - password_confirmation - role + - accessToken LoginUserDTO: type: object properties: @@ -11485,171 +10403,60 @@ components: PolicyDTO: type: object properties: - id: + _id: + type: string + createDate: + format: date-time type: string - example: '000000000000000000000001' uuid: type: string - example: 00000000-0000-0000-0000-000000000000 name: type: string - example: Policy name description: type: string - example: Description - topicDescription: - type: string - example: Description - policyTag: - type: string - example: Tag status: type: string - enum: - - DRY-RUN - - DRAFT - - PUBLISH_ERROR - - PUBLISH - - DISCONTINUED - example: DRAFT creator: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 owner: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 topicId: type: string - example: 0.0.1 - messageId: + policyTag: type: string - example: '0000000000.000000001' codeVersion: type: string - example: 1.0.0 - createDate: - type: string - example: '1900-01-01T00:00:00.000Z' - version: - type: string - example: 1.0.0 - config: - type: object - userRole: - type: string - example: Installer userRoles: - example: - - Installer type: array items: type: string - userGroup: - type: object - example: - uuid: 00000000-0000-0000-0000-000000000000 - role: Installer - groupLabel: Label - groupName: Name - active: true userGroups: - example: - - uuid: 00000000-0000-0000-0000-000000000000 - role: Installer - groupLabel: Label - groupName: Name - active: true - type: array - items: - type: object - policyRoles: - example: - - Registrant - type: array - items: - type: string - policyNavigation: - example: - - role: Registrant - steps: - - block: Block tag - level: 1 - name: Step name - type: array - items: - type: object - policyTopics: - example: - - name: Project - description: Project - memoObj: topic - static: false - type: any - type: array - items: - type: object - policyTokens: - example: - - tokenName: Token name - tokenSymbol: Token symbol - tokenType: non-fungible - decimals: '' - changeSupply: true - enableAdmin: true - enableFreeze: true - enableKYC: true - enableWipe: true - templateTokenTag: token_template_0 - type: array - items: - type: object - policyGroups: - example: - - name: Group name - creator: Registrant - groupAccessType: Private - groupRelationshipType: Multiple - members: - - Registrant - type: array - items: - type: object - categories: type: array items: type: string - projectSchema: + userRole: + type: string + userGroup: + type: string + id: type: string - example: 00000000-0000-0000-0000-000000000000 required: - - id + - _id + - createDate - uuid - name - description - - topicDescription - - policyTag - status - creator - owner - topicId - - messageId + - policyTag - codeVersion - - createDate - - version - - config - - userRole - userRoles - - userGroup - userGroups - - policyRoles - - policyNavigation - - policyTopics - - policyTokens - - policyGroups - - categories - - projectSchema + - userRole + - userGroup + - id AggregatedDTOItem: type: object properties: @@ -11671,41 +10478,11 @@ components: properties: username: type: string - example: username - role: - type: string - enum: &ref_35 - - STANDARD_REGISTRY - - USER - - AUDITOR - example: USER - permissionsGroup: - example: &ref_36 - - {} - type: array - items: - type: string - permissions: - example: &ref_37 - - POLICIES_POLICY_READ - type: array - items: - type: string did: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - parent: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - hederaAccountId: - type: string - example: 0.0.1 required: - username - - role - - permissions + - did BalanceResponseDTO: type: object properties: @@ -11724,7 +10501,6 @@ components: properties: policyId: type: string - example: '000000000000000000000001' required: - policyId SearchPoliciesDTO: @@ -11740,61 +10516,28 @@ components: FilterPoliciesDTO: type: object properties: - idLvl: - oneOf: &ref_27 - - type: string - - type: number - enum: &ref_28 - - 0 - - 1 - example: 0 - eventsLvl: - oneOf: &ref_29 - - type: string - - type: number - enum: &ref_30 - - 0 - - 1 - example: 0 - propLvl: - oneOf: &ref_31 - - type: string - - type: number - enum: &ref_32 - - 0 - - 1 - - 2 - example: 0 - childrenLvl: - oneOf: &ref_33 - - type: string - - type: number - enum: &ref_34 - - 0 - - 1 - - 2 - example: 0 policyId1: type: string - example: '000000000000000000000001' policyId2: type: string - example: '000000000000000000000001' policyIds: - example: - - '000000000000000000000001' - - '000000000000000000000001' - type: array - items: - type: string - required: - - idLvl - - eventsLvl - - propLvl - - childrenLvl - - policyId1 - - policyId2 - - policyIds + type: string + eventsLvl: + type: number + propLvl: + type: number + childrenLvl: + type: number + idLvl: + type: number + required: + - policyId1 + - policyId2 + - policyIds + - eventsLvl + - propLvl + - childrenLvl + - idLvl ComparePoliciesDTO: type: object properties: @@ -11826,35 +10569,25 @@ components: FilterModulesDTO: type: object properties: - idLvl: - oneOf: *ref_27 - enum: *ref_28 - example: 0 - eventsLvl: - oneOf: *ref_29 - enum: *ref_30 - example: 0 - propLvl: - oneOf: *ref_31 - enum: *ref_32 - example: 0 - childrenLvl: - oneOf: *ref_33 - enum: *ref_34 - example: 0 moduleId1: type: string - example: '000000000000000000000001' moduleId2: type: string - example: '000000000000000000000001' + eventsLvl: + type: number + propLvl: + type: number + childrenLvl: + type: number + idLvl: + type: number required: - - idLvl + - moduleId1 + - moduleId2 - eventsLvl - propLvl - childrenLvl - - moduleId1 - - moduleId2 + - idLvl CompareModulesDTO: type: object properties: @@ -11885,18 +10618,10 @@ components: properties: schemaId1: type: string - example: '000000000000000000000001' schemaId2: type: string - example: '000000000000000000000001' idLvl: - oneOf: - - type: string - - type: number - enum: - - 0 - - 1 - example: 0 + type: number required: - schemaId1 - schemaId2 @@ -11920,40 +10645,13 @@ components: FilterDocumentsDTO: type: object properties: - idLvl: - oneOf: *ref_27 - enum: *ref_28 - example: 0 - eventsLvl: - oneOf: *ref_29 - enum: *ref_30 - example: 0 - propLvl: - oneOf: *ref_31 - enum: *ref_32 - example: 0 - childrenLvl: - oneOf: *ref_33 - enum: *ref_34 - example: 0 documentId1: type: string - example: '000000000000000000000001' documentId2: type: string - example: '000000000000000000000001' documentIds: - example: - - '000000000000000000000001' - - '000000000000000000000001' - type: array - items: - type: string + type: string required: - - idLvl - - eventsLvl - - propLvl - - childrenLvl - documentId1 - documentId2 - documentIds @@ -11976,40 +10674,13 @@ components: FilterToolsDTO: type: object properties: - idLvl: - oneOf: *ref_27 - enum: *ref_28 - example: 0 - eventsLvl: - oneOf: *ref_29 - enum: *ref_30 - example: 0 - propLvl: - oneOf: *ref_31 - enum: *ref_32 - example: 0 - childrenLvl: - oneOf: *ref_33 - enum: *ref_34 - example: 0 toolId1: type: string - example: '000000000000000000000001' toolId2: type: string - example: '000000000000000000000001' toolIds: - example: - - '000000000000000000000001' - - '000000000000000000000001' - type: array - items: - type: string + type: string required: - - idLvl - - eventsLvl - - propLvl - - childrenLvl - toolId1 - toolId2 - toolIds @@ -12038,45 +10709,6 @@ components: - outputEvents - variables - total - FilterSearchBlocksDTO: - type: object - properties: - id: - type: string - example: 00000000-0000-0000-0000-000000000000 - config: - type: object - required: - - id - - config - SearchBlocksDTO: - type: object - properties: - name: - type: string - description: - type: string - version: - type: string - owner: - type: string - topicId: - type: string - messageId: - type: string - hash: - type: string - chains: - type: object - required: - - name - - description - - version - - owner - - topicId - - messageId - - hash - - chains ArtifactDTOItem: type: object properties: @@ -12140,16 +10772,6 @@ components: - syncPoolsDate - lastSyncEventTimeStamp - wipeContractIds - ContractConfigDTO: - type: object - properties: - type: - type: string - description: - type: string - required: - - type - - description WiperRequestDTO: type: object properties: @@ -12268,1995 +10890,1630 @@ components: - token - count - serials - RegisteredUsersDTO: + ProfileDTO: type: object properties: username: type: string + nullable: false + role: + type: string + nullable: false did: type: string + nullable: true parent: type: string - role: + nullable: true + hederaAccountId: type: string - policyRoles: - type: array - items: - type: string + nullable: true + confirmed: + type: boolean + nullable: true + failed: + type: boolean + nullable: true + topicId: + type: string + nullable: true + parentTopicId: + type: string + nullable: true + didDocument: + type: object + nullable: true + vcDocument: + type: object + nullable: true required: - username - - did - - parent - role - - policyRoles - TaskDTO: + SubjectDTO: type: object properties: - taskId: + '@context': + nullable: true + type: array + items: + type: string + id: type: string - description: Task Id - example: 00000000-0000-0000-0000-000000000000 - expectation: - type: number - description: Expected count of task phases - example: 0 + nullable: true + type: + type: string + nullable: true required: - - taskId - - expectation - VCDocumentDTO: + - '@context' + DidDocumentDTO: type: object properties: id: type: string nullable: false - '@context': + context: + nullable: true type: array items: type: string - type: + alsoKnownAs: + nullable: true type: array items: type: string - credentialSubject: + controller: + nullable: true + type: array + items: + type: string + verificationMethod: + nullable: true type: array items: type: object - issuer: - type: object - issuanceDate: - type: string - proof: - type: object + authentication: + nullable: true + type: array + items: + type: object + assertionMethod: + nullable: true + type: array + items: + type: object + keyAgreement: nullable: true + type: array + items: + type: object + capabilityInvocation: + nullable: true + type: array + items: + type: object + capabilityDelegation: + nullable: true + type: array + items: + type: object + service: + nullable: true + type: array + items: + type: object required: - id - - '@context' - - type - - credentialSubject - - issuer - - issuanceDate - - proof - ExternalDocumentDTO: + - context + - alsoKnownAs + - controller + - verificationMethod + - authentication + - assertionMethod + - keyAgreement + - capabilityInvocation + - capabilityDelegation + - service + DidKeyDTO: type: object properties: - owner: + id: type: string - policyTag: + nullable: false + key: type: string - document: nullable: false - allOf: - - $ref: '#/components/schemas/VCDocumentDTO' required: - - owner - - policyTag - - document - LogFilterDTO: + - id + - key + CredentialsDTO: type: object properties: - type: + entity: type: string - nullable: true - startDate: + nullable: false + hederaAccountId: type: string - nullable: true - endDate: + nullable: false + hederaAccountKey: type: string - nullable: true - attributes: - nullable: true - type: array - items: - type: string - message: + nullable: false + parent: type: string nullable: true - pageSize: - type: number + vcDocument: nullable: true - pageIndex: - type: number + allOf: + - $ref: '#/components/schemas/SubjectDTO' + didDocument: nullable: true - sortDirection: - type: string + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + didKeys: nullable: true + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' required: - - type - - startDate - - endDate - - attributes - - message - - pageSize - - pageIndex - - sortDirection - LogResultDTO: + - entity + - hederaAccountId + - hederaAccountKey + TaskDTO: type: object properties: - totalCount: + taskId: + type: string + expectation: type: number - logs: - type: array - items: - type: object required: - - totalCount - - logs - ModuleDTO: + - taskId + - expectation + DidDocumentStatusDTO: type: object properties: - id: - type: string + valid: + type: boolean nullable: false - uuid: + error: type: string + nullable: true + didDocument: + type: object nullable: false - type: - type: string + required: + - valid + - error + - didDocument + DidDocumentWithKeyDTO: + type: object + properties: + document: nullable: false - name: - type: string + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + keys: nullable: false - description: + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - document + - keys + DidKeyStatusDTO: + type: object + properties: + id: type: string nullable: false - status: + key: type: string nullable: false - creator: - type: string + valid: + type: boolean nullable: false - owner: + required: + - id + - key + - valid + MigrationConfigPoliciesDTO: + type: object + properties: + src: type: string - nullable: false - topicId: + dst: type: string - nullable: false - messageId: + required: + - src + - dst + MigrationConfigDTO: + type: object + properties: + policies: + $ref: '#/components/schemas/MigrationConfigPoliciesDTO' + vcs: + type: array + items: + type: string + vps: + type: array + items: + type: string + schemas: + type: object + groups: + type: object + roles: + type: object + required: + - policies + - vcs + - vps + - schemas + - groups + - roles + PolicyCategoryDTO: + type: object + properties: + id: type: string - nullable: false - codeVersion: + name: type: string - nullable: false - createDate: + type: type: string - nullable: false - config: - type: object - nullable: true required: - id - - uuid - - type - name - - description - - status - - creator - - owner - - topicId - - messageId - - codeVersion - - createDate - - config + - type SchemaDTO: type: object properties: id: type: string - example: '000000000000000000000001' - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 name: type: string - example: Schema name description: type: string - example: Description entity: type: string - enum: - - NONE - - VC - - EVC - - STANDARD_REGISTRY - - USER - - POLICY - - MINT_TOKEN - - RETIRE - - WIPE_TOKEN - - MINT_NFTOKEN - - ISSUER - - USER_ROLE - - CHUNK - - ACTIVITY_IMPACT - - TOKEN_DATA_SOURCE - - ROLE - - USER_PERMISSIONS - example: POLICY + document: + type: string + uuid: + type: string iri: type: string - example: 00000000-0000-0000-0000-000000000000 + hash: + type: string status: type: string - enum: - - DRAFT - - PUBLISHED - - UNPUBLISHED - - ERROR - example: DRAFT topicId: type: string - example: 0.0.1 version: type: string - example: 1.0.0 owner: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 messageId: type: string - example: '0000000000.000000001' - category: - type: string - enum: - - POLICY - - MODULE - - SYSTEM - - TAG - - TOOL - example: POLICY - documentURL: - type: string - example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - contextURL: - type: string - example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - document: - type: object - context: - type: object required: - id - - uuid - name - description - entity + - document + - uuid - iri + - hash - status - topicId - version - owner - messageId - - category - - documentURL - - contextURL - - document - - context - ExportMessageDTO: + VersionSchemaDTO: type: object properties: - uuid: + version: + type: string + required: + - version + MessageSchemaDTO: + type: object + properties: + messageId: + type: string + required: + - messageId + ExportSchemaDTO: + type: object + properties: + id: type: string name: type: string description: type: string - messageId: + version: type: string owner: type: string + messageId: + type: string required: - - uuid + - id - name - description - - messageId + - version - owner - ImportMessageDTO: + - messageId + SystemSchemaDTO: type: object properties: - messageId: + name: + type: string + entity: type: string - metadata: - type: object - nullable: true required: - - messageId - - metadata - ModulePreviewDTO: + - name + - entity + SettingsDTO: type: object properties: - module: - nullable: false - allOf: - - $ref: '#/components/schemas/ModuleDTO' - messageId: + ipfsStorageApiKey: type: string - schemas: - nullable: true - type: array - items: - type: object - tags: - nullable: true - type: array - items: - type: object - moduleTopicId: + operatorId: + type: string + operatorKey: type: string - nullable: true required: - - module - - messageId - - schemas - - tags - - moduleTopicId - BlockErrorsDTO: + - ipfsStorageApiKey + - operatorId + - operatorKey + SuggestionsInputDTO: type: object properties: - id: - type: string - name: + blockType: type: string - errors: - type: array - items: - type: string - isValid: - type: boolean - required: - - id - - name - - errors - - isValid - ValidationErrorsDTO: - type: object - properties: - blocks: - nullable: true - type: array - items: - $ref: '#/components/schemas/BlockErrorsDTO' - errors: + children: nullable: true type: array items: - type: string - required: - - blocks - - errors - ModuleValidationDTO: - type: object - properties: - module: - nullable: false - allOf: - - $ref: '#/components/schemas/ModuleDTO' - results: - nullable: false - allOf: - - $ref: '#/components/schemas/ValidationErrorsDTO' + type: object required: - - module - - results - BlockDTO: + - blockType + - children + SuggestionsOutputDTO: type: object properties: - id: + next: type: string - blockType: + nested: type: string - blocks: - type: array - items: - $ref: '#/components/schemas/BlockDTO' required: - - id - - blockType - - blocks - ToolDTO: + - next + - nested + SuggestionsConfigItemDTO: type: object properties: id: type: string - example: '000000000000000000000001' - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Tool name - description: - type: string - example: Description - status: + type: type: string enum: - - DRAFT - - PUBLISHED - - PUBLISH_ERROR - example: NEW - creator: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - owner: - type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - topicId: - type: string - example: 0.0.1 - messageId: - type: string - example: '0000000000.000000001' - codeVersion: - type: string - example: 1.0.0 - createDate: - type: string - example: '1900-01-01T00:00:00.000Z' - config: - $ref: '#/components/schemas/BlockDTO' + - Policy + - Module + index: + type: number required: - id - - uuid - - name - - description - - status - - creator - - owner - - topicId - - messageId - - codeVersion - - createDate - - config - ToolValidationDTO: - type: object - properties: - tool: - $ref: '#/components/schemas/ToolDTO' - results: - $ref: '#/components/schemas/ValidationErrorsDTO' - required: - - tool - - results - ToolPreviewDTO: + - type + - index + SuggestionsConfigDTO: type: object properties: - tool: - $ref: '#/components/schemas/ToolDTO' - schemas: - type: array - items: - type: object - tags: - type: array - items: - type: object - tools: - type: array - items: - $ref: '#/components/schemas/ToolDTO' + items: + $ref: '#/components/schemas/SuggestionsConfigItemDTO' required: - - tool - - schemas - - tags - - tools - ProfileDTO: + - items + NotificationDTO: type: object properties: - username: - type: string - example: username - role: + title: type: string - enum: *ref_35 - example: USER - permissionsGroup: - example: *ref_36 - type: array - items: - type: string - permissions: - example: *ref_37 - type: array - items: - type: string - did: + message: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - parent: + type: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - hederaAccountId: + enum: + - INFO + - ERROR + - WARN + - SUCCESS + action: type: string - example: 0.0.1 - confirmed: + enum: + - POLICY_CONFIGURATION + - POLICY_VIEW + - POLICIES_PAGE + - SCHEMAS_PAGE + - TOKENS_PAGE + - PROFILE_PAGE + result: + type: object + read: type: boolean - example: true - failed: + old: type: boolean - example: true - topicId: - type: string - example: 0.0.1 - parentTopicId: - type: string - example: 0.0.1 - didDocument: - type: object - nullable: true - vcDocument: - type: object - nullable: true required: - - username - - role - - permissions - SubjectDTO: + - title + - message + - type + - action + - result + - read + - old + ProgressDTO: type: object properties: - '@context': - nullable: true - type: array - items: - type: string - id: + action: type: string - nullable: true + message: + type: string + progress: + type: number type: type: string - nullable: true + enum: + - INFO + - ERROR + - WARN + - SUCCESS + taskId: + type: string required: - - '@context' - DidDocumentDTO: + - action + - message + - progress + - type + - taskId + ProjectDTO: type: object properties: id: type: string - nullable: false - context: - nullable: true - type: array - items: - type: string - alsoKnownAs: - nullable: true - type: array - items: - type: string - controller: - nullable: true - type: array - items: - type: string - verificationMethod: - nullable: true - type: array - items: - type: object - authentication: - nullable: true - type: array - items: - type: object - assertionMethod: - nullable: true - type: array - items: - type: object - keyAgreement: - nullable: true - type: array - items: - type: object - capabilityInvocation: - nullable: true - type: array - items: - type: object - capabilityDelegation: - nullable: true - type: array - items: - type: object - service: - nullable: true - type: array - items: - type: object + policyId: + type: string + policyName: + type: string + registered: + type: string + title: + type: string + companyName: + type: string + sectoralScope: + type: string required: - id - - context - - alsoKnownAs - - controller - - verificationMethod - - authentication - - assertionMethod - - keyAgreement - - capabilityInvocation - - capabilityDelegation - - service - DidKeyDTO: + - policyId + - policyName + - registered + - title + - companyName + - sectoralScope + PropertiesDTO: type: object properties: id: type: string - nullable: false - key: + title: + type: string + value: type: string - nullable: false required: - id - - key - CredentialsDTO: + - title + - value + RecordStatusDTO: type: object properties: - entity: + type: type: string - nullable: false - hederaAccountId: + policyId: type: string - nullable: false - hederaAccountKey: + uuid: type: string - nullable: false - parent: + status: type: string - nullable: true - vcDocument: - nullable: true - allOf: - - $ref: '#/components/schemas/SubjectDTO' - didDocument: - nullable: true - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - didKeys: - nullable: true - type: array - items: - $ref: '#/components/schemas/DidKeyDTO' required: - - entity - - hederaAccountId - - hederaAccountKey - DidDocumentStatusDTO: + - type + - policyId + - uuid + - status + Object: type: object - properties: - valid: - type: boolean - nullable: false - error: - type: string - nullable: true - didDocument: - type: object - nullable: false - required: - - valid - - error - - didDocument - DidKeyStatusDTO: + properties: {} + RecordActionDTO: type: object properties: - id: + uuid: type: string - nullable: false - key: + policyId: type: string - nullable: false - valid: - type: boolean - nullable: false - required: - - id - - key - - valid - DidDocumentWithKeyDTO: - type: object - properties: - document: - nullable: false - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - keys: - nullable: false - type: array - items: - $ref: '#/components/schemas/DidKeyDTO' - required: - - document - - keys - MigrationConfigPoliciesDTO: - type: object - properties: - src: + method: type: string - dst: + action: + type: string + time: + type: string + user: + type: string + target: type: string required: - - src - - dst - MigrationConfigDTO: + - uuid + - policyId + - method + - action + - time + - user + - target + ResultInfoDTO: type: object properties: - policies: - $ref: '#/components/schemas/MigrationConfigPoliciesDTO' - vcs: - type: array - items: - type: string - vps: - type: array - items: - type: string - schemas: - type: object - groups: - type: object - roles: - type: object - blocks: - type: object tokens: - type: object - migrateState: - type: boolean - migrateRetirePools: - type: boolean - editedVCs: - type: object - retireContractId: - type: string + type: number + documents: + type: number required: - - policies - - vcs - - vps - - schemas - - groups - - roles - - blocks - tokens - - migrateState - - migrateRetirePools - - editedVCs - - retireContractId - PoliciesValidationDTO: + - documents + ResultDocumentDTO: type: object properties: - policies: - type: array - items: - $ref: '#/components/schemas/PolicyDTO' - isValid: + type: type: string - errors: - $ref: '#/components/schemas/ValidationErrorsDTO' - required: - - policies - - isValid - - errors - PolicyValidationDTO: - type: object - properties: - policy: - $ref: '#/components/schemas/PolicyDTO' - results: - $ref: '#/components/schemas/ValidationErrorsDTO' - required: - - policy - - results - Object: - type: object - properties: {} - PolicyPreviewDTO: - type: object - properties: - module: - $ref: '#/components/schemas/PolicyDTO' - messageId: + schema: type: string - example: '0000000000.000000001' - schemas: - type: array - items: - type: object - tags: - type: array - items: - type: object - moduleTopicId: + rate: type: string - example: 0.0.1 + documents: + type: object required: - - module - - messageId - - schemas - - tags - - moduleTopicId - PolicyCategoryDTO: + - type + - schema + - rate + - documents + RunningResultDTO: type: object properties: - id: - type: string - example: '000000000000000000000001' - name: - type: string - example: Large-Scale - type: - type: string - example: PROJECT_SCALE + info: + $ref: '#/components/schemas/ResultInfoDTO' + total: + type: number + documents: + $ref: '#/components/schemas/ResultDocumentDTO' required: - - id - - name - - type - VersionSchemaDTO: + - info + - total + - documents + RunningDetailsDTO: type: object properties: - version: - type: string - example: 1.0.0 + left: + type: object + right: + type: object + total: + type: number + documents: + type: object required: - - version - MessageSchemaDTO: + - left + - right + - total + - documents + RegisteredUsersDTO: type: object properties: - messageId: + username: + type: string + did: + type: string + parent: + type: string + role: type: string - example: '0000000000.000000001' + policyRoles: + type: array + items: + type: string required: - - messageId - ExportSchemaDTO: + - username + - did + - parent + - role + - policyRoles + ToolDTO: type: object properties: id: type: string - example: '000000000000000000000001' + uuid: + type: string name: type: string - example: Schema name description: type: string - example: Description - version: + config: + type: object + status: + type: string + creator: type: string - example: 1.0.0 owner: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string messageId: type: string - example: '0000000000.000000001' + codeVersion: + type: string + createDate: + type: string required: - id + - uuid - name - description - - version + - config + - status + - creator - owner + - topicId - messageId - SystemSchemaDTO: + - codeVersion + - createDate + Credentials: type: object + required: + - username + - password properties: - name: + username: type: string - example: Schema name - entity: + password: type: string - enum: - - STANDARD_REGISTRY - - USER - example: STANDARD_REGISTRY - required: - - name - - entity - SettingsDTO: + Account: type: object + required: + - username + - role properties: - ipfsStorageApiKey: + username: type: string - operatorId: + role: type: string - operatorKey: + did: type: string - required: - - ipfsStorageApiKey - - operatorId - - operatorKey - TagDTO: + Session: type: object + required: + - username + - role + - accessToken properties: - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Tag label - description: + username: type: string - example: Description - owner: + role: type: string - example: DID - date: + accessToken: type: string - example: '1900-01-01T00:00:00.000Z' - entity: + User: + type: object + required: + - username + - role + properties: + confirmed: type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - status: + failed: type: string - enum: - - Draft - - Published - - History - example: Published - operation: + username: type: string - enum: - - Create - - Delete - example: Create - topicId: + role: type: string - example: 0.0.1 - messageId: + hederaAccountId: type: string - example: '0000000000.000000001' - policyId: + hederaAccountKey: type: string - example: '000000000000000000000001' - uri: + did: type: string - example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - target: + didDocument: + type: object + vcDocument: + type: object + parent: type: string - example: '0000000000.000000001' - localTarget: + topicId: type: string - example: '000000000000000000000001' - document: - type: object + Schema: + type: object required: - - uuid + - id - name - description - - owner - - date - entity - - status - - operation - - topicId - - messageId - - policyId - - uri - - target - - localTarget - document - TagFilterDTO: - type: object properties: - entity: + id: type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: + iri: type: string - example: '0000000000.000000001' - targets: - example: '0000000000.000000001' - type: array - items: - type: string - required: - - entity - - target - - targets - TagMapDTO: - type: object - properties: - entity: + uuid: type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: + name: type: string - example: '0000000000.000000001' - refreshDate: + description: type: string - example: '1900-01-01T00:00:00.000Z' - tags: - type: array - items: - $ref: '#/components/schemas/TagDTO' - required: - - entity - - target - - refreshDate - - tags - StatusDTO: - type: object - properties: - message: + entity: type: string - description: Text - type: + hash: type: string - description: Type - enum: - - Processing - - Completed - - Info - example: Info - required: - - message - - type - TaskStatusDTO: - type: object - properties: - action: + status: type: string - description: Task type - example: Create policy - userId: + document: + oneOf: + - type: string + - type: object + topicId: type: string - description: User Id - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - expectation: - type: number - description: Expected count of task phases - example: 0 - taskId: + version: type: string - description: Task Id - example: 00000000-0000-0000-0000-000000000000 - date: + owner: type: string - description: Date - example: '1900-01-01T00:00:00.000Z' - statuses: + messageId: + type: string + ImportSchema: + type: object + required: + - schemes + properties: + schemes: type: array items: - $ref: '#/components/schemas/StatusDTO' - result: - type: object - error: - type: object - required: - - action - - userId - - expectation - - taskId - - date - - statuses - - result - - error - TokenDTO: + type: object + required: + - document + - entity + - name + - uuid + properties: + document: + type: string + entity: + type: string + hash: + type: string + name: + type: string + uuid: + type: string + ExportSchema: type: object + required: + - ids properties: - tokenId: - type: string - example: 0.0.1 - tokenName: - type: string - example: Token name - tokenSymbol: - type: string - example: Token symbol - tokenType: + name: type: string - enum: - - fungible - - non-fungible - example: non-fungible - initialSupply: + version: type: string - example: '0' - decimals: + messageId: type: string - example: '0' + Token: + type: object + required: + - changeSupply + - decimals + - enableAdmin + - enableKYC + - enableFreeze + - enableWipe + - initialSupply + - tokenName + - tokenSymbol + - tokenType + properties: changeSupply: type: boolean - description: Add Supply key - example: true + decimals: + type: string enableAdmin: type: boolean - description: Add Admin key - example: true enableFreeze: type: boolean - description: Add Freeze key - example: true enableKYC: type: boolean - description: Add KYC key - example: true enableWipe: type: boolean - description: Add Wipe key - example: true + initialSupply: + type: string + tokenName: + type: string + tokenSymbol: + type: string + tokenType: + type: string + TokenInfo: + type: object required: + - id - tokenId - tokenName - tokenSymbol - tokenType - - initialSupply - decimals - - changeSupply - - enableAdmin - - enableFreeze - - enableKYC - - enableWipe - TokenInfoDTO: - type: object + - associated + - balance + - frozen + - kyc properties: id: type: string - example: '000000000000000000000001' tokenId: type: string - example: 0.0.1 tokenName: type: string - example: Token name tokenSymbol: type: string - example: Token symbol tokenType: type: string - enum: - - fungible - - non-fungible - example: non-fungible decimals: type: string - example: '0' associated: type: boolean - description: '' - example: true + balance: + type: string frozen: type: boolean - description: '' - example: true kyc: type: boolean - description: '' - example: true - balance: - type: string - description: User balance - example: '0' enableAdmin: type: boolean - description: There is an Admin key - example: true - enableFreeze: - type: boolean - description: There is an Freeze key - example: true enableKYC: type: boolean - description: There is an KYC key - example: true + enableFreeze: + type: boolean enableWipe: type: boolean - description: There is an Wipe key - example: true - required: - - id - - tokenId - - tokenName - - tokenSymbol - - tokenType - - decimals - - associated - - frozen - - kyc - - balance - - enableAdmin - - enableFreeze - - enableKYC - - enableWipe - ThemeRoleDTO: + PolicyConfig: type: object - properties: - description: - type: string - example: Description - text: - type: string - description: Text color - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - background: - type: string - description: Background color - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - border: - type: string - description: Border color - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - shape: - type: string - description: Object shape - enum: - - '0' - - '1' - - '2' - - '3' - - '4' - - '5' - example: '0' - borderWidth: - type: string - description: Border width - enum: - - 0px - - 1px - - 2px - - 3px - - 4px - - 5px - - 6px - - 7px - example: 2px - filterType: - type: string - description: Filter by type - enum: - - type - - api - - role - example: type - filterValue: - oneOf: - - type: string - - type: array - items: - type: string required: + - name + - version - description - - text - - background - - border - - shape - - borderWidth - - filterType - - filterValue - ThemeDTO: - type: object + - topicDescription + - config + - topicId + - policyTag properties: id: type: string - example: '000000000000000000000001' uuid: type: string - example: 00000000-0000-0000-0000-000000000000 name: type: string - example: Theme name - rules: - type: array - items: - $ref: '#/components/schemas/ThemeRoleDTO' - required: - - id - - uuid - - name - - rules - VpDTO: - type: object - properties: - '@context': + version: + type: string + description: + type: string + topicDescription: + type: string + config: + type: object + status: + type: string + owner: + type: string + policyRoles: type: array items: type: string - id: + topicId: type: string - example: 00000000-0000-0000-0000-000000000000 - type: + policyTag: + type: string + policyTopics: type: array items: - type: string - verifiableCredential: + type: object + properties: + name: + type: string + description: + type: string + type: + type: string + static: + type: boolean + TrustChains: + type: object + required: + - chain + - userMap + properties: + chain: type: array items: type: object - proof: - type: object + required: + - id + - type + - tag + - label + - schema + - owner + - document + properties: + id: + type: string + type: + type: string + tag: + type: string + label: + type: string + schema: + type: string + owner: + type: string + document: + type: object + userMap: + type: array + items: + type: object + required: + - did + - username + properties: + did: + type: string + username: + type: string + VerifiablePresentation: + type: object required: - - '@context' + - hash - id + - policyId + - signature + - status + - tag - type - - verifiableCredential - - proof - VpDocumentDTO: - type: object + - updateDate + - createDate + - owner + - document properties: + hash: + type: string id: type: string - example: '000000000000000000000001' policyId: type: string - example: '000000000000000000000001' - hash: - type: string - example: hash signature: - type: number - example: 0 + type: string status: type: string - enum: - - NEW - - ISSUE - - REVOKE - - SUSPEND - - RESUME - - FAILED - example: NEW tag: type: string - example: Block tag type: type: string - example: Document type - createDate: - type: string - example: '1900-01-01T00:00:00.000Z' updateDate: type: string - example: '1900-01-01T00:00:00.000Z' + createDate: + type: string owner: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 document: - $ref: '#/components/schemas/VpDTO' - required: - - id - - policyId - - hash - - signature - - status - - tag - - type - - createDate - - updateDate - - owner - - document - WizardConfigDTO: + type: object + PublishPolicy: type: object + required: + - errors + - isValid + - policies properties: - roles: + errors: type: array items: - type: string - policy: + type: object + isValid: + type: boolean + policies: + type: array + items: + type: object + ValidatePolicy: + type: object + required: + - config + - results + properties: + config: + type: object + results: + type: object + PolicyBlock: + type: object + required: + - id + - blockType + - isActive + - uiMetaData + properties: + id: type: string - properties: - name: - type: string - description: - type: string - topicDescription: - type: string - policyTag: - type: string - schemas: - properties: - name: - type: string - iri: - type: string - isApproveEnable: - type: boolean - isMintSchema: - type: boolean - mintOptions: - type: object - properties: - tokenId: - type: string - rule: - type: string - dependencySchemaIri: - type: string - relationshipsSchemaIri: - type: string - initialRolesFor: - type: array - items: - type: string - rolesConfig: - type: array - items: - type: object - properties: - role: - type: string - isApprover: - type: boolean - isCreator: - type: boolean - gridColumns: - type: array - items: - type: object - properties: - field: - type: string - title: - type: string + blockType: + type: string + isActive: + type: boolean + uiMetaData: + type: object + blocks: type: array items: - type: string - trustChain: - properties: - role: - type: string - mintSchemaIri: - type: string - viewOnlyOwnDocuments: - type: boolean + type: object + PolicyBlockData: + type: object + required: + - id + - isActive + - uiMetaData + - data + properties: + id: + type: string + blockType: + type: string + isActive: + type: boolean + uiMetaData: + type: object + data: + type: object + fields: + type: array + items: + type: object + index: + type: number + roles: type: array items: type: string + blocks: + type: array + items: + $ref: '#/components/schemas/PolicyBlock' + ExportPolicy: + type: object + required: + - name + - version + - messageId + properties: + name: + type: string + version: + type: string + tokens: + type: string + PreviewPolicy: + type: object required: - - roles - policy - schemas - - trustChain - WizardResultDTO: + - tokens + properties: + policy: + type: object + schemas: + type: array + items: + type: object + tokens: + type: array + items: + type: object + Error: type: object + required: + - code + - message properties: - policyId: + code: + type: number + message: type: string - wizardConfig: - $ref: '#/components/schemas/WizardConfigDTO' - required: - - policyId - - wizardConfig - WizardConfigAsyncDTO: + ExternalData: type: object - properties: - saveState: - type: boolean - wizardConfig: - $ref: '#/components/schemas/WizardConfigDTO' required: - - saveState - - wizardConfig - WizardPreviewDTO: - type: object + - owner + - policyTag + - document properties: - policyConfig: - $ref: '#/components/schemas/PolicyDTO' - wizardConfig: - $ref: '#/components/schemas/WizardConfigDTO' + owner: + type: string + policyTag: + type: string + document: + type: object + HederaAccount: + type: object required: - - policyConfig - - wizardConfig - BrandingDTO: + - id + - key + properties: + id: + type: string + key: + type: string + CommonSettings: type: object properties: - headerColor: + operatorId: + type: string + operatorKey: type: string - primaryColor: + nftApiKey: + deprecated: true type: string - companyName: + ipfsStorageApiKey: type: string - companyLogoUrl: + LogFilters: + type: object + properties: + type: type: string - loginBannerUrl: + startDate: type: string - faviconUrl: + endDate: type: string - headerColor1: + attributes: + type: array + items: + type: string + message: type: string - termsAndConditions: + pageSize: + type: number + pageIndex: + type: number + sortDirection: type: string - required: - - headerColor - - primaryColor - - companyName - - companyLogoUrl - - loginBannerUrl - - faviconUrl - - headerColor1 - - termsAndConditions - SuggestionsInputDTO: + enum: + - ASC + - DESC + Log: type: object properties: - blockType: + type: type: string - children: - nullable: true + datetime: + type: string + message: + type: string + attributes: type: array items: - type: object - required: - - blockType - - children - SuggestionsOutputDTO: + type: string + Task: type: object properties: - next: + taskId: type: string - nested: + expectation: + type: number + TaskStatus: + type: object + properties: + date: type: string - required: - - next - - nested - SuggestionsConfigItemDTO: + name: + type: string + statuses: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + result: + type: object + error: + type: object + Artifact: type: object properties: id: type: string + name: + type: string + uuid: + type: string + extention: + type: string type: type: string - enum: - - Policy - - Module - index: - type: number - required: - - id - - type - - index - SuggestionsConfigDTO: - type: object - properties: - items: - $ref: '#/components/schemas/SuggestionsConfigItemDTO' - required: - - items - NotificationDTO: + MultiPolicyConfig: type: object properties: - title: + id: type: string - message: + uuid: + type: string + owner: type: string type: type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - action: + instanceTopicId: type: string - enum: - - POLICY_CONFIGURATION - - POLICY_VIEW - - POLICIES_PAGE - - SCHEMAS_PAGE - - TOKENS_PAGE - - PROFILE_PAGE - result: - type: object - read: - type: boolean - old: - type: boolean - required: - - title - - message - - type - - action - - result - - read - - old - ProgressDTO: - type: object - properties: - action: + mainPolicyTopicId: type: string - message: + synchronizationTopicId: type: string - progress: - type: number - type: + policyOwner: type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - taskId: + user: type: string - required: - - action - - message - - progress - - type - - taskId - ProjectDTO: + Contract: type: object properties: id: type: string - policyId: - type: string - policyName: + contractId: type: string - registered: + description: type: string - title: + owner: type: string - companyName: + isOwnerCreator: type: string - sectoralScope: + status: type: string - required: - - id - - policyId - - policyName - - registered - - title - - companyName - - sectoralScope - CompareDocumentsV2DTO: - type: object - properties: - projects: - $ref: '#/components/schemas/CompareDocumentsDTO' - presentations: - $ref: '#/components/schemas/CompareDocumentsDTO' - required: - - projects - - presentations - PropertiesDTO: + RetireRequest: type: object properties: id: type: string - title: + contractId: type: string - value: + baseTokenId: + type: string + owner: + type: string + oppositeTokenId: type: string - required: - - id - - title - - value - RecordStatusDTO: + baseTokenCount: + type: number + oppositeTokenCount: + type: number + Module: type: object properties: - type: - type: string - policyId: + id: type: string uuid: type: string + name: + type: string + description: + type: string + config: + type: object status: type: string - required: - - type - - policyId - - uuid - - status - RecordActionDTO: - type: object - properties: - uuid: + creator: type: string - policyId: + owner: type: string - method: + topicId: type: string - action: + messageId: type: string - time: + codeVersion: type: string - user: + createDate: type: string - target: + type: type: string - required: - - uuid - - policyId - - method - - action - - time - - user - - target - ResultInfoDTO: + PreviewModule: type: object properties: - tokens: - type: number - documents: - type: number - required: - - tokens - - documents - ResultDocumentDTO: + module: + $ref: '#/components/schemas/Module' + ExportModule: type: object properties: - type: + uuid: type: string - schema: + name: type: string - rate: + description: type: string - documents: - type: object - required: - - type - - schema - - rate - - documents - RunningResultDTO: + messageId: + type: string + owner: + type: string + PublishModule: type: object properties: - info: - $ref: '#/components/schemas/ResultInfoDTO' - total: - type: number - documents: - $ref: '#/components/schemas/ResultDocumentDTO' - required: - - info - - total - - documents - RunningDetailsDTO: + errors: + type: object + isValid: + type: boolean + module: + $ref: '#/components/schemas/Module' + ValidateModule: type: object properties: - left: - type: object - right: - type: object - total: - type: number - documents: + module: + $ref: '#/components/schemas/Module' + results: type: object - required: - - left - - right - - total - - documents - RoleDTO: + Tag: type: object + required: + - name + - entity + - localTarget properties: uuid: type: string example: 00000000-0000-0000-0000-000000000000 name: type: string - example: Name + example: Tag label description: type: string example: Description owner: type: string - example: >- - #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 - permissions: + example: did + entity: type: string - enum: &ref_38 - - ANALYTIC_POLICY_READ - - ANALYTIC_MODULE_READ - - ANALYTIC_TOOL_READ - - ANALYTIC_SCHEMA_READ - - ANALYTIC_DOCUMENT_READ - - ARTIFACTS_FILE_READ - - ARTIFACTS_FILE_CREATE - - ARTIFACTS_FILE_DELETE - - CONTRACTS_CONTRACT_READ - - CONTRACTS_CONTRACT_EXECUTE - - CONTRACTS_CONTRACT_MANAGE - - MODULES_MODULE_READ - - MODULES_MODULE_CREATE - - MODULES_MODULE_UPDATE - - MODULES_MODULE_DELETE - - MODULES_MODULE_REVIEW - - POLICIES_POLICY_READ - - POLICIES_POLICY_CREATE - - POLICIES_POLICY_UPDATE - - POLICIES_POLICY_DELETE - - POLICIES_POLICY_REVIEW - - POLICIES_POLICY_EXECUTE - - POLICIES_POLICY_MANAGE - - SCHEMAS_SCHEMA_READ - - SCHEMAS_SCHEMA_CREATE - - SCHEMAS_SCHEMA_UPDATE - - SCHEMAS_SCHEMA_DELETE - - SCHEMAS_SCHEMA_REVIEW - - TOOLS_TOOL_READ - - TOOLS_TOOL_CREATE - - TOOLS_TOOL_UPDATE - - TOOLS_TOOL_DELETE - - TOOLS_TOOL_REVIEW - - TOKENS_TOKEN_READ - - TOKENS_TOKEN_CREATE - - TOKENS_TOKEN_UPDATE - - TOKENS_TOKEN_DELETE - - TOKENS_TOKEN_EXECUTE - - TOKENS_TOKEN_MANAGE - - TAGS_TAG_READ - - TAGS_TAG_CREATE - - SUGGESTIONS_SUGGESTIONS_READ - - SUGGESTIONS_SUGGESTIONS_UPDATE - - PERMISSIONS_ROLE_READ - - PERMISSIONS_ROLE_CREATE - - PERMISSIONS_ROLE_UPDATE - - PERMISSIONS_ROLE_DELETE - - PERMISSIONS_ROLE_MANAGE - - ACCESS_POLICY_ALL - - ACCESS_POLICY_ASSIGNED - - ACCESS_POLICY_PUBLISHED - - ACCESS_POLICY_ASSIGNED_AND_PUBLISHED - - DELEGATION_ROLE_MANAGE - example: - - POLICIES_POLICY_READ - required: - - uuid - - name - - description - - owner - - permissions - PermissionsDTO: - type: object - properties: - name: + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000000' + localTarget: type: string - enum: *ref_38 - example: ANALYTIC_POLICY_READ - category: + example: db id + status: type: string enum: - - ACCOUNTS - - SESSION - - PROFILES - - ANALYTIC - - ARTIFACTS - - POLICIES - - BRANDING - - CONTRACTS - - DEMO - - IPFS - - LOG - - MODULES - - SETTINGS - - SUGGESTIONS - - TAGS - - SCHEMAS - - TOKENS - - AUDIT - - TOOLS - - PERMISSIONS - - ACCESS - - DELEGATION - example: ANALYTIC - entity: + - Draft + - Published + - History + example: Published + operation: type: string enum: - - ACCOUNT - - STANDARD_REGISTRY - - USER - - BALANCE - - RESTORE - - RECORD - - POLICY - - TOOL - - DOCUMENT - - SCHEMA - - MODULE - - FILE - - CONFIG - - CONTRACT - - WIPE_REQUEST - - WIPE_ADMIN - - WIPE_MANAGER - - WIPER - - POOL - - RETIRE_REQUEST - - RETIRE_ADMIN - - PERMISSIONS - - KEY - - LOG - - MIGRATION - - SETTINGS - - SUGGESTIONS - - TAG - - SYSTEM_SCHEMA - - THEME - - TOKEN - - TRUST_CHAIN - - ROLE - example: POLICY - action: + - Create + - Delete + example: Create + date: + type: string + example: '1900-01-01T00:00:00.000Z' + topicId: + type: string + example: 0.0.0000000 + messageId: + type: string + example: '0000000000.000000000' + policyId: + type: string + example: db id + uri: + type: string + example: document uri + document: + type: object + TagMap: + type: object + required: + - entity + - target + - refreshDate + - tags + properties: + entity: type: string enum: - - ALL - - READ - - CREATE - - UPDATE - - DELETE - - REVIEW - - AUDIT - - EXECUTE - - MANAGE - - ASSIGNED - - PUBLISHED - - ASSIGNED_AND_PUBLISHED - example: READ - disabled: - type: boolean - example: false - dependOn: - example: - - POLICIES_POLICY_READ + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: db id + refreshDate: + type: string + example: '1900-01-01T00:00:00.000Z' + tags: type: array items: - type: string + $ref: '#/components/schemas/Tag' + Theme: + type: object required: + - uuid - name - - category - - entity - - action - - disabled - - dependOn - AssignPolicyDTO: + - rules + properties: + id: + type: string + example: db id + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Theme name + rules: + type: array + items: + type: object + required: + - text + - background + - border + - shape + - borderWidth + - filterType + - filterValue + properties: + description: + type: string + example: description + text: + type: string + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + background: + type: string + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + border: + type: string + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + shape: + type: string + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + example: '0' + borderWidth: + type: string + enum: + - 0px + - 1px + - 2px + - 3px + - 4px + - 5px + - 6px + - 7px + example: 2px + filterType: + type: string + enum: + - type + - api + - role + example: type + filterValue: + oneOf: + - type: string + - type: array + items: + type: string + example: + - type + WizardConfig: type: object + required: + - policy + - roles + - schemas + - trustChain properties: - policyIds: - example: - - '000000000000000000000001' + roles: type: array items: type: string - assign: - type: boolean - example: true - required: - - policyIds - - assign + policy: + type: object + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + type: array + items: + type: object + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string + trustChain: + type: array + items: + type: object + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean diff --git a/docs/.gitbook/assets/swagger-indexer.yaml b/docs/.gitbook/assets/swagger-indexer.yaml new file mode 100644 index 0000000000..7a4b6ad2c5 --- /dev/null +++ b/docs/.gitbook/assets/swagger-indexer.yaml @@ -0,0 +1,6086 @@ +openapi: 3.0.0 +paths: + /search: + get: + operationId: SearchApi_search + summary: Search + description: Full-text indexer search + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: search + required: true + in: query + description: Search phrase + example: Project + schema: + type: string + responses: + '200': + description: Search results + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/SearchItemDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - search + /entities/registries: + get: + operationId: EntityApi_getRegistries + summary: Get standard registries + description: Returns standard registries + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: >- + Search registries, which are related to specific topic + identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Global topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.did + required: false + in: query + description: Registry did + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: options.registrantTopicId + required: false + in: query + description: Registry user topic identifier + example: 0.0.4481265 + schema: + type: string + responses: + '200': + description: Registries + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RegistryDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_0 + - entities + /entities/registries/{messageId}: + get: + operationId: EntityApi_getRegistry + summary: Get registry + description: Returns registry + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Registry details + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/registry-users: + get: + operationId: EntityApi_getRegistryUsers + summary: Get registry users + description: Returns registry users + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: >- + Search registry users, which are related to specific topic + identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: User topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Registry users + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RegistryUserGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/registry-users/{messageId}: + get: + operationId: EntityApi_getRegistryUser + summary: Get registry user + description: Returns registry user + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Registry user details + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryUserDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/policies: + get: + operationId: EntityApi_getPolicies + summary: Get policies + description: Returns policies + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search policies, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Policy owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.tools + required: false + in: query + description: Tool + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Policies + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/policies/{messageId}: + get: + operationId: EntityApi_getPolicy + summary: Get policy + description: Returns policy + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Policy details + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tools: + get: + operationId: EntityApi_getTools + summary: Get tools + description: Returns tools + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search tools, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.owner + required: false + in: query + description: Tool owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Tools + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tools/{messageId}: + get: + operationId: EntityApi_getTool + summary: Get tool + description: Returns tool + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Tool details + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/modules: + get: + operationId: EntityApi_getModules + summary: Get modules + description: Returns modules + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search modules, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.owner + required: false + in: query + description: Module owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Modules + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/modules/{messageId}: + get: + operationId: EntityApi_getModule + summary: Get module + description: Returns module + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Module details + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas: + get: + operationId: EntityApi_getSchemas + summary: Get schemas + description: Returns schemas + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search schemas, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Schema owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: Schemas + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/SchemaGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas/{messageId}: + get: + operationId: EntityApi_getSchema + summary: Get schema + description: Returns schema + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Schema details + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas/{messageId}/tree: + get: + operationId: EntityApi_getSchemaTree + summary: Get schema tree + description: Returns schema tree + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Schema tree + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaTreeDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tokens: + get: + operationId: EntityApi_getTokens + summary: Get tokens + description: Returns tokens + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: tokenId + required: false + in: query + description: Token identifier + example: 0.0.1960 + schema: + type: string + - name: treasury + required: false + in: query + description: Treasury + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Tokens + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tokens/{tokenId}: + get: + operationId: EntityApi_getToken + summary: Get token + description: Returns token + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Token details + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/roles: + get: + operationId: EntityApi_getRoles + summary: Get roles + description: Returns roles + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search roles, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Roles + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RoleDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/roles/{messageId}: + get: + operationId: EntityApi_getRole + summary: Get role + description: Returns role + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Role details + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents: + get: + operationId: EntityApi_getDidDocuments + summary: Get DIDs + description: Returns DIDs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search DIDs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.did + required: false + in: query + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: DIDs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/DIDGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents/{messageId}: + get: + operationId: EntityApi_getDidDocument + summary: Get DID + description: Returns DID + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: DID details + content: + application/json: + schema: + $ref: '#/components/schemas/DIDDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents/{messageId}/relationships: + get: + operationId: EntityApi_getDidRelationships + summary: Get DID relationships + description: Returns DID relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: DID relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents: + get: + operationId: EntityApi_getVpDocuments + summary: Get VPs + description: Returns VPs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VPs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaIds + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VPs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VPGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents/{messageId}: + get: + operationId: EntityApi_getVpDocument + summary: Get VP + description: Returns VP + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VP details + content: + application/json: + schema: + $ref: '#/components/schemas/VPDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents/{messageId}/relationships: + get: + operationId: EntityApi_getVpRelationships + summary: Get VP relationships + description: Returns VP relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VP relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents: + get: + operationId: EntityApi_getVcDocuments + summary: Get VCs + description: Returns VCs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VCs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaId + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + - name: options.relationships + required: false + in: query + description: Relationships + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VCs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VCGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents/{messageId}: + get: + operationId: EntityApi_getVcDocument + summary: Get VC + description: Returns VC + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VC details + content: + application/json: + schema: + $ref: '#/components/schemas/VCDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents/{messageId}/relationships: + get: + operationId: EntityApi_getVcRelationships + summary: Get VC relationships + description: Returns VC relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VC relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/nfts: + get: + operationId: EntityApi_getNFTs + summary: Get NFTs + description: Returns NFTs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: tokenId + required: false + in: query + description: Token identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: NFTs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/NFTDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/nfts/{tokenId}/{serialNumber}: + get: + operationId: EntityApi_getNFT + summary: Get NFT + description: Returns NFT + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1960 + schema: + type: string + - name: serialNumber + required: true + in: path + description: Serial number + example: '1' + schema: + type: string + responses: + '200': + description: NFT details + content: + application/json: + schema: + $ref: '#/components/schemas/NFTDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/topics: + get: + operationId: EntityApi_getTopics + summary: Get topics + description: Returns topics + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search topics, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.parentId + required: false + in: query + description: Parent topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Topics + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/TopicDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/topics/{topicId}: + get: + operationId: EntityApi_getTopic + summary: Get topic + description: Returns topic + parameters: + - name: topicId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Topic details + content: + application/json: + schema: + $ref: '#/components/schemas/TopicDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/contracts: + get: + operationId: EntityApi_getContracts + summary: Get contracts + description: Returns contracts + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search contracts, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: owner + required: false + in: query + description: Owner + example: 0.0.2160 + schema: + type: string + responses: + '200': + description: Contracts + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ContractDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/contracts/{messageId}: + get: + operationId: EntityApi_getContract + summary: Get contract + description: Returns contract + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Contract details + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /landing/analytics: + get: + operationId: LandingApi_getOnboardingStat + summary: Get landing page analytics + description: >- + Returns count of registries, methodologies, projects, totalIssuance, + date + parameters: [] + responses: + '200': + description: Landing page analytics result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LandingAnalyticsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_1 + - landing + /landing/projects-coordinates: + get: + operationId: LandingApi_getProjectCoordinates + summary: Get projects coordinates + description: Returns all project coordinates + parameters: [] + responses: + '200': + description: Projects coordinates result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectCoordinatesDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + /analytics/search/policy: + post: + operationId: AnalyticsApi_search + summary: Search policy + description: Returns search policy result + parameters: [] + requestBody: + required: true + description: Search policy parameters + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPolicyParamsDTO' + responses: + '200': + description: Search policy result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchPolicyResultDTO' + '422': + description: Unprocessable entity + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - analytics +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine + (PWE) that enables applications to offer a requirements-based tokenization + implementation. + version: 2.26.2 + contact: + name: API developer + url: https://envisionblockchain.com + email: info@envisionblockchain.com + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +tags: [] +servers: + - url: /api/v1 + description: version 1.0 +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + PageDTO: + type: object + properties: + pageIndex: + type: number + description: Page index + example: '0' + pageSize: + type: number + description: Page size + example: '10' + total: + type: number + description: Total size + example: '100' + order: + type: object + description: Order + required: + - pageIndex + - pageSize + - total + - order + SearchItemDTO: + type: object + properties: + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + type: + type: string + description: Message type + example: VC-Document + required: + - consensusTimestamp + - type + InternalServerErrorDTO: + type: object + properties: + code: + type: number + example: 500 + message: + type: string + example: Error message + required: + - code + - message + RegistryOptionsDTO: + type: object + properties: + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + registrantTopicId: + type: string + description: Registrant topic id + lang: + type: string + description: Lang + attributes: + type: object + description: Attributes + required: + - did + - registrantTopicId + - lang + - attributes + RegistryAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + RegistryDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: &ref_2 + - QmYtKEVfpbDwn7XLHjnjap224ESi3vLiYpkbWoabnxs6cX + type: array + items: + type: string + topics: + description: Topics + example: &ref_3 + - 0.0.4481265 + type: array + items: + type: string + tokens: + description: Tokens + example: &ref_4 + - 0.0.4481265 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Standard Registry + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: Init + options: + $ref: '#/components/schemas/RegistryOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RawMessageDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + status: + type: string + description: Status + example: LOADED + lastUpdate: + type: number + description: Last update + example: 1716755852055 + message: + type: string + description: Message + example: >- + eyJpZCI6ImVhYTYyOWZmLWM4NmItNDEyZS1iYzYwLWM4NDk2OTJkMDBiYiIsInN0YXR1cyI6IklTU1VFIiwidHlwZSI6IlN0YW5kYXJkIFJlZ2lzdHJ5IiwiYWN0aW9uIjoiSW5pdCIsImxhbmciOiJlbi1VUyIsImRpZCI6ImRpZDpoZWRlcmE6dGVzdG5ldDpBYkd6Q3hpRzRlZ0xibldCUERpaHdMUVIza0tLcnNGNmJnSDdUdmVGYjI3bl8wLjAuMjE3NiIsInRvcGljSWQiOiIwLjAuMjE3NiIsImF0dHJpYnV0ZXMiOnsiZ2VvZ3JhcGh5IjoidGVzdCIsImxhdyI6InRlc3R0ZXMiLCJ0YWdzIjoidGVzdCJ9fQ + sequenceNumber: + type: number + description: Sequence number + example: 2 + owner: + type: string + description: Owner + example: 0.0.1914 + chunkId: + type: string + description: Chunk identifier + example: '1706817694.014944860' + chunkNumber: + type: number + description: Chunk number + example: 1 + chunkTotal: + type: number + description: Chunk total + example: 1 + type: + type: string + description: Type + example: Message + data: + type: string + description: Data + example: >- + `{"id":"eaa629ff-c86b-412e-bc60-c849692d00bb","status":"ISSUE","type":"Standard + Registry","action":"Init","lang":"en-US","did":"did:hedera:testnet:AbGzCxiG4egLbnWBPDihwLQR3kKKrsF6bgH7TveFb27n_0.0.2176","topicId":"0.0.2176","attributes":{"geography":"test","law":"testtes","tags":"test"}}` + required: + - id + - consensusTimestamp + - topicId + - status + - lastUpdate + - message + - sequenceNumber + - owner + - chunkId + - chunkNumber + - chunkTotal + - type + - data + RegistryActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + policies: + type: number + description: Policies + example: 10 + roles: + type: number + description: Roles + example: 10 + tools: + type: number + description: Tools + example: 10 + modules: + type: number + description: Modules + example: 10 + tokens: + type: number + description: Tokens + example: 10 + users: + type: number + description: Registry users + example: 10 + contracts: + type: number + description: Contracts + example: 10 + required: + - vcs + - vps + - policies + - roles + - tools + - modules + - tokens + - users + - contracts + RegistryDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RegistryDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RegistryActivityDTO' + required: + - id + - uuid + - item + - row + - activity + RegistryUserOptionsDTO: + type: object + properties: + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - did + RegistryUserAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + RegistryUserGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/RegistryUserOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryUserAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RegistryUserDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/RegistryUserOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryUserAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + RegistryUserActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - vcs + - vps + - roles + RegistryUserDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RegistryUserDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RegistryUserActivityDTO' + required: + - id + - uuid + - item + - row + - activity + PolicyOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Verra REDD + description: + type: string + description: Description + example: Verra REDD Policy + topicDescription: + type: string + description: Topic description + example: Verra REDD Policy Topic + version: + type: string + description: Version + example: 1.0.0 + policyTag: + type: string + description: Policy tag + example: Verra_REDD + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + policyTopicId: + type: string + description: Policy topic identifier + example: 0.0.4481265 + instanceTopicId: + type: string + description: Policy instance topic identifier + example: 0.0.4481265 + synchronizationTopicId: + type: string + description: Synchronization topic identifier + example: 0.0.4481265 + discontinuedDate: + type: string + description: Discontinued date + example: '2024-02-27T16:32:08.513Z' + required: + - uuid + - name + - description + - topicDescription + - version + - policyTag + - owner + - policyTopicId + - instanceTopicId + - synchronizationTopicId + - discontinuedDate + PolicyAnalyticsDTO: + type: object + properties: + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + tokens: + description: Tokens + example: + - 0.0.4481265 + type: array + items: + type: string + vcCount: + type: number + description: VC count + example: 10 + vpCount: + type: number + description: VP count + example: 10 + tokensCount: + type: number + description: Tokens count + example: 10 + tags: + description: Tags + example: + - iRec + type: array + items: + type: string + hash: + type: string + description: Hash + example: DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or + hashMap: + type: object + description: Hash map + tools: + description: Tools + example: + - '1706823227.586179534' + type: array + items: + type: string + registryId: + type: string + description: Registry identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - owner + - tokens + - vcCount + - vpCount + - tokensCount + - tags + - hash + - hashMap + - tools + - registryId + - textSearch + PolicyDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Policy + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-policy + options: + $ref: '#/components/schemas/PolicyOptionsDTO' + analytics: + $ref: '#/components/schemas/PolicyAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + PolicyActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - schemas + - vcs + - vps + - roles + PolicyDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/PolicyDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/PolicyActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ToolOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Tool 16 + description: + type: string + description: Description + example: Tool 16 + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + hash: + type: string + description: Hash + example: 71ZWDSX2cUPsye4AuMUqXUhgk1XBDnpi4Ky1mtjYqYom + toolTopicId: + type: string + description: Tool topic identifier + example: 0.0.4481265 + tagsTopicId: + type: string + description: Tags topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - hash + - toolTopicId + - tagsTopicId + ToolAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ToolDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Tool + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-tool + options: + $ref: '#/components/schemas/ToolOptionsDTO' + analytics: + $ref: '#/components/schemas/ToolAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + ToolActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + policies: + type: number + description: Policies + example: 10 + required: + - schemas + - policies + ToolDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ToolDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/ToolActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ModuleOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Grid module + description: + type: string + description: Description + example: Grid module + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + moduleTopicId: + type: string + description: Module topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - moduleTopicId + ModuleAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ModuleDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Module + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-module + options: + $ref: '#/components/schemas/ModuleOptionsDTO' + analytics: + $ref: '#/components/schemas/ModuleAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + ModuleDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ModuleDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + required: + - id + - uuid + - item + - row + SchemaOptionsDTO: + type: object + properties: + name: + type: string + description: Name + example: Monitoring report + description: + type: string + description: Description + example: Monitoring report schema + entity: + type: string + description: Entity + example: VC + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + version: + type: string + description: Version + example: 1.0.0 + codeVersion: + type: string + description: Code version + example: 1.0.0 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + required: + - name + - description + - entity + - owner + - uuid + - version + - codeVersion + - relationships + SchemaGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Schema + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-schema + options: + $ref: '#/components/schemas/SchemaOptionsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + ChildSchemaDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + name: + type: string + description: Name + example: Project Details + required: + - id + - name + SchemaAnalyticsDTO: + type: object + properties: + policyIds: + description: Policy message identifiers + example: + - '1706823227.586179534' + type: array + items: + type: string + childSchemas: + $ref: '#/components/schemas/ChildSchemaDTO' + properties: + description: Schema properties + example: + - ActivityImpactModule.projectScope + type: array + items: + type: string + textSearch: + type: string + description: Text search + required: + - policyIds + - childSchemas + - properties + - textSearch + SchemaDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Schema + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-schema + options: + $ref: '#/components/schemas/SchemaOptionsDTO' + analytics: + $ref: '#/components/schemas/SchemaAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + {"$id":"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0","$comment":"{ + \"@id\": \"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\", + \"term\": \"d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\" + }","title":"tagSchemaAPI339404","description":"tagSchemaAPI339404","type":"object","properties":{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["@context","type"],"additionalProperties":false,"$defs":{}} + - >- + {"@context":{"@version":1.1,"@vocab":"https://w3id.org/traceability/#undefinedTerm","id":"@id","type":"@type","d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0":{"@id":"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0","@context":{}}}} + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + SchemaActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + required: + - vcs + - vps + SchemaDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/SchemaDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/SchemaActivityDTO' + required: + - id + - uuid + - item + - row + - activity + SchemaTreeNodeDataDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + color: + type: string + description: Color + example: '#FFFFFF' + required: + - id + - color + SchemaTreeNodeDTO: + type: object + properties: + label: + type: string + description: Label + example: Monitoring Report + expanded: + type: boolean + description: Expanded + example: true + data: + $ref: '#/components/schemas/SchemaTreeNodeDataDTO' + children: + type: object + description: Schema tree node children + required: + - label + - expanded + - data + - children + SchemaTreeDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/SchemaGridDTO' + root: + $ref: '#/components/schemas/SchemaTreeNodeDTO' + required: + - id + - item + - root + TokenDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + tokenId: + type: string + description: Token identifier + example: 0.0.4481265 + status: + type: string + description: Status + example: UPDATED + lastUpdate: + type: number + description: Last update + example: 1716755852055 + serialNumber: + type: number + description: Serial number + example: 1 + hasNext: + type: boolean + description: Has next + example: false + name: + type: string + description: Name + example: iRec Token + symbol: + type: string + description: Symbol + example: iRec + type: + type: string + description: Symbol + enum: + - NON_FUNGIBLE_UNIQUE + - FUNGIBLE_COMMON + treasury: + type: string + description: Treasury + example: 0.0.1 + memo: + type: string + description: Memo + example: 0.0.2952745 + totalSupply: + type: object + description: Total supply + example: '77' + decimals: + type: string + description: Decimals + example: '2' + required: + - id + - tokenId + - status + - lastUpdate + - serialNumber + - hasNext + - name + - symbol + - type + - treasury + - memo + - totalSupply + - decimals + TokenDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + row: + $ref: '#/components/schemas/TokenDTO' + required: + - id + - row + RoleOptionsDTO: + type: object + properties: + role: + type: string + description: Role + example: Registrant + group: + type: string + description: Role + example: Registrants + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - role + - group + - issuer + RoleAnalyticsDTO: + type: object + properties: + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - policyId + - textSearch + RoleDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Role-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vc-document + options: + $ref: '#/components/schemas/RoleOptionsDTO' + analytics: + $ref: '#/components/schemas/RoleAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RoleActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + required: + - vcs + RoleDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RoleDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RoleActivityDTO' + required: + - id + - uuid + - item + - row + - activity + DIDOptionsDTO: + type: object + properties: + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - relationships + - did + DIDAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + DIDGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/DIDOptionsDTO' + analytics: + $ref: '#/components/schemas/DIDAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + DIDDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/DIDOptionsDTO' + analytics: + $ref: '#/components/schemas/DIDAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + DIDDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/DIDDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/DIDDetailsItemDTO' + required: + - id + - uuid + - item + - row + - history + MessageDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + RelationshipDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + category: + type: number + description: Category + example: 1 + name: + type: string + description: Name + example: Monitoring Report Document + required: + - id + - uuid + - type + - category + - name + RelationshipLinkDTO: + type: object + properties: + source: + type: string + description: Source message identifier + example: '1706823227.586179534' + target: + type: string + description: Target message identifier + example: '1706823227.586179534' + required: + - source + - target + RelationshipsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/MessageDTO' + target: + $ref: '#/components/schemas/RelationshipDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/RelationshipDTO' + links: + type: array + items: + $ref: '#/components/schemas/RelationshipLinkDTO' + categories: + description: Categories + example: + - name: Registry + - name: Policy + - name: Schema + - name: Role + - name: VC + - name: VP + type: array + items: + type: string + required: + - id + - item + - target + - relationships + - links + - categories + VPOptionsDTO: + type: object + properties: + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + required: + - issuer + - relationships + VPGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VP-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vp-document + options: + $ref: '#/components/schemas/VPOptionsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + VPAnalyticsDTO: + type: object + properties: + schemaIds: + description: Schema message identifiers + example: + - '1706823227.586179534' + type: array + items: + type: string + schemaNames: + description: Schema names + example: + - Monitoring Report + type: array + items: + type: string + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - schemaIds + - schemaNames + - policyId + - textSearch + VPDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VP-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vp-document + options: + $ref: '#/components/schemas/VPOptionsDTO' + analytics: + $ref: '#/components/schemas/VPAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"id":"urn:uuid:2c374b67-fda5-4023-97c2-c0782624573f","type":["VerifiablePresentation"],"@context":["https://www.w3.org/2018/credentials/v1"],"verifiableCredential":[{"id":"urn:uuid:ff0aecbd-d358-4e5b-b99b-7a87ba38a3b2","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438","issuanceDate":"2024-02-06T05:40:37.795Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi"],"credentialSubject":[{"finalMintAmount":5,"policyId":"65bc691d2ae9d0f1ef2db3bc","ref":"urn:uuid:11b1ad6f-8b4f-4d61-a63a-cc9e6532625f","@context":["ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi"],"id":"urn:uuid:5d253a1d-456a-4fb1-8b45-257e1db2e668","type":"601a68c4-66c3-407c-bc88-1b5841e6d1da&1.0.0"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:37Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..UvTeKVUVUxH1SFNNoyu_VXf4kFqDIFzFPJaaq5adiSHrBePLQMQv7dM_Fq23z7UGHSmXlodBen1Ujcdi-am5DQ"}},{"id":"urn:uuid:b76fbd72-48b7-45fb-b152-7ec13d11eafb","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438","issuanceDate":"2024-02-06T05:40:45.066Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu"],"credentialSubject":[{"date":"2024-02-06T05:40:45.021Z","tokenId":"0.0.1621155","amount":"5","@context":["ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu"],"type":"MintToken"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:45Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..5hWYO3NA0Q9zI0oS1lLOpofQI-DTQVM0sd4GUQV-UUSlBug3EgYYBm7247LCzlCRt9VpYsUh7SxIrsgHzsSRDA"}}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:45Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"authentication","challenge":"123","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Mu5BaQ34idnqG6d-aMqufQOXcuWHMkv6N9Z2zhBi9Yfd7jU9FFkwi-Xjyf-Kastr7vVWBNLwGxB-bPRf4UEHAg"}}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + VPDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/VPDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + required: + - id + - uuid + - item + - row + - history + VCOptionsDTO: + type: object + properties: + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + documentStatus: + type: string + description: Document status + example: Approved + encodedData: + type: boolean + description: Encoded EVC data + required: + - issuer + - relationships + - documentStatus + - encodedData + VCAnalyticsDTO: + type: object + properties: + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + schemaId: + type: string + description: Schema message identifier + example: '1706823227.586179534' + schemaName: + type: string + description: Schema name + example: Monitoring Report + textSearch: + type: string + description: Text search + required: + - policyId + - schemaId + - schemaName + - textSearch + VCGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VC-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vc-document + options: + $ref: '#/components/schemas/VCOptionsDTO' + analytics: + $ref: '#/components/schemas/VCAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + VCDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VC-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vc-document + options: + $ref: '#/components/schemas/VCOptionsDTO' + analytics: + $ref: '#/components/schemas/VCAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"id":"urn:uuid:229f8416-db6b-4d68-90da-38a5355126f5","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223","issuanceDate":"2024-02-02T10:06:53.300Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"credentialSubject":[{"@context":["ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"id":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223","type":"StandardRegistry"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-02T10:06:53Z","verificationMethod":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YElNPdCNkj8wzABUNgWYo3Yge0qrGA2KbxBWDKBzACJJe70ItIZsgbIQUHMnFbcKpXB1cSnHQ-H5WH_7uZ_3CQ"}}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + VCDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/VCDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/VCDetailsItemDTO' + schema: + type: object + description: VC Schema + example: + $id: '#StandardRegistry' + $comment: '{ "@id": "#StandardRegistry", "term": "StandardRegistry" }' + title: StandardRegistry + description: StandardRegistry + type: object + properties: + '@context': + oneOf: + - type: string + - type: array + items: + type: string + readOnly: true + type: + oneOf: + - type: string + - type: array + items: + type: string + readOnly: true + id: + type: string + readOnly: true + geography: + $comment: '{"term": "geography", "@id": "https://www.schema.org/text"}' + title: geography + description: geography + type: string + readOnly: false + law: + $comment: '{"term": "law", "@id": "https://www.schema.org/text"}' + title: law + description: law + type: string + readOnly: false + tags: + $comment: '{"term": "tags", "@id": "https://www.schema.org/text"}' + title: tags + description: tags + type: string + readOnly: false + ISIC: + $comment: '{"term": "ISIC", "@id": "https://www.schema.org/text"}' + title: ISIC + description: ISIC + type: string + readOnly: false + required: + - geography + - law + - tags + additionalProperties: false + required: + - id + - uuid + - item + - row + - history + - schema + NFTDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + tokenId: + type: string + description: Token identifier + example: 0.0.4481265 + lastUpdate: + type: number + description: Last update + example: 1716755852055 + serialNumber: + type: number + description: Serial number + example: 1 + metadata: + type: string + description: metadata + example: '1706823227.586179534' + required: + - id + - tokenId + - lastUpdate + - serialNumber + - metadata + NFTDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + row: + $ref: '#/components/schemas/NFTDTO' + history: + type: array + description: NFT transaction history + items: + type: object + example: + - consensus_timestamp: '1707292471.903596642' + nonce: 0 + transaction_id: 0.0.1533323-1707292459-175375906 + type: CRYPTOTRANSFER + is_approval: false + receiver_account_id: 0.0.1842221 + sender_account_id: 0.0.1533323 + - consensus_timestamp: '1707292470.199625477' + nonce: 0 + transaction_id: 0.0.1533323-1707292458-093221893 + type: TOKENMINT + is_approval: false + receiver_account_id: 0.0.1533323 + sender_account_id: null + required: + - id + - row + - history + TopicOptionsDTO: + type: object + properties: + name: + type: string + description: Name + example: Policy topic + description: + type: string + description: Name + example: Verra REDD Policy topic + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + messageType: + type: string + description: Message type + enum: + - USER_TOPIC + - POLICY_TOPIC + - INSTANCE_POLICY_TOPIC + - DYNAMIC_TOPIC + - SCHEMA_TOPIC + - SYNCHRONIZATION_TOPIC + - RETIRE_TOPIC + - TOKEN_TOPIC + - MODULE_TOPIC + - CONTRACT_TOPIC + - TOOL_TOPIC + - TAGS_TOPIC + childId: + type: string + description: Child topic identifier + example: 0.0.4481265 + parentId: + type: string + description: Parent topic identifier + example: 0.0.4481265 + rationale: + type: string + description: Rationale + example: '1706895596.736882433' + required: + - name + - description + - owner + - messageType + - childId + - parentId + - rationale + TopicAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + TopicDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Topic + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-topic + options: + $ref: '#/components/schemas/TopicOptionsDTO' + analytics: + $ref: '#/components/schemas/TopicAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RawTopicDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + lastUpdate: + type: number + description: Last update + example: 1716755852055 + messages: + type: number + description: Messages + example: 25 + hasNext: + type: boolean + description: Has next + example: false + required: + - id + - topicId + - lastUpdate + - messages + - hasNext + TopicActivityDTO: + type: object + properties: + registries: + type: number + description: Registries + example: 10 + topics: + type: number + description: Topics + example: 10 + policies: + type: number + description: Policies + example: 10 + tools: + type: number + description: Tools + example: 10 + modules: + type: number + description: Modules + example: 10 + tokens: + type: number + description: Tokens + example: 10 + dids: + type: number + description: DIDs + example: 10 + contracts: + type: number + description: Contracts + example: 10 + schemas: + type: number + description: Schemas + example: 10 + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - registries + - topics + - policies + - tools + - modules + - tokens + - dids + - contracts + - schemas + - vcs + - vps + - roles + TopicDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/TopicDTO' + row: + $ref: '#/components/schemas/RawTopicDTO' + activity: + $ref: '#/components/schemas/TopicActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ContractOptionsDTO: + type: object + properties: + contractId: + type: string + description: Contract identifier + example: 0.0.4481265 + description: + type: string + description: Description + example: Wipe contract + contractType: + type: string + description: Contract type + enum: + - WIPE + - RETIRE + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - contractId + - description + - contractType + - owner + ContractAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ContractDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Contract + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-contract + options: + $ref: '#/components/schemas/ContractOptionsDTO' + analytics: + $ref: '#/components/schemas/ContractAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + ContractDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ContractDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + required: + - id + - uuid + - item + - row + LandingAnalyticsDTO: + type: object + properties: + registries: + type: number + description: Registries count + example: '10' + methodologies: + type: number + description: Methodologies count + example: '10' + projects: + type: number + description: Projects count + example: '10' + totalIssuance: + type: number + description: Total issuance + example: '10' + date: + format: date-time + type: string + description: ISO Date + example: '2024-06-12T14:17:26.689Z' + required: + - registries + - methodologies + - projects + - totalIssuance + - date + ProjectCoordinatesDTO: + type: object + properties: + coordinates: + type: string + description: Coordinates of project + example: 33.33|77.77 + projectId: + type: string + description: Project message identifier + example: '1706823227.586179534' + required: + - coordinates + - projectId + SearchPolicyBlocksDTO: + type: object + properties: + hash: + type: string + description: Hash + example: DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or + hashMap: + type: object + description: Hash map + threshold: + type: number + description: Threshold + example: 10 + required: + - hash + - hashMap + - threshold + SearchPolicyParamsDTO: + type: object + properties: + text: + type: string + description: Text + minVcCount: + type: number + description: Mint VC count + example: 10 + minVpCount: + type: number + description: Mint VP count + example: 10 + minTokensCount: + type: number + description: Mint tokens count + example: 10 + threshold: + type: number + description: Threshold + example: 10 + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + blocks: + $ref: '#/components/schemas/SearchPolicyBlocksDTO' + required: + - text + - minVcCount + - minVpCount + - minTokensCount + - threshold + - owner + - blocks + SearchPolicyResultDTO: + type: object + properties: + type: + type: string + description: Type + example: Global + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Verra REDD + description: + type: string + description: Description + example: Verra REDD Policy + version: + type: string + description: Version + example: 1.0.0 + status: + type: string + description: Status + example: PUBLISH + messageId: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + textSearch: + type: string + description: Text search + registryId: + type: string + description: Registry identifier + example: '1706823227.586179534' + vcCount: + type: number + description: VC count + example: 10 + vpCount: + type: number + description: VP count + example: 10 + tokensCount: + type: number + description: Token count + example: 10 + rate: + type: number + description: Rate + example: 50 + minimum: 0 + maximum: 100 + tags: + description: tags + example: + - iRec + type: array + items: + type: string + required: + - type + - topicId + - uuid + - name + - description + - version + - status + - messageId + - owner + - textSearch + - registryId + - vcCount + - vpCount + - tokensCount + - rate + - tags diff --git a/docs/.gitbook/assets/swagger.yaml b/docs/.gitbook/assets/swagger.yaml index 53b5add454..71a7b53bf4 100644 --- a/docs/.gitbook/assets/swagger.yaml +++ b/docs/.gitbook/assets/swagger.yaml @@ -1,12519 +1,15088 @@ -openapi: 3.0.0 -paths: - /accounts/session: - get: - operationId: AccountApi_getSession - summary: Returns current session of the user. - description: Returns current user session. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsSessionResponseDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_0 - - accounts - security: - - bearerAuth: [] - /accounts/register: - post: - operationId: AccountApi_register - summary: Registers a new user account. - description: Object that contain username, password and role (optional) fields. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterUserDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsResponseDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - /accounts/login: - post: - operationId: AccountApi_login - summary: Logs user into the system. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/LoginUserDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsSessionResponseDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - /accounts/access-token: - post: - operationId: AccountApi_getAccessToken - summary: Returns access token. - description: Returns access token. - parameters: [] - responses: - '200': - description: Successful operation. - tags: *ref_0 - /accounts: - get: - operationId: AccountApi_getAllAccounts - summary: Returns a list of users, excluding Standard Registry and Auditors. - description: >- - Returns all users except those with roles Standard Registry and Auditor. - Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsResponseDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearerAuth: [] - /accounts/standard-registries: - get: - operationId: AccountApi_getStandatdRegistries - summary: Returns all Standard Registries. - description: Returns all Standard Registries. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsResponseDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearerAuth: [] - /accounts/standard-registries/aggregated: - get: - operationId: AccountApi_getAggregatedStandardRegistries - summary: Returns all Standard Registries aggregated with polices and vcDocuments. - description: Returns all Standard Registries aggregated with polices and vcDocuments - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/AggregatedDTOItem' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearerAuth: [] - /accounts/balance: - get: - operationId: AccountApi_getBalance - summary: Returns user's Hedera account balance. - description: Requests current Hedera account balance. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/BalanceResponseDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_0 - security: - - bearerAuth: [] - /analytics/search/policies: - post: - operationId: AnalyticsApi_searchPolicies - summary: Search policies. - description: >- - Search policies. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSearchPoliciesDTO' - examples: - Filter: - value: - policyId: '000000000000000000000000' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SearchPoliciesDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_1 - - analytics - security: - - bearerAuth: [] - /analytics/compare/policies: - post: - operationId: AnalyticsApi_comparePolicies - summary: Compare policies. - description: >- - Compare policies. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterPoliciesDTO' - examples: - Filter1: - value: - policyId1: '000000000000000000000001' - policyId2: '000000000000000000000002' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - Filter2: - value: - policyIds: - - '000000000000000000000001' - - '000000000000000000000002' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ComparePoliciesDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/modules: - post: - operationId: AnalyticsApi_compareModules - summary: Compare modules. - description: >- - Compare modules. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterModulesDTO' - examples: - Filter: - value: - moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000002' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareModulesDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/schemas: - post: - operationId: AnalyticsApi_compareSchemas - summary: Compare schemas. - description: >- - Compare schemas. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSchemasDTO' - examples: - Filter: - value: - schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000002' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareSchemasDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/documents: - post: - operationId: AnalyticsApi_compareDocuments - summary: Compare documents. - description: >- - Compare documents. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterDocumentsDTO' - examples: - Filter1: - value: - documentId1: '000000000000000000000001' - documentId2: '000000000000000000000002' - Filter2: - value: - documentIds: - - '000000000000000000000001' - - '000000000000000000000002' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareDocumentsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/tools: - post: - operationId: AnalyticsApi_compareTools - summary: Compare tools. - description: >- - Compare tools. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterToolsDTO' - examples: - Filter1: - value: - toolId1: '000000000000000000000001' - toolId2: '000000000000000000000002' - Filter2: - value: - toolIds: - - '000000000000000000000001' - - '000000000000000000000002' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareToolsDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/policies/export: - post: - operationId: AnalyticsApi_comparePoliciesExport - summary: Compare policies. - description: >- - Compare policies. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterPoliciesDTO' - examples: - Filter1: - value: - policyId1: '000000000000000000000001' - policyId2: '000000000000000000000002' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - Filter2: - value: - policyIds: - - '000000000000000000000001' - - '000000000000000000000002' - eventsLvl: '0' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/modules/export: - post: - operationId: AnalyticsApi_compareModulesExport - summary: Compare modules. - description: >- - Compare modules. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterModulesDTO' - examples: - Filter: - value: - moduleId1: '000000000000000000000001' - moduleId2: '000000000000000000000002' - propLvl: '0' - childrenLvl: '0' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/schemas/export: - post: - operationId: AnalyticsApi_compareSchemasExport - summary: Compare schemas. - description: >- - Compare schemas. Only users with the Standard Registry role are allowed - to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSchemasDTO' - examples: - Filter: - value: - schemaId1: '000000000000000000000001' - schemaId2: '000000000000000000000002' - idLvl: '0' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/documents/export: - post: - operationId: AnalyticsApi_compareDocumentsExport - summary: Compare documents. - description: >- - Compare documents. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterDocumentsDTO' - examples: - Filter1: - value: - documentId1: '000000000000000000000001' - documentId2: '000000000000000000000002' - Filter2: - value: - documentIds: - - '000000000000000000000001' - - '000000000000000000000002' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/compare/tools/export: - post: - operationId: AnalyticsApi_compareToolsExport - summary: Compare tools. - description: >- - Compare tools. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterToolsDTO' - examples: - Filter1: - value: - toolId1: '000000000000000000000001' - toolId2: '000000000000000000000002' - Filter2: - value: - toolIds: - - '000000000000000000000001' - - '000000000000000000000002' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /analytics/search/blocks: - post: - operationId: AnalyticsApi_searchBlocks - summary: Search same blocks. - description: >- - Search same blocks. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterSearchPoliciesDTO' - examples: - Filter: - value: - uuid: '' - config: {} - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SearchPoliciesDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_1 - security: - - bearerAuth: [] - /artifacts: - get: - tags: - - artifacts - description: Returns all artifacts. - security: - - bearerAuth: [] - summary: Returns all artifacts. - parameters: - - in: query - name: policyId - schema: - type: string - description: Policy identifier - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Artifact' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /artifacts/{parentId}: - post: - operationId: ArtifactApi_uploadArtifacts - summary: Upload artifact. - description: Upload artifact. For users with the Standard Registry role only. - parameters: - - name: parentId - required: true - in: path - description: Parent ID - schema: - type: string - requestBody: - required: true - description: Form data with artifacts. - content: - multipart/form-data: - schema: - type: array - items: - type: object - properties: - artifacts: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ArtifactDTOItem' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - artifacts - security: - - bearerAuth: [] - /artifacts/{artifactId}: - delete: - tags: - - artifacts - description: Delete artifact. - security: - - bearerAuth: [] - summary: Delete artifact. - parameters: - - in: path - name: artifactId - schema: - type: string - required: true - description: Artifact identifier - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /contracts: - get: - operationId: ContractsApi_getContracts - summary: Return a list of all contracts. - description: Returns all contracts. - parameters: - - name: type - required: true - in: query - description: Contract type - example: RETIRE - schema: - enum: - - WIPE - - RETIRE - type: string - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: pageIndex - required: true - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - responses: - '200': - description: Contracts. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ContractDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_2 - - contracts - security: - - bearerAuth: [] - post: - operationId: ContractsApi_createContract - summary: Create contract. - description: >- - Create smart-contract. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - description: - type: string - responses: - '201': - description: Created contract. - content: - application/json: - schema: - $ref: '#/components/schemas/ContractDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/import: - post: - operationId: ContractsApi_importContract - summary: Import contract. - description: >- - Import smart-contract. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - contractId: - type: string - description: Hedera Identifier - example: 0.0.1 - description: - type: string - required: - - contractId - responses: - '200': - description: Imported contract. - content: - application/json: - schema: - $ref: '#/components/schemas/ContractDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/{contractId}/permissions: - get: - operationId: ContractsApi_contractPermissions - summary: Get contract permissions. - description: >- - Get smart-contract permissions. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Contract permissions. - content: - application/json: - schema: - type: number - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/{contractId}: - delete: - operationId: ContractsApi_removeContract - summary: Remove contract. - description: >- - Remove smart-contract. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/requests: - get: - operationId: ContractsApi_getWipeRequests - summary: Return a list of all wipe requests. - description: >- - Returns all wipe requests. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: query - description: Contract identifier - example: 0.0.1 - schema: - type: string - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: pageIndex - required: true - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/WiperRequestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/{contractId}/requests/enable: - post: - operationId: ContractsApi_enableWipeRequests - summary: Enable wipe requests. - description: >- - Enable wipe contract requests. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/{contractId}/requests/disable: - post: - operationId: ContractsApi_disableWipeRequests - summary: Disable wipe requests. - description: >- - Disable wipe contract requests. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/requests/{requestId}/approve: - post: - operationId: ContractsApi_approveWipeRequest - summary: Approve wipe request. - description: >- - Approve wipe contract request. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/requests/{requestId}/reject: - delete: - operationId: ContractsApi_rejectWipeRequest - summary: Reject wipe request. - description: >- - Reject wipe contract request. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: ban - required: true - in: query - description: Reject and ban - schema: - type: boolean - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/{contractId}/requests: - delete: - operationId: ContractsApi_clearWipeRequests - summary: Clear wipe requests. - description: >- - Clear wipe contract requests. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/{contractId}/admin/{hederaId}: - post: - operationId: ContractsApi_wipeAddAdmin - summary: Add wipe admin. - description: >- - Add wipe contract admin. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - delete: - operationId: ContractsApi_wipeRemoveAdmin - summary: Remove wipe admin. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/{contractId}/manager/{hederaId}: - post: - operationId: ContractsApi_wipeAddManager - summary: Add wipe manager. - description: >- - Add wipe contract manager. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - delete: - operationId: ContractsApi_wipeRemoveManager - summary: Remove wipe manager. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/wipe/{contractId}/wiper/{hederaId}: - post: - operationId: ContractsApi_wipeAddWiper - summary: Add wipe wiper. - description: >- - Add wipe contract wiper. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - delete: - operationId: ContractsApi_wipeRemoveWiper - summary: Remove wipe wiper. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/{contractId}/pools/sync: - post: - operationId: ContractsApi_retireSyncPools - summary: Sync retire pools. - description: >- - Sync retire contract pools. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Sync date. - content: - application/json: - schema: - $ref: '#/components/schemas/Date' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/requests: - get: - operationId: ContractsApi_getRetireRequests - summary: Return a list of all retire requests. - description: Returns all retire requests. - parameters: - - name: contractId - required: true - in: query - description: Contract identifier - example: 0.0.1 - schema: - type: string - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: pageIndex - required: true - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RetireRequestDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/pools: - get: - operationId: ContractsApi_getRetirePools - summary: Return a list of all retire pools. - description: Returns all retire pools. - parameters: - - name: tokens - required: true - in: query - description: Tokens - example: 0.0.1,0.0.2,0.0.3 - schema: - type: string - - name: contractId - required: true - in: query - description: Contract identifier - example: 0.0.1 - schema: - type: string - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: pageIndex - required: true - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RetirePoolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/{contractId}/requests: - delete: - operationId: ContractsApi_clearRetireRequests - summary: Clear retire requests. - description: >- - Clear retire contract requests. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/{contractId}/pools: - delete: - operationId: ContractsApi_clearRetirePools - summary: Clear retire pools. - description: >- - Clear retire contract pools. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - post: - operationId: ContractsApi_setRetirePool - summary: Set retire pool. - description: >- - Set retire contract pool. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RetirePoolTokenDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RetirePoolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/pools/{poolId}: - delete: - operationId: ContractsApi_unsetRetirePool - summary: Unset retire pool. - description: >- - Unset retire contract pool. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: poolId - required: true - in: path - description: Pool Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/requests/{requestId}: - delete: - operationId: ContractsApi_unsetRetireRequest - summary: Unset retire request. - description: >- - Unset retire contract request. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: requestId - required: true - in: path - description: Request Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/pools/{poolId}/retire: - post: - operationId: ContractsApi_retire - summary: Retire tokens. - description: Retire tokens. - parameters: - - name: poolId - required: true - in: path - description: Pool Identifier - example: 652745597a7b53526de37c05 - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/RetireRequestTokenDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/requests/{requestId}/approve: - post: - operationId: ContractsApi_approveRetire - summary: Approve retire request. - description: >- - Approve retire contract request. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/requests/{requestId}/cancel: - delete: - operationId: ContractsApi_cancelRetireRequest - summary: Cancel retire request. - description: Cancel retire contract request. - parameters: - - name: requestId - required: true - in: path - description: Request identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire/{contractId}/admin/{hederaId}: - post: - operationId: ContractsApi_retireAddAdmin - summary: Add retire admin. - description: >- - Add retire contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - delete: - operationId: ContractsApi_retireRemoveAdmin - summary: Remove wipe admin. - description: >- - Remove wipe contract admin. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: hederaId - required: true - in: path - description: Hedera identifier - example: 0.0.1 - schema: - type: string - - name: contractId - required: true - in: path - description: Contract identifier - example: 652745597a7b53526de37c05 - schema: - type: string - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /contracts/retire: - get: - operationId: ContractsApi_getRetireVCs - summary: Return a list of all retire vcs. - description: Returns all retire vcs. - parameters: - - name: pageSize - required: true - in: query - description: The numbers of items to return - example: 20 - schema: - type: number - - name: pageIndex - required: true - in: query - description: >- - The number of pages to skip before starting to collect the result - set - example: 0 - schema: - type: number - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_2 - security: - - bearerAuth: [] - /demo/registered-users: - get: - operationId: DemoApi_registeredUsers - summary: Returns list of registered users. - description: Returns list of registered users. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RegisteredUsersDTO' - tags: - - demo - /demo/random-key: - get: - tags: - - demo - description: Generates a new Hedera account with a random private key. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/HederaAccount' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /demo/push/random-key: - get: - tags: - - demo - description: Generates a new Hedera account with a random private key. - security: - - bearerAuth: [] - summary: Generates a new Hedera account with a random private key. - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /external: - post: - tags: - - external - description: Sends data from an external source. - summary: Sends data from an external source. - requestBody: - description: Object that contains a VC Document. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ExternalData' - responses: - '200': - description: Successful operation. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /ipfs/file: - post: - operationId: IpfsApi_postFile - summary: Add file from ipfs. - description: Add file from ipfs. - parameters: [] - responses: - '401': - description: Unauthorized - tags: &ref_3 - - ipfs - security: - - bearerAuth: [] - /ipfs/file/dry-run/{policyId}: - post: - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - operationId: IpfsApi_postFileDryRun - summary: Add file from ipfs for dry run mode. - description: Add file from ipfs for dry run mode. - responses: - '401': - description: Unauthorized - tags: *ref_3 - security: - - bearerAuth: [] - /ipfs/file/{cid}: - get: - tags: - - ipfs - description: Get file from ipfs. - summary: Get file from ipfs. - parameters: - - in: path - name: cid - schema: - type: string - required: true - description: File CID. - security: - - bearerAuth: [] - responses: - '201': - description: Created. - content: - binary/octet-stream: - schema: - type: string - format: binary - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /ipfs/file/{cid}/dry-run: - get: - operationId: IpfsApi_getFileDryRun - summary: Get file from ipfs for dry run mode. - description: Get file from ipfs for dry run mode. - parameters: - - name: cid - required: true - in: path - schema: - type: string - responses: - '401': - description: Unauthorized - tags: *ref_3 - security: - - bearerAuth: [] - /logs: - post: - tags: - - logs - description: Returns logs. For users with the Standard Registry role only. - security: - - bearerAuth: [] - requestBody: - description: Log filters. - content: - application/json: - schema: - $ref: '#/components/schemas/LogFilters' - summary: Returns logs. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - totalCount: - type: number - logs: - $ref: '#/components/schemas/Log' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /logs/attributes: - get: - tags: - - logs - description: Returns logs attributes. For users with the Standard Registry role only. - parameters: - - in: query - name: name - schema: - type: string - description: Part of name. - - in: query - name: existingAttributes - schema: - type: array - items: - type: string - description: Attributes to exclude. - security: - - bearerAuth: [] - summary: Returns logs attributes. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /map/key: - get: - tags: - - maps - description: Returns map api key. - security: - - bearerAuth: [] - summary: Returns map api key. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /map/sh: - get: - operationId: MapApi_getSentinelKey - parameters: [] - responses: - '200': - description: '' - tags: - - map - /metrics: - get: - operationId: MetricsApi_getMetrics - parameters: [] - responses: - '200': - description: '' - tags: - - metrics - /modules: - get: - tags: - - modules - description: >- - Returns all modules. Only users with the Standard Registry and Installer - role are allowed to make the request. - security: - - bearerAuth: [] - summary: Return a list of all modules. - parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - modules - description: >- - Creates a new module. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Creates a new module. - requestBody: - description: Object that contains module configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - responses: - '201': - description: Created. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/schemas: - get: - operationId: ModulesApi_getModuleSchemas - parameters: [] - responses: - '200': - description: '' - tags: &ref_4 - - modules - post: - operationId: ModulesApi_postSchemas - parameters: [] - responses: - '201': - description: '' - tags: *ref_4 - /modules/{uuid}: - get: - tags: - - modules - description: >- - Retrieves module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Selected module ID. - summary: Retrieves module configuration. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - tags: - - modules - description: >- - Updates module configuration for the specified module ID. Only users - with the Standard Registry role are allowed to make the request. - summary: Updates module configuration. - parameters: - - in: path - name: uuid - description: Selected module ID. - required: true - schema: - type: string - requestBody: - description: Object that contains module configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - tags: - - modules - description: >- - Deletes the module with the provided module ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Module ID. - security: - - bearerAuth: [] - summary: Deletes the module. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/menu: - get: - tags: - - modules - description: >- - Returns modules menu. Only users with the Standard Registry and - Installer role are allowed to make the request. - security: - - bearerAuth: [] - summary: Return a list of modules. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Module' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/{uuid}/export/file: - get: - tags: - - modules - description: >- - Returns a zip file containing the published module and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Selected module ID. - security: - - bearerAuth: [] - summary: >- - Return module and its artifacts in a zip file format for the specified - module. - responses: - '200': - description: Successful operation. Response zip file - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/{uuid}/export/message: - get: - tags: - - modules - description: >- - Returns the Hedera message ID for the specified module published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Selected module ID. - security: - - bearerAuth: [] - summary: Return Heder message ID for the specified published module. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportModule' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/import/message: - post: - tags: - - modules - description: >- - Imports new module and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - security: - - bearerAuth: [] - summary: Imports new module from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the module. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '201': - description: Created. - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/import/file: - post: - tags: - - modules - description: >- - Imports new module and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Imports new module from a zip file. - requestBody: - description: >- - A zip file that contains the module and associated schemas and VCs to - be imported. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - responses: - '201': - description: Created. - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/import/message/preview: - post: - tags: - - modules - description: >- - Previews the module from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - summary: Module preview from IPFS. - security: - - bearerAuth: [] - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the module. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PreviewModule' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/import/file/preview: - post: - tags: - - modules - description: >- - Previews the module from a zip file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - summary: Module preview from a zip file. - security: - - bearerAuth: [] - requestBody: - description: >- - A zip file that contains the module and associated schemas and VCs to - be viewed. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PreviewModule' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/{uuid}/publish: - put: - tags: - - modules - description: >- - Publishes the module with the specified (internal) module ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - in: path - name: uuid - schema: - type: string - required: true - description: Selected module ID. - summary: Publishes the module onto IPFS. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PublishModule' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /modules/validate: - post: - tags: - - modules - description: >- - Validates selected module. Only users with the Standard Registry role - are allowed to make the request. - security: - - bearerAuth: [] - summary: Validates module. - requestBody: - description: Object that contains module configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Module' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ValidateModule' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tools: - post: - operationId: ToolsApi_createNewTool - summary: Creates a new tool. - description: >- - Creates a new tool. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_5 - - tools - security: - - bearerAuth: [] - get: - operationId: ToolsApi_getTools - summary: Return a list of all tools. - description: >- - Returns all tools. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: pageSize - required: true - in: query - description: The numbers of items to return - schema: - type: number - - name: pageIndex - required: true - in: query - description: >- - The number of pages to skip before starting to collect the result - set - schema: - type: number - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/push: - post: - operationId: ToolsApi_createNewToolAsync - summary: Creates a new tool. - description: >- - Creates a new tool. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/{id}: - delete: - operationId: ToolsApi_deleteTool - summary: >- - Deletes the tool with the provided tool ID. Only users with the Standard - Registry role are allowed to make the request. - description: Deletes the tool. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - get: - operationId: ToolsApi_getToolById - summary: Retrieves tool configuration. - description: >- - Retrieves tool configuration for the specified tool ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - put: - operationId: ToolsApi_updateTool - summary: Updates tool configuration. - description: >- - Updates tool configuration for the specified tool ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/{id}/publish: - put: - operationId: ToolsApi_publishTool - summary: Publishes the tool onto IPFS. - description: >- - Publishes the tool with the specified (internal) tool ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/{id}/push/publish: - put: - operationId: ToolsApi_publishToolAsync - summary: Publishes the tool onto IPFS. - description: >- - Publishes the tool with the specified (internal) tool ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/validate: - post: - operationId: ToolsApi_validateTool - summary: Validates selected tool. - description: >- - Validates selected tool. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/{id}/export/file: - get: - operationId: ToolsApi_toolExportFile - summary: >- - Return tool and its artifacts in a zip file format for the specified - tool. - description: >- - Returns a zip file containing the published tool and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. Response zip file. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/{id}/export/message: - get: - operationId: ToolsApi_toolExportMessage - summary: Return Heder message ID for the specified published tool. - description: >- - Returns the Hedera message ID for the specified tool published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - name: id - required: true - in: path - description: Tool ID - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/import/message/preview: - post: - operationId: ToolsApi_toolImportMessagePreview - summary: Imports new tool from IPFS. - description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/import/message: - post: - operationId: ToolsApi_toolImportMessage - summary: Imports new tool from IPFS. - description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/import/file/preview: - post: - operationId: ToolsApi_toolImportFilePreview - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/import/file: - post: - operationId: ToolsApi_toolImportFile - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/import/file-metadata: - post: - operationId: ToolsApi_toolImportFileWithMetadata - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Form data with tool file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ToolDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/push/import/file: - post: - operationId: ToolsApi_toolImportFileAsync - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/push/import/file-metadata: - post: - operationId: ToolsApi_toolImportFileWithMetadataAsync - summary: Imports new tool from a zip file. - description: >- - Imports new tool and all associated artifacts, such as schemas and VCs, - from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Form data with tool file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/push/import/message: - post: - operationId: ToolsApi_toolImportMessageAsync - summary: Imports new tool from IPFS. - description: >- - Imports new tool and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /tools/menu/all: - get: - operationId: ToolsApi_getMenu - summary: Return a list of tools. - description: >- - Returns tools menu. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_5 - security: - - bearerAuth: [] - /profiles/{username}: - get: - operationId: ProfileApi_getProfile - summary: Returns user account info. - description: >- - Returns user account information. For users with the Standard Registry - role it also returns address book and VC document information. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to fetch the information - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ProfileDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_6 - - profiles - security: - - bearerAuth: [] - put: - operationId: ProfileApi_setUserProfile - summary: Sets Hedera credentials for the user. - description: >- - Sets Hedera credentials for the user. For users with the Standard - Registry role it also creates an address book. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to update the information. - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Created. - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearerAuth: [] - - /profiles/push/{username}: - put: - operationId: ProfileApi_setUserProfileAsync - summary: Sets Hedera credentials for the user. - description: >- - Sets Hedera credentials for the user. For users with the Standard - Registry role it also creates an address book. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to update the information. - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearerAuth: [] - - /profiles/{username}/balance: - get: - operationId: ProfileApi_getUserBalance - summary: Returns user's Hedera account balance. - description: >- - Requests Hedera account balance. Only users with the Installer role are - allowed to make the request. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to fetch the balance. - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearerAuth: [] - - /profiles/restore/{username}: - put: - operationId: ProfileApi_restoreUserProfile - summary: Restore user data (policy, DID documents, VC documents). - description: Restore user data (policy, DID documents, VC documents). - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to restore the information. - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearerAuth: [] - - /profiles/restore/topics/{username}: - put: - operationId: ProfileApi_restoreTopic - summary: List of available recovery topics. - description: List of available recovery topics. - parameters: - - name: username - required: true - in: path - description: The name of the user for whom to restore the information. - schema: - type: string - requestBody: - required: true - description: Object that contains the Hedera account data. - content: - application/json: - schema: - $ref: '#/components/schemas/CredentialsDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearerAuth: [] - - /profiles/did-document/validate: - post: - operationId: ProfileApi_validateDidDocument - summary: Validate DID document format. - description: Validate DID document format. - parameters: [] - requestBody: - required: true - description: DID Document. - content: - application/json: - schema: - $ref: '#/components/schemas/DidDocumentDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/DidDocumentStatusDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearerAuth: [] - - /profiles/did-keys/validate: - post: - operationId: ProfileApi_validateDidKeys - summary: Validate DID document keys. - description: Validate DID document keys. - parameters: [] - requestBody: - required: true - description: DID Document and keys. - content: - application/json: - schema: - $ref: '#/components/schemas/DidDocumentWithKeyDTO' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/DidKeyStatusDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_6 - security: - - bearerAuth: [] - - /policies: - get: - tags: - - policies - description: >- - Returns all policies. Only users with the Standard Registry and - Installer role are allowed to make the request. - security: - - bearerAuth: [] - summary: Return a list of all policies. - parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - allOf: - - $ref: '#/components/schemas/PolicyConfig' - - type: object - properties: - userRoles: - type: array - items: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - policies - description: >- - Creates a new policy. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Creates a new policy. - requestBody: - description: Object that contains policy configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyConfig' - responses: - '201': - description: Created. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/migrate-data: - post: - operationId: PolicyApi_migrateData - summary: Migrate policy data. - description: >- - Migrate policy data. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - description: Migration config. - content: - application/json: - schema: - $ref: '#/components/schemas/MigrationConfigDTO' - responses: - '200': - description: Errors while migration. - content: - application/json: - schema: - type: array - items: - type: object - properties: - error: - type: string - id: - type: string - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_7 - - policies - security: - - bearerAuth: [] - /policies/push/migrate-data: - post: - operationId: PolicyApi_migrateDataAsync - summary: Migrate policy data asynchronous. - description: >- - Migrate policy data asynchronous. Only users with the Standard Registry - role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: Migration config. - content: - application/json: - schema: - $ref: '#/components/schemas/MigrationConfigDTO' - responses: - '202': - description: Created task. - content: - application/json: - schema: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - /policies/push: - post: - tags: - - policies - description: >- - Creates a new policy. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Creates a new policy. - requestBody: - description: Object that contains policy configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyConfig' - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/push/{policyId}: - post: - operationId: PolicyApi_updatePolicyAsync - summary: '' - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - delete: - operationId: PolicyApi_deletePolicyAsync - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '202': - description: '' - tags: *ref_7 - security: - - bearerAuth: [] - /policies/{policyId}: - get: - tags: - - policies - description: >- - Retrieves policy configuration for the specified policy ID. Only users - with the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - summary: Retrieves policy configuration. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/PolicyConfig' - - type: object - properties: - userRoles: - type: array - items: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - tags: - - policies - description: >- - Updates policy configuration for the specified policy ID. Only users - with the Standard Registry role are allowed to make the request. - summary: Updates policy configuration. - parameters: - - in: path - name: policyId - description: Selected policy ID. - required: true - schema: - type: string - requestBody: - description: Object that contains policy configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyConfig' - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/publish: - put: - tags: - - policies - description: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - policyVersion: - type: string - summary: Publishes the policy onto IPFS. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PublishPolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/push/{policyId}/publish: - put: - tags: - - policies - description: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. Only users with the Standard Registry role are allowed to make - the request. - security: - - bearerAuth: [] - summary: >- - Publishes the policy with the specified (internal) policy ID onto IPFS, - sends a message featuring its IPFS CID into the corresponding Hedera - topic. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - policyVersion: - type: string - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run: - put: - tags: - - policies - description: >- - Run policy without making any persistent changes or executing - transaction. Only users with the Standard Registry role are allowed to - make the request. - security: - - bearerAuth: [] - summary: Dry Run policy. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '201': - description: Created. - content: - application/json: - schema: - $ref: '#/components/schemas/PublishPolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/discontinue: - put: - operationId: PolicyApi_discontinuePolicy - summary: Discontunue policy. - description: >- - Discontunue policy. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy identifier. - schema: {} - requestBody: - required: true - description: Discontinue details. - content: - application/json: - schema: - type: object - properties: - date: - type: number - responses: - '200': - description: Policies. - content: - application/json: - schema: - type: array - items: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - bearerAuth: [] - /policies/{policyId}/draft: - put: - tags: - - policies - description: >- - Return policy to editing. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Return policy to editing. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PublishPolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/validate: - post: - tags: - - policies - description: >- - Validates selected policy. Only users with the Standard Registry role - are allowed to make the request. - security: - - bearerAuth: [] - summary: Validates policy. - requestBody: - description: Object that contains policy configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyConfig' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ValidatePolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/navigation: - get: - operationId: PolicyApi_getPolicyNavigation - summary: Returns a policy navigation. - description: Returns a policy navigation. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - /policies/{policyId}/groups: - get: - tags: - - policies - description: Returns a list of groups the user is a member of. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - summary: Returns a list of groups the user is a member of. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - uuid: - type: string - role: - type: string - groupLabel: - type: string - groupName: - type: string - active: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - policies - description: >- - Makes the selected group active. if UUID is not set then returns the - user to the default state. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - summary: Makes the selected group active. - requestBody: - description: Selected group. - required: true - content: - application/json: - schema: - type: object - properties: - uuid: - type: string - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/documents: - get: - operationId: PolicyApi_getPolicyDocuments - summary: Get policy documents. - description: >- - Get policy documents. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: pageSize - required: true - in: query - description: Page size. - schema: - type: number - - name: pageIndex - required: true - in: query - description: Page index. - schema: - type: number - - name: type - required: true - in: query - description: Document type. - schema: - enum: - - VC - - VP - type: string - - name: includeDocument - required: true - in: query - description: Include document field. - schema: - type: boolean - - name: policyId - required: true - in: path - description: Policy identifier. - schema: {} - responses: - '200': - description: Documents. - headers: - X-Total-Count: - description: Total documents count. - schema: - type: number - content: - application/json: - schema: - type: array - items: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - bearerAuth: [] - /policies/{policyId}/blocks: - get: - tags: - - policies - description: >- - Returns data from the root policy block. Only users with the Standard - Registry and Installer role are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - summary: Retrieves data for the policy root block. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyBlock' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/blocks/{uuid}: - get: - tags: - - policies - description: >- - Requests block data. Only users with a role that described in block are - allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - - in: path - name: uuid - schema: - type: string - required: true - description: Selected block UUID. - summary: Requests block data. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyBlockData' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - policies - description: Sends data to the specified block. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - - in: path - name: uuid - schema: - type: string - required: true - description: Selected block UUID. - summary: Sends data to the specified block. - requestBody: - description: Object with the data to be sent to the block. - required: true - content: - application/json: - schema: - type: object - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/tag/{tagName}/blocks: - post: - operationId: PolicyApi_setBlocksByTagName - summary: Sends data to the specified block. - description: Sends data to the specified block. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: tagName - schema: - type: string - required: true - description: Tag name. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - bearerAuth: [] - get: - operationId: PolicyApi_getBlocksByTagName - summary: Requests block data. - description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: tagName - schema: - type: string - required: true - description: Tag name. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - bearerAuth: [] - /policies/{policyId}/tag/{tagName}: - get: - operationId: PolicyApi_getBlockByTagName - summary: Requests block data. - description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: tagName - schema: - type: string - required: true - description: Tag name. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - bearerAuth: [] - /policies/{policyId}/blocks/{uuid}/parents: - get: - operationId: PolicyApi_getBlockParents - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: uuid - schema: - type: string - required: true - description: uuid. - responses: - '200': - description: '' - tags: *ref_7 - /policies/{policyId}/export/file: - get: - tags: - - policies - description: >- - Returns a zip file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - security: - - bearerAuth: [] - summary: >- - Return policy and its artifacts in a zip file format for the specified - policy. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportPolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/export/message: - get: - tags: - - policies - description: >- - Returns the Hedera message ID for the specified policy published onto - IPFS. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - security: - - bearerAuth: [] - summary: Return Heder message ID for the specified published policy. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportPolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/export/xlsx: - get: - operationId: PolicyApi_getPolicyExportXlsx - summary: >- - Return policy and its artifacts in a xlsx file format for the specified - policy. - description: >- - Returns a xlsx file containing the published policy and all associated - artifacts, i.e. schemas and VCs. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - /policies/import/message: - post: - tags: - - policies - description: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: - - in: query - name: versionOfTopicId - schema: - type: string - description: The topic ID of policy version. - examples: - pageIndex: - summary: Example of a topic ID of policy version. - value: 0.0.00000001 - security: - - bearerAuth: [] - summary: Imports new policy from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the Policy. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '201': - description: Created. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/push/import/message: - post: - tags: - - policies - description: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - security: - - bearerAuth: [] - summary: >- - Imports new policy and all associated artifacts from IPFS into the local - DB. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the Policy. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/import/message/preview: - post: - tags: - - policies - description: >- - Previews the policy from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - summary: Policy preview from IPFS. - security: - - bearerAuth: [] - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the policy. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PreviewPolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/push/import/message/preview: - post: - tags: - - policies - description: >- - Previews the policy from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Previews the policy from IPFS without loading it into the local DB. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the policy. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/import/file: - post: - tags: - - policies - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - in: query - name: versionOfTopicId - schema: - type: string - description: The topic ID of policy version. - examples: - pageIndex: - summary: Example of a topic ID of policy version. - value: 0.0.00000001 - security: - - bearerAuth: [] - summary: Imports new policy from a zip file. - requestBody: - description: >- - A zip file that contains the policy and associated schemas and VCs to - be imported. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - responses: - '201': - description: Created. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/import/file-metadata: - post: - operationId: PolicyApi_importPolicyFromFileWithMetadata - summary: Imports new policy from a zip file with metadata. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: true - in: query - description: Topic Id - schema: - type: string - requestBody: - required: true - description: Form data with policy file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - policyFile: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - /policies/push/import/file: - post: - tags: - - policies - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. - requestBody: - description: >- - A zip file that contains the policy and associated schemas and VCs to - be imported. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/push/import/file-metadata: - post: - operationId: PolicyApi_importPolicyFromFileWithMetadataAsync - summary: Imports new policy from a zip file with metadata. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided zip file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: versionOfTopicId - required: true - in: query - description: Topic Id - schema: - type: string - requestBody: - required: true - description: Form data with policy file and metadata. - content: - multipart/form-data: - schema: - type: object - properties: - policyFile: - type: string - format: binary - metadata: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - /policies/import/file/preview: - post: - tags: - - policies - description: >- - Previews the policy from a zip file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - summary: Policy preview from a zip file. - security: - - bearerAuth: [] - requestBody: - description: >- - A zip file that contains the policy and associated schemas and VCs to - be viewed. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PreviewPolicy' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/import/xlsx: - post: - operationId: PolicyApi_importPolicyFromXlsx - summary: Imports new policy from a xlsx file. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided xlsx file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: query - description: Policy Id - schema: - type: string - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - /policies/push/import/xlsx: - post: - operationId: PolicyApi_importPolicyFromXlsxAsync - summary: Imports new policy from a xlsx file. - description: >- - Imports new policy and all associated artifacts, such as schemas and - VCs, from the provided xlsx file into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - name: policyId - required: true - in: query - description: Policy Id - schema: - type: string - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - /policies/import/xlsx/preview: - post: - operationId: PolicyApi_importPolicyFromXlsxPreview - summary: Policy preview from a xlsx file. - description: >- - Previews the policy from a xlsx file without loading it into the local - DB. Only users with the Standard Registry role are allowed to make the - request. - parameters: [] - requestBody: - required: true - description: A xlsx file containing policy config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - security: - - bearerAuth: [] - - /policies/blocks/about: - get: - operationId: PolicyApi_getBlockAbout - parameters: [] - responses: - '200': - description: '' - tags: *ref_7 - /policies/{policyId}/dry-run/users: - get: - tags: - - policies - description: >- - Returns all virtual users. Only users with the Standard Registry role - are allowed to make the request. - security: - - bearerAuth: [] - summary: Returns all virtual users. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: object - properties: - username: - type: string - did: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/user: - post: - tags: - - policies - description: >- - Create a new virtual account. Only users with the Standard Registry role - are allowed to make the request. - security: - - bearerAuth: [] - summary: Create a new virtual account. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: object - properties: - username: - type: string - did: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/login: - post: - tags: - - policies - description: >- - Logs virtual user into the system. Only users with the Standard Registry - role are allowed to make the request. - security: - - bearerAuth: [] - summary: Logs virtual user into the system. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - requestBody: - description: Virtual user - required: true - content: - application/json: - schema: - type: object - properties: - did: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: object - properties: - username: - type: string - did: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/restart: - post: - tags: - - policies - description: >- - Restarts the execution of the policy. Clear data in database. Only users - with the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Restarts the execution of the policy. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/transactions: - get: - tags: - - policies - description: >- - Returns lists of virtual transactions. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Returns lists of virtual transactions. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: object - properties: - createDate: - type: string - type: - type: string - hederaAccountId: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/artifacts: - get: - tags: - - policies - description: >- - Returns lists of virtual artifacts. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Returns lists of virtual artifacts. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: object - properties: - createDate: - type: string - type: - type: string - owner: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/dry-run/ipfs: - get: - tags: - - policies - description: >- - Returns lists of virtual artifacts. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Returns lists of virtual artifacts. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - type: object - properties: - createDate: - type: string - documentURL: - type: string - document: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/multiple: - post: - tags: - - policies - description: >- - Creates a link between the current policy and the main policy. Or - creates a group making the current policy the main one. - security: - - bearerAuth: [] - summary: Creates Multi policy config. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - requestBody: - description: Multi policy config. - required: true - content: - application/json: - schema: - type: object - required: - - mainPolicyTopicId - - synchronizationTopicId - properties: - mainPolicyTopicId: - type: string - synchronizationTopicId: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/MultiPolicyConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - tags: - - policies - description: Requests Multi policy config. - security: - - bearerAuth: [] - summary: Requests Multi policy config. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/MultiPolicyConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/methodologies/categories: - get: - operationId: PolicyApi_getPolicyCategoriesAsync - summary: Get all categories - description: Get all categories - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PolicyCategoryDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - /policies/methodologies/search: - post: - operationId: PolicyApi_getPoliciesByCategory - summary: Get filtered policies - description: Get policies by categories and text - parameters: [] - requestBody: - required: true - description: Filters - content: - application/json: - schema: - type: string - examples: - Filter1: - value: - categoryIds: - - '000000000000000000000001' - - '000000000000000000000002' - text: abc - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_7 - /schema/{schemaId}: - get: - tags: - - schema - description: Returns schema by schema ID. - security: - - bearerAuth: [] - summary: Returns schema by schema ID. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schema/{schemaId}/parents: - get: - operationId: SingleSchemaApi_getSchemaParents - summary: Returns all parent schemas. - description: Returns all parent schemas. - parameters: - - name: schemaId - required: true - in: path - description: Schema identifier - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_8 - - schema - security: - - bearerAuth: [] - /schema/{schemaId}/tree: - get: - operationId: SingleSchemaApi_getSchemaTree - summary: Returns schema tree. - description: Returns schema tree. - parameters: - - name: schemaId - required: true - in: path - description: Schema identifier - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - name: - type: string - type: - type: string - children: - type: array - items: - type: object - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_8 - security: - - bearerAuth: [] - /schemas: - get: - tags: - - schemas - description: Returns all schemas. - security: - - bearerAuth: [] - summary: Returns all schemas. - parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{topicId}: - post: - tags: - - schemas - description: >- - Creates new schema. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - in: path - name: topicId - schema: - type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - security: - - bearerAuth: [] - summary: Create new schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '201': - description: Created. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - tags: - - schemas - description: Returns all schemas by topicId. - security: - - bearerAuth: [] - summary: Returns all schemas by topicId. - parameters: - - in: path - name: topicId - schema: - type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/type/{schemaType}: - get: - operationId: SchemaApi_getSchemaByType - summary: Finds the schema using the json document type. - description: Finds the schema using the json document type. - parameters: - - name: schemaType - required: true - in: path - description: Type - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_9 - - schemas - security: - - bearerAuth: [] - /schemas/list/all: - get: - operationId: SchemaApi_getAll - summary: Returns a list of schemas. - description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - /schemas/list/sub: - get: - operationId: SchemaApi_getSub - summary: Returns a list of schemas. - description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: category - required: true - in: query - description: Schema category - schema: - type: string - - name: topicId - required: true - in: query - description: Topic Id - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SchemaDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - /schemas/push/copy: - post: - operationId: SchemaApi_copySchemaAsync - summary: Copy schema. - description: >- - Copy schema. Only users with the Standard Registry role are allowed to - make the request. - parameters: [] - requestBody: - required: true - description: Object that contains a valid schema. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - - bearerAuth: [] - /schemas/push/{topicId}: - post: - tags: - - schemas - description: >- - Creates new schema. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Create new schema. - parameters: - - in: path - name: topicId - schema: - type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}: - put: - tags: - - schemas - description: >- - Updates the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Updates the schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - tags: - - schemas - description: >- - Deletes the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Deletes the schema. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/publish: - put: - tags: - - schemas - description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Publishes the schema. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - version: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/push/{schemaId}/publish: - put: - tags: - - schemas - description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. - security: - - bearerAuth: [] - summary: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - version: - type: string - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/import/message/preview: - post: - tags: - - schemas - description: >- - Previews the schema from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Schema preview from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/push/import/message/preview: - post: - tags: - - schemas - description: >- - Previews the schema from IPFS without loading it into the local DB. Only - users with the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Schema preview from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/import/file/preview: - post: - tags: - - schemas - description: >- - Previews the schema from a zip file. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Schema preview from a zip file. - requestBody: - description: A zip file containing the schema to be viewed. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{topicId}/import/message: - post: - tags: - - schemas - description: >- - Imports new schema from IPFS into the local DB. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - in: path - name: topicId - schema: - type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - security: - - bearerAuth: [] - summary: Imports new schema from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - responses: - '201': - description: Created. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/push/{topicId}/import/message: - post: - tags: - - schemas - description: >- - Imports new schema from IPFS into the local DB. Only users with the - Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Imports new schema from IPFS. - requestBody: - description: >- - Object that contains the identifier of the Hedera message which - contains the IPFS CID of the schema. - required: true - content: - application/json: - schema: - type: object - properties: - messageId: - type: string - parameters: - - in: path - name: topicId - schema: - type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{topicId}/import/file: - post: - tags: - - schemas - description: >- - Imports new schema from a zip file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: topicId - schema: - type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - security: - - bearerAuth: [] - summary: Imports new schema from a zip file. - requestBody: - description: A zip file containing schema to be imported. - content: - binary/octet-stream: - schema: - type: string - format: binary - required: true - responses: - '201': - description: Created. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/push/{topicId}/import/file: - post: - tags: - - schemas - description: >- - Imports new schema from a zip file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Imports new schema from a zip file. - requestBody: - description: A zip file containing schema to be imported. - content: - binary/octet-stream: - schema: - type: string - format: binary - required: true - parameters: - - in: path - name: topicId - schema: - type: string - required: true - description: Topic ID. - examples: - topicId: - summary: Example of a Topic ID - value: 0.0.00000001 - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/export/message: - post: - tags: - - schemas - description: >- - Returns Hedera message IDs of the published schemas, these messages - contain IPFS CIDs of these schema files. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: List Hedera message IDs of published schemas. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Selected schema ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/ExportSchema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/export/file: - post: - tags: - - schemas - description: >- - Returns schema files for the schemas. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Return zip file with schemas. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Selected schema ID. - responses: - '200': - description: Successful operation. Response zip file - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/system/{username}: - post: - tags: - - schemas - description: >- - Creates new system schema. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - in: path - name: username - schema: - type: string - required: true - description: Username. - security: - - bearerAuth: [] - summary: Creates new system schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '201': - description: Created. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - tags: - - schemas - description: >- - Returns all system schemas by username. Only users with the Standard - Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Returns all system schemas by username. - parameters: - - in: path - name: username - schema: - type: string - required: true - description: Username. - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set. - examples: - pageIndex: - summary: Example of a pageIndex. - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The number of items to return. - examples: - pageSize: - summary: Example of a pageSize. - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total number of items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/system/{schemaId}: - put: - tags: - - schemas - description: >- - Updates the system schema with the provided schema ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Updates the schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - tags: - - schemas - description: >- - Deletes the system schema with the provided schema ID. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Deletes the schema. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/system/{schemaId}/active: - put: - tags: - - schemas - description: >- - Makes the selected scheme active. Other schemes of the same type become - inactive. Only users with the Standard Registry role are allowed to make - the request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Publishes the schema. - requestBody: - description: Object that contains policy version. - required: true - content: - application/json: - schema: - type: object - properties: - version: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/system/entity/{schemaEntity}: - get: - tags: - - schemas - description: Finds the schema using the schema type. - parameters: - - in: path - name: schemaEntity - schema: - type: string - enum: - - STANDARD_REGISTRY - - USER - - POLICY - - MINT_TOKEN - - WIPE_TOKEN - - MINT_NFTOKEN - required: true - description: schema type. - security: - - bearerAuth: [] - summary: Returns schema by schema type. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /schemas/{schemaId}/export/xlsx: - get: - operationId: SchemaApi_getPolicyExportXlsx - summary: Return schemas in a xlsx file format for the specified policy. - description: >- - Returns a xlsx file containing schemas. Only users with the Standard - Registry role are allowed to make the request. - parameters: - - name: schemaId - required: true - in: path - description: Schema ID - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - - /schemas/{topicId}/import/xlsx: - post: - operationId: SchemaApi_importPolicyFromXlsx - summary: Imports new schema from a xlsx file into the local DB. - description: >- - Imports new schema from a xlsx file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - schema: - type: string - requestBody: - required: true - description: A xlsx file containing schema config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - - /schemas/push/{topicId}/import/xlsx: - post: - operationId: SchemaApi_importPolicyFromXlsxAsync - summary: Imports new schema from a xlsx file into the local DB. - description: >- - Imports new schema from a xlsx file into the local DB. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - name: topicId - required: true - in: path - description: Topic Id - schema: - type: string - requestBody: - required: true - description: A xlsx file containing schema config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - - /schemas/import/xlsx/preview: - post: - operationId: SchemaApi_importPolicyFromXlsxPreview - summary: Previews the schema from a xlsx file. - description: >- - Previews the schema from a xlsx file. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - description: A xlsx file containing schema config. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - - /schemas/export/template: - get: - operationId: SchemaApi_exportTemplate - summary: Returns a list of schemas. - description: >- - Returns a list of schemas. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_9 - security: - - bearerAuth: [] - - /settings: - get: - tags: - - settings - description: >- - Returns current settings. For users with the Standard Registry role - only. - security: - - bearerAuth: [] - summary: Returns current settings. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CommonSettings' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - settings - description: Set settings. For users with the Standard Registry role only. - security: - - bearerAuth: [] - summary: Set settings. - responses: - '201': - description: Created. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/CommonSettings' - /settings/environment: - get: - tags: - - settings - description: Returns current environment name. - security: - - bearerAuth: [] - summary: Returns current environment name. - responses: - '200': - description: Successful operation. - content: - text/plain: - schema: - type: string - example: testnet - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /settings/about: - get: - operationId: SettingsApi_getAbout - parameters: [] - responses: - '200': - description: '' - tags: - - settings - /tags: - post: - operationId: TagsApi_setTags - parameters: [] - responses: - '201': - description: '' - tags: - - tags - /tags/search: - post: - tags: - - tags - description: Search tags. - security: - - bearerAuth: [] - requestBody: - description: Object that contains filters. - required: true - content: - application/json: - schema: - oneOf: - - type: object - required: - - entity - - target - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - target: - type: string - - type: object - required: - - entity - - targets - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - targets: - type: array - items: - type: string - examples: - Single: - value: - entity: PolicyDocument - target: targetId1 - Multiple: - value: - entity: PolicyDocument - targets: - - targetId1 - - targetId2 - summary: Search tags. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - description: a (targetId, Tags) map. `targetId1` is an example key - properties: - targetId1: - $ref: '#/components/schemas/TagMap' - additionalProperties: - $ref: '#/components/schemas/TagMap' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tags/{uuid}: - delete: - tags: - - tags - description: Delete tag. - security: - - bearerAuth: [] - summary: Delete tag. - parameters: - - in: path - name: uuid - schema: - type: string - example: 00000000-0000-0000-0000-000000000000 - required: true - description: Tag identifier - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tags/synchronization: - post: - tags: - - tags - description: synchronization. - security: - - bearerAuth: [] - requestBody: - description: Object that contains filters. - required: true - content: - application/json: - schema: - type: object - required: - - entity - - target - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: - type: string - example: targetId - summary: synchronization. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TagMap' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tags/schemas: - get: - tags: - - tags - description: Returns all schema. - security: - - bearerAuth: [] - summary: Returns all schemas. - parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - tags - description: >- - Creates new schema. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Creates new schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '201': - description: Created. - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tags/schemas/{schemaId}: - delete: - tags: - - tags - description: >- - Deletes the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Delete the schema. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - put: - tags: - - tags - description: >- - Updates the schema with the provided schema ID. Only users with the - Standard Registry role are allowed to make the request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Updates the schema. - requestBody: - description: Object that contains a valid schema. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tags/schemas/{schemaId}/publish: - put: - tags: - - tags - description: >- - Publishes the schema with the provided (internal) schema ID onto IPFS, - sends a message featuring IPFS CID into the corresponding Hedera topic. - Only users with the Standard Registry role are allowed to make the - request. - parameters: - - in: path - name: schemaId - schema: - type: string - required: true - description: Schema ID. - security: - - bearerAuth: [] - summary: Publishes the schema. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tags/schemas/published: - get: - tags: - - tags - description: Return a list of all published schemas. - security: - - bearerAuth: [] - summary: Return a list of all published schemas. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tasks/{taskId}: - get: - tags: - - tasks - description: Returns task statuses by Id. - security: - - bearerAuth: [] - summary: Returns task statuses. - parameters: - - in: path - name: taskId - schema: - type: string - required: true - description: Task ID. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TaskStatus' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens: - get: - tags: - - tokens - description: >- - Returns all tokens. For the Standard Registry role it returns only the - list of tokens, for other users it also returns token balances as well - as the KYC, Freeze, and Association statuses. Not allowed for the - Auditor role. - security: - - bearerAuth: [] - summary: Return a list of tokens. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - allOf: - - $ref: '#/components/schemas/TokenInfo' - - type: object - properties: - policies: - type: array - items: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - tokens - description: >- - Creates a new token. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Creates a new token. - requestBody: - description: Object that contains token information. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Token' - responses: - '201': - description: Created. - content: - application/json: - schema: - type: array - items: - allOf: - - $ref: '#/components/schemas/TokenInfo' - - type: object - properties: - policies: - type: array - items: - type: string - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push: - post: - tags: - - tokens - description: >- - Creates a new token. Only users with the Standard Registry role are - allowed to make the request. - security: - - bearerAuth: [] - summary: Creates a new token. - requestBody: - description: Object that contains token information. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Token' - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}: - delete: - operationId: TokensApi_deleteTokenAsync - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - responses: - '202': - description: '' - tags: &ref_10 - - tokens - /tokens/{tokenId}/associate: - put: - tags: - - tokens - description: >- - Associates the user with the provided Hedera token. Only users with the - Installer role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - security: - - bearerAuth: [] - summary: Associates the user with the provided Hedera token. - responses: - '200': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/associate: - put: - tags: - - tokens - description: >- - Associates the user with the provided Hedera token. Only users with the - Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Associates the user with the provided Hedera token. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/dissociate: - put: - tags: - - tokens - description: >- - Disassociates the user with the provided Hedera token. Only users with - the Installer role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - security: - - bearerAuth: [] - summary: Associate the user with the provided Hedera token. - responses: - '202': - description: Successful operation. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/dissociate: - put: - tags: - - tokens - description: >- - Disassociates the user with the provided Hedera token. Only users with - the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Disassociates the user with the provided Hedera token. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/grant-kyc: - put: - tags: - - tokens - description: >- - Sets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - security: - - bearerAuth: [] - summary: Sets the KYC flag for the user. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/grant-kyc: - put: - tags: - - tokens - description: >- - Sets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - security: - - bearerAuth: [] - summary: Sets the KYC flag for the user. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/revoke-kyc: - put: - tags: - - tokens - description: >- - Unsets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - security: - - bearerAuth: [] - summary: Unsets the KYC flag for the user. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/revoke-kyc: - put: - tags: - - tokens - description: >- - Unsets the KYC flag for the user. Only users with the Standard Registry - role are allowed to make the request. - security: - - bearerAuth: [] - summary: Unsets the KYC flag for the user. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/freeze: - put: - tags: - - tokens - description: >- - Freezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - security: - - bearerAuth: [] - summary: Freeze transfers of the specified token for the user. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/unfreeze: - put: - tags: - - tokens - description: >- - Unfreezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - security: - - bearerAuth: [] - summary: Unfreezes transfers of the specified token for the user. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/freeze: - put: - tags: - - tokens - description: >- - Freezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Freeze transfers of the specified token for the user. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/push/{tokenId}/{username}/unfreeze: - put: - tags: - - tokens - description: >- - Unfreezes transfers of the specified token for the user. Only users with - the Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - summary: Unfreezes transfers of the specified token for the user. - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - responses: - '202': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Task' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/{username}/info: - get: - tags: - - tokens - description: >- - Returns user information for the selected token. Only users with the - Standard Registry role are allowed to make the request. - security: - - bearerAuth: [] - parameters: - - in: path - name: tokenId - schema: - type: string - required: true - description: Token ID. - - in: path - name: username - schema: - type: string - required: true - description: Username. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TokenInfo' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tokens/{tokenId}/serials: - get: - operationId: TokensApi_getTokenSerials - summary: Return token serials. - description: Returns token serials of current user. - parameters: - - name: tokenId - required: true - in: path - description: Token identifier - example: 0.0.1 - schema: - type: string - responses: - '200': - description: Token serials. - content: - application/json: - schema: - type: array - items: - type: number - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_10 - security: - - bearerAuth: [] - /themes: - get: - tags: - - themes - description: Returns all themes. - security: - - bearerAuth: [] - summary: Return a list of all themes. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Theme' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - post: - tags: - - themes - description: Creates a new theme. - security: - - bearerAuth: [] - summary: Creates a new theme. - requestBody: - description: Object that contains theme configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Theme' - responses: - '201': - description: Created. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /themes/{themeId}: - put: - tags: - - themes - description: Updates theme configuration for the specified theme ID. - summary: Updates theme configuration. - parameters: - - in: path - name: themeId - description: Selected theme ID. - required: true - schema: - type: string - requestBody: - description: Object that contains theme configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Theme' - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Theme' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - delete: - tags: - - themes - description: Deletes the theme with the provided theme ID. - parameters: - - in: path - name: themeId - schema: - type: string - required: true - description: Theme ID. - security: - - bearerAuth: [] - summary: Deletes the theme. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /themes/import/file: - post: - tags: - - themes - description: Imports new theme from the provided zip file into the local DB. - security: - - bearerAuth: [] - summary: Imports new theme from a zip file. - requestBody: - description: A zip file that contains the theme to be imported. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - responses: - '201': - description: Created. - content: - application/json: - schema: - $ref: '#/components/schemas/Theme' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /themes/{themeId}/export/file: - get: - tags: - - themes - description: Returns a zip file containing the theme. - parameters: - - in: path - name: themeId - schema: - type: string - required: true - description: Selected theme ID. - security: - - bearerAuth: [] - summary: Returns a zip file containing the theme. - responses: - '200': - description: Successful operation. Response zip file - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /trust-chains: - get: - tags: - - trustchains - description: >- - Requests all VP documents. Only users with the Auditor role are allowed - to make the request. - security: - - bearerAuth: [] - summary: Returns a list of all VP documents. - parameters: - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - - in: query - name: policyId - schema: - type: string - description: Selected policy ID. - - in: query - name: policyOwner - schema: - type: string - description: Selected Standard Registry (DID). - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/VerifiablePresentation' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /trust-chains/{hash}: - get: - tags: - - trustchains - description: >- - Builds and returns a trustchain, from the VP to the root VC document. - Only users with the Auditor role are allowed to make the request. - parameters: - - in: path - name: hash - schema: - type: string - required: true - description: Hash or ID of a VP document. - security: - - bearerAuth: [] - summary: Returns a trustchain for a VP document. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/TrustChains' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /wizard/policy: - post: - tags: - - wizard - description: >- - Creates a new policy by wizard. Only users with the Standard Registry - role are allowed to make the request. - security: - - bearerAuth: [] - summary: Creates a new policy. - requestBody: - description: Object that contains wizard configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/WizardConfig' - responses: - '201': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - policyId: - type: string - wizardConfig: - $ref: '#/components/schemas/WizardConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /wizard/push/policy: - post: - operationId: WizardApi_setPolicyAsync - summary: Creates a new policy. - description: >- - Creates a new policy by wizard. Only users with the Standard Registry - role are allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - saveState: - type: boolean - wizardConfig: - type: object - required: - - policy - - roles - - schemas - - trustChain - properties: - roles: - type: array - items: - type: string - policy: - type: object - properties: - name: - type: string - description: - type: string - topicDescription: - type: string - policyTag: - type: string - schemas: - type: array - items: - type: object - properties: - name: - type: string - iri: - type: string - isApproveEnable: - type: boolean - isMintSchema: - type: boolean - mintOptions: - type: object - properties: - tokenId: - type: string - rule: - type: string - dependencySchemaIri: - type: string - relationshipsSchemaIri: - type: string - initialRolesFor: - type: array - items: - type: string - rolesConfig: - type: array - items: - type: object - properties: - role: - type: string - isApprover: - type: boolean - isCreator: - type: boolean - gridColumns: - type: array - items: - type: object - properties: - field: - type: string - title: - type: string - trustChain: - type: array - items: - type: object - properties: - role: - type: string - mintSchemaIri: - type: string - viewOnlyOwnDocuments: - type: boolean - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: - - wizard - /wizard/{policyId}/config: - post: - tags: - - wizard - description: >- - Get policy config by wizard. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy identifier. - security: - - bearerAuth: [] - summary: Get policy config. - requestBody: - description: Object that contains wizard configuration. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/WizardConfig' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - policyConfig: - $ref: '#/components/schemas/PolicyConfig' - wizardConfig: - $ref: '#/components/schemas/WizardConfig' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /branding: - post: - operationId: BrandingApi_setBranding - parameters: [] - responses: - '401': - description: Unauthorized - tags: &ref_11 - - branding - security: - - bearerAuth: [] - get: - operationId: BrandingApi_getBranding - parameters: [] - responses: - '200': - description: '' - tags: *ref_11 - /suggestions: - post: - operationId: SuggestionsApi_policySuggestions - summary: Get next and nested suggested block types - description: >- - Get next and nested suggested block types. Only users with the Standard - Registry role are allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsInputDTO' - responses: - '200': - description: >- - Successful operation. Suggested next and nested block types - respectively. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsOutputDTO' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_12 - - suggestions - security: - - bearerAuth: [] - - bearerAuth: [] - /suggestions/config: - post: - operationId: SuggestionsApi_setPolicySuggestionsConfig - summary: Set suggestions config - description: >- - Set suggestions config. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' - responses: - '201': - description: Successful operation. Response setted suggestions config. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 - security: - - bearerAuth: [] - - bearerAuth: [] - get: - operationId: SuggestionsApi_getPolicySuggestionsConfig - summary: Get suggestions config - description: >- - Get suggestions config. Only users with the Standard Registry role are - allowed to make the request. - parameters: [] - responses: - '200': - description: Successful operation. Response suggestions config. - content: - application/json: - schema: - $ref: '#/components/schemas/SuggestionsConfigDTO' - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_12 - security: - - bearerAuth: [] - - bearerAuth: [] - /notifications: - get: - operationId: NotificationsApi_getAllNotifications - summary: Get all notifications - description: Returns all notifications. - parameters: [] - responses: - '200': - description: Successful operation. Returns notifications and count. - headers: - X-Total-Count: - description: Count of notifications - schema: - type: number - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_13 - - notifications - security: - - bearerAuth: [] - - bearerAuth: [] - /notifications/new: - get: - operationId: NotificationsApi_getNewNotifications - summary: Get new notifications - description: Returns new notifications. - parameters: [] - responses: - '200': - description: Successful operation. Returns new notifications. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearerAuth: [] - - bearerAuth: [] - /notifications/progresses: - get: - operationId: NotificationsApi_getProgresses - summary: Get progresses - description: Returns progresses. - parameters: [] - responses: - '200': - description: Successful operation. Returns progresses. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ProgressDTO' - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearerAuth: [] - - bearerAuth: [] - /notifications/read/all: - post: - operationId: NotificationsApi_readAll - summary: Read all notifications - description: Returns new notifications. - parameters: [] - responses: - '200': - description: Successful operation. Returns notifications. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/NotificationDTO' - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearerAuth: [] - - bearerAuth: [] - /notifications/delete/{notificationId}: - delete: - operationId: NotificationsApi_delete - summary: Delete notifications up to this point - description: Returns deleted notifications count. - parameters: - - name: notificationId - required: true - in: path - schema: - type: string - responses: - '200': - description: Successful operation. Returns deleted notifications count. - content: - application/json: - schema: - type: number - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_13 - security: - - bearerAuth: [] - - bearerAuth: [] - /projects/search: - post: - operationId: ProjectsAPI_projectSearch - summary: Search projects - description: Search projects by filters - parameters: [] - requestBody: - required: true - description: The question of choosing a methodology - content: - application/json: - schema: - type: string - examples: - q: - value: >- - What methodology can I use for production of electricity using - renewable energy technologies? - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ProjectDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_14 - - projects - /projects/compare/documents: - post: - operationId: ProjectsAPI_compareDocuments - summary: Compare documents. - description: Compare documents. - parameters: [] - requestBody: - required: true - description: Filters. - content: - application/json: - schema: - $ref: '#/components/schemas/FilterDocumentsDTO' - examples: - Filter1: - value: - documentId1: '000000000000000000000001' - documentId2: '000000000000000000000002' - Filter2: - value: - documentIds: - - '000000000000000000000001' - - '000000000000000000000002' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/CompareDocumentsDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - /projects/properties: - get: - operationId: ProjectsAPI_getPolicyProperties - summary: Get all properties - description: Get all properties - parameters: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/PropertiesDTO' - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_14 - /record/{policyId}/status: - get: - operationId: RecordApi_getRecordStatus - summary: Get recording or running status. - description: >- - Get recording or running status. Only users with the Standard Registry - role are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RecordStatusDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_15 - - record - security: - - bearerAuth: [] - - /record/{policyId}/recording/start: - post: - operationId: RecordApi_startRecord - summary: Start recording. - description: >- - Start recording. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/recording/stop: - post: - operationId: RecordApi_stopRecord - summary: Stop recording. - description: >- - Stop recording. Only users with the Standard Registry role are allowed - to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: string - format: binary - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/recording/actions: - get: - operationId: RecordApi_getRecordActions - summary: Get recorded actions. - description: >- - Get recorded actions. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RecordActionDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/running/start: - post: - operationId: RecordApi_runRecord - summary: Run record from a zip file. - description: >- - Run record from a zip file. Only users with the Standard Registry role - are allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: A zip file containing record to be run. - content: - application/json: - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/running/stop: - post: - operationId: RecordApi_stopRunning - summary: Stop running. - description: >- - Stop running. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/running/results: - get: - operationId: RecordApi_getRecordResults - summary: Get running results. - description: >- - Get running results. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RunningResultDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/running/details: - get: - operationId: RecordApi_getRecordDetails - summary: Get running details. - description: >- - Get running details. Only users with the Standard Registry role are - allowed to make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/RunningDetailsDTO' - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/running/fast-forward: - post: - operationId: RecordApi_fastForward - summary: Fast Forward. - description: >- - Fast Forward. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/running/retry: - post: - operationId: RecordApi_retryStep - summary: Retry step. - description: >- - Retry step. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /record/{policyId}/running/skip: - post: - operationId: RecordApi_skipStep - summary: Skip step. - description: >- - Skip step. Only users with the Standard Registry role are allowed to - make the request. - parameters: - - name: policyId - required: true - in: path - description: Policy Id - schema: - type: string - requestBody: - required: true - description: Object that contains options - content: - application/json: - schema: - $ref: '#/components/schemas/Object' - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_15 - security: - - bearerAuth: [] - - /ai-suggestions/ask: - get: - operationId: AISuggestionsAPI_getAIAnswer - summary: Get methodology suggestion - description: Returns AI response to the current question - parameters: - - name: q - required: true - in: query - description: The question of choosing a methodology - schema: - type: string - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: &ref_16 - - ai-suggestions - /ai-suggestions/rebuild-vector: - put: - operationId: AISuggestionsAPI_rebuildVector - summary: Rebuild AI vector - description: Rebuilds vector based on policy data in the DB - parameters: [] - responses: - '200': - description: '' - tags: *ref_16 - /schemas/type/{type}: - get: - tags: - - schemas - description: Finds the schema using the json document type. - parameters: - - in: path - name: type - schema: - type: string - required: true - description: JSON type. - security: - - bearerAuth: [] - summary: Returns schema by type. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/Schema' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/tag/{tag}: - get: - tags: - - policies - description: >- - Requests block ID from a policy by tag. Only users with the Standard - Registry and Installer roles are allowed to make the request. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Selected policy ID. - - in: path - name: tag - schema: - type: string - required: true - description: Tag from the selected policy. - summary: Requests block ID from a policy by tag. - security: - - bearerAuth: [] - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: object - properties: - id: - type: string - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /policies/{policyId}/tag/{tag}/blocks: - post: - tags: - - policies - description: Sends data to the specified block. - security: - - bearerAuth: [] - summary: Sends data to the specified block. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: tag - schema: - type: string - required: true - description: Tag from the selected policy. - requestBody: - description: Object with the data to be sent to the block. - required: true - content: - application/json: - schema: - type: object - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyBlockData' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - get: - tags: - - policies - description: >- - Requests block data by tag. Only users with a role that described in - block are allowed to make the request. - security: - - bearerAuth: [] - summary: Requests block data. - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy ID. - - in: path - name: tag - schema: - type: string - required: true - description: Tag from the selected policy. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyBlockData' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /ipfs/file/: - post: - tags: - - ipfs - description: Add file to ipfs. - summary: Add file to ipfs. - requestBody: - description: Data array of file. - required: true - content: - binary/octet-stream: - schema: - type: string - format: binary - security: - - bearerAuth: [] - responses: - '201': - description: Created. - content: - application/json: - schema: - description: CID of added file. - type: string - '401': - description: Unauthorized. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /artifacts/{policyId}: - post: - tags: - - artifacts - description: Upload artifact. For users with the Standard Registry role only. - security: - - bearerAuth: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - artifacts: - type: array - items: - type: string - format: binary - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy identifier - summary: Upload Artifact. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Artifact' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /artifact: - get: - deprecated: true - tags: - - artifacts - description: Returns all artifacts. - security: - - bearerAuth: [] - summary: Returns all artifacts. - parameters: - - in: query - name: policyId - schema: - type: string - description: Policy identifier - - in: query - name: pageIndex - schema: - type: integer - description: >- - The number of pages to skip before starting to collect the result - set - examples: - pageIndex: - summary: Example of a pageIndex - value: 0 - - in: query - name: pageSize - schema: - type: integer - description: The numbers of items to return - examples: - pageSize: - summary: Example of a pageSize - value: 100 - responses: - '200': - description: Successful operation. - headers: - x-total-count: - schema: - type: integer - description: Total items in the collection. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Artifact' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /artifact/{policyId}: - post: - deprecated: true - tags: - - artifacts - description: Upload artifact. For users with the Standard Registry role only. - security: - - bearerAuth: [] - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - artifacts: - type: array - items: - type: string - format: binary - parameters: - - in: path - name: policyId - schema: - type: string - required: true - description: Policy identifier - summary: Upload Artifact. - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Artifact' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /artifact/{artifactId}: - delete: - deprecated: true - tags: - - artifacts - description: Delete artifact. - security: - - bearerAuth: [] - summary: Delete artifact. - parameters: - - in: path - name: artifactId - schema: - type: string - required: true - description: Artifact identifier - responses: - '200': - description: Successful operation. - content: - application/json: - schema: - type: boolean - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /tags/: - post: - tags: - - tags - description: Creates new tag. - security: - - bearerAuth: [] - summary: Creates new tag. - requestBody: - description: Object that contains tag information. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Tag' - responses: - '201': - description: Created. - content: - application/json: - schema: - $ref: '#/components/schemas/Tag' - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' -info: - title: Guardian - description: >- - The Guardian is a modular open-source solution that includes best-in-class - identity management and decentralized ledger technology (DLT) libraries. At - the heart of the Guardian solution is a sophisticated Policy Workflow Engine - (PWE) that enables applications to offer a requirements-based tokenization - implementation. - version: 2.23.1 - contact: - name: API developer - url: https://envisionblockchain.com - email: info@envisionblockchain.com - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html -tags: [] -servers: - - url: /api/v1 - description: version 1.0 -components: - securitySchemes: - bearerAuth: - type: http - scheme: bearer - bearerFormat: JWT - schemas: - AccountsResponseDTO: - type: object - properties: - username: - type: string - role: - type: string - did: - type: string - required: - - username - - role - - did - InternalServerErrorDTO: - type: object - properties: - code: - type: number - message: - type: string - required: - - code - - message - RegisterUserDTO: - type: object - properties: - username: - type: string - password: - type: string - password_confirmation: - type: string - role: - type: string - required: - - username - - password - - password_confirmation - - role - AccountsSessionResponseDTO: - type: object - properties: - username: - type: string - role: - type: string - accessToken: - type: string - required: - - username - - role - - accessToken - LoginUserDTO: - type: object - properties: - username: - type: string - password: - type: string - required: - - username - - password - CredentialSubjectDTO: - type: object - properties: - geography: - type: string - law: - type: string - tags: - type: string - ISIC: - type: string - '@context': - type: array - items: - type: string - id: - type: string - type: - type: string - required: - - geography - - law - - tags - - ISIC - - '@context' - - id - - type - ProofDTO: - type: object - properties: - type: - type: string - created: - format: date-time - type: string - verificationMethod: - type: string - proofPurpose: - type: string - jws: - type: string - required: - - type - - created - - verificationMethod - - proofPurpose - - jws - VcDocumentDTO: - type: object - properties: - id: - type: string - type: - type: array - items: - type: string - issuer: - type: string - issuanceDate: - format: date-time - type: string - '@context': - type: array - items: - type: string - credentialSubject: - $ref: '#/components/schemas/CredentialSubjectDTO' - proof: - $ref: '#/components/schemas/ProofDTO' - required: - - id - - type - - issuer - - issuanceDate - - '@context' - - credentialSubject - - proof - PolicyDTO: - type: object - properties: - _id: - type: string - createDate: - format: date-time - type: string - uuid: - type: string - name: - type: string - description: - type: string - status: - type: string - creator: - type: string - owner: - type: string - topicId: - type: string - policyTag: - type: string - codeVersion: - type: string - userRoles: - type: array - items: - type: string - userGroups: - type: array - items: - type: string - userRole: - type: string - userGroup: - type: string - id: - type: string - required: - - _id - - createDate - - uuid - - name - - description - - status - - creator - - owner - - topicId - - policyTag - - codeVersion - - userRoles - - userGroups - - userRole - - userGroup - - id - AggregatedDTOItem: - type: object - properties: - did: - type: string - hederaAccountId: - type: string - vcDocument: - $ref: '#/components/schemas/VcDocumentDTO' - policies: - $ref: '#/components/schemas/PolicyDTO' - required: - - did - - hederaAccountId - - vcDocument - - policies - UserDTO: - type: object - properties: - username: - type: string - did: - type: string - required: - - username - - did - BalanceResponseDTO: - type: object - properties: - balance: - type: number - unit: - type: string - user: - $ref: '#/components/schemas/UserDTO' - required: - - balance - - unit - - user - FilterSearchPoliciesDTO: - type: object - properties: - policyId: - type: string - required: - - policyId - SearchPoliciesDTO: - type: object - properties: - target: - type: object - result: - type: object - required: - - target - - result - FilterPoliciesDTO: - type: object - properties: - policyId1: - type: string - policyId2: - type: string - policyIds: - type: string - eventsLvl: - type: number - propLvl: - type: number - childrenLvl: - type: number - idLvl: - type: number - required: - - policyId1 - - policyId2 - - policyIds - - eventsLvl - - propLvl - - childrenLvl - - idLvl - ComparePoliciesDTO: - type: object - properties: - blocks: - type: object - groups: - type: object - left: - type: object - right: - type: object - roles: - type: object - tokens: - type: object - topics: - type: object - total: - type: object - required: - - blocks - - groups - - left - - right - - roles - - tokens - - topics - - total - FilterModulesDTO: - type: object - properties: - moduleId1: - type: string - moduleId2: - type: string - eventsLvl: - type: number - propLvl: - type: number - childrenLvl: - type: number - idLvl: - type: number - required: - - moduleId1 - - moduleId2 - - eventsLvl - - propLvl - - childrenLvl - - idLvl - CompareModulesDTO: - type: object - properties: - blocks: - type: object - left: - type: object - right: - type: object - inputEvents: - type: object - outputEvents: - type: object - variables: - type: object - total: - type: object - required: - - blocks - - left - - right - - inputEvents - - outputEvents - - variables - - total - FilterSchemasDTO: - type: object - properties: - schemaId1: - type: string - schemaId2: - type: string - idLvl: - type: number - required: - - schemaId1 - - schemaId2 - - idLvl - CompareSchemasDTO: - type: object - properties: - fields: - type: object - left: - type: object - right: - type: object - total: - type: object - required: - - fields - - left - - right - - total - FilterDocumentsDTO: - type: object - properties: - documentId1: - type: string - documentId2: - type: string - documentIds: - type: string - required: - - documentId1 - - documentId2 - - documentIds - CompareDocumentsDTO: - type: object - properties: - documents: - type: object - left: - type: object - right: - type: object - total: - type: object - required: - - documents - - left - - right - - total - FilterToolsDTO: - type: object - properties: - toolId1: - type: string - toolId2: - type: string - toolIds: - type: string - required: - - toolId1 - - toolId2 - - toolIds - CompareToolsDTO: - type: object - properties: - blocks: - type: object - left: - type: object - right: - type: object - inputEvents: - type: object - outputEvents: - type: object - variables: - type: object - total: - type: object - required: - - blocks - - left - - right - - inputEvents - - outputEvents - - variables - - total - ArtifactDTOItem: - type: object - properties: - id: - type: string - name: - type: string - uuid: - type: string - extention: - type: string - type: - type: string - required: - - id - - name - - uuid - - extention - - type - ContractDTO: - type: object - properties: - id: - type: string - contractId: - type: string - description: - type: string - owner: - type: string - permissions: - type: number - topicId: - type: string - type: - type: string - enum: - - WIPE - - RETIRE - syncRequestsDate: - format: date-time - type: string - syncPoolsDate: - format: date-time - type: string - lastSyncEventTimeStamp: - type: string - wipeContractIds: - type: array - items: - type: string - required: - - id - - contractId - - description - - owner - - permissions - - topicId - - type - - syncRequestsDate - - syncPoolsDate - - lastSyncEventTimeStamp - - wipeContractIds - WiperRequestDTO: - type: object - properties: - id: - type: string - contractId: - type: string - user: - type: string - required: - - id - - contractId - - user - RetireRequestDTO: - type: object - properties: - id: - type: string - contractId: - type: string - tokens: - type: object - properties: - token: - type: string - count: - type: number - serials: - type: array - items: - type: number - decimals: - type: number - type: - enum: - - non-fungible - - fungible - tokenSymbol: - type: string - tokenIds: - type: array - items: - type: string - user: - type: string - required: - - id - - contractId - - tokens - - tokenIds - - user - Date: - type: object - properties: {} - RetirePoolDTO: - type: object - properties: - id: - type: string - contractId: - type: string - tokens: - type: object - properties: - token: - type: string - contract: - type: string - count: - type: number - decimals: - type: number - type: - enum: - - non-fungible - - fungible - tokenSymbol: - type: string - tokenIds: - type: array - items: - type: string - immediately: - type: boolean - enabled: - type: boolean - required: - - id - - contractId - - tokens - - tokenIds - - immediately - - enabled - RetirePoolTokenDTO: - type: object - properties: - token: - type: string - count: - type: number - required: - - token - - count - RetireRequestTokenDTO: - type: object - properties: - token: - type: string - count: - type: number - serials: - type: array - items: - type: string - required: - - token - - count - - serials - ProfileDTO: - type: object - properties: - username: - type: string - nullable: false - role: - type: string - nullable: false - did: - type: string - nullable: true - parent: - type: string - nullable: true - hederaAccountId: - type: string - nullable: true - confirmed: - type: boolean - nullable: true - failed: - type: boolean - nullable: true - topicId: - type: string - nullable: true - parentTopicId: - type: string - nullable: true - didDocument: - type: object - nullable: true - vcDocument: - type: object - nullable: true - required: - - username - - role - SubjectDTO: - type: object - properties: - '@context': - nullable: true - type: array - items: - type: string - id: - type: string - nullable: true - type: - type: string - nullable: true - required: - - '@context' - DidDocumentDTO: - type: object - properties: - id: - type: string - nullable: false - context: - nullable: true - type: array - items: - type: string - alsoKnownAs: - nullable: true - type: array - items: - type: string - controller: - nullable: true - type: array - items: - type: string - verificationMethod: - nullable: true - type: array - items: - type: object - authentication: - nullable: true - type: array - items: - type: object - assertionMethod: - nullable: true - type: array - items: - type: object - keyAgreement: - nullable: true - type: array - items: - type: object - capabilityInvocation: - nullable: true - type: array - items: - type: object - capabilityDelegation: - nullable: true - type: array - items: - type: object - service: - nullable: true - type: array - items: - type: object - required: - - id - - context - - alsoKnownAs - - controller - - verificationMethod - - authentication - - assertionMethod - - keyAgreement - - capabilityInvocation - - capabilityDelegation - - service - DidKeyDTO: - type: object - properties: - id: - type: string - nullable: false - key: - type: string - nullable: false - required: - - id - - key - CredentialsDTO: - type: object - properties: - entity: - type: string - nullable: false - hederaAccountId: - type: string - nullable: false - hederaAccountKey: - type: string - nullable: false - parent: - type: string - nullable: true - vcDocument: - nullable: true - allOf: - - $ref: '#/components/schemas/SubjectDTO' - didDocument: - nullable: true - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - didKeys: - nullable: true - type: array - items: - $ref: '#/components/schemas/DidKeyDTO' - required: - - entity - - hederaAccountId - - hederaAccountKey - TaskDTO: - type: object - properties: - taskId: - type: string - expectation: - type: number - required: - - taskId - - expectation - DidDocumentStatusDTO: - type: object - properties: - valid: - type: boolean - nullable: false - error: - type: string - nullable: true - didDocument: - type: object - nullable: false - required: - - valid - - error - - didDocument - DidDocumentWithKeyDTO: - type: object - properties: - document: - nullable: false - allOf: - - $ref: '#/components/schemas/DidDocumentDTO' - keys: - nullable: false - type: array - items: - $ref: '#/components/schemas/DidKeyDTO' - required: - - document - - keys - DidKeyStatusDTO: - type: object - properties: - id: - type: string - nullable: false - key: - type: string - nullable: false - valid: - type: boolean - nullable: false - required: - - id - - key - - valid - MigrationConfigPoliciesDTO: - type: object - properties: - src: - type: string - dst: - type: string - required: - - src - - dst - MigrationConfigDTO: - type: object - properties: - policies: - $ref: '#/components/schemas/MigrationConfigPoliciesDTO' - vcs: - type: array - items: - type: string - vps: - type: array - items: - type: string - schemas: - type: object - groups: - type: object - roles: - type: object - required: - - policies - - vcs - - vps - - schemas - - groups - - roles - PolicyCategoryDTO: - type: object - properties: - id: - type: string - name: - type: string - type: - type: string - required: - - id - - name - - type - SchemaDTO: - type: object - properties: - id: - type: string - name: - type: string - description: - type: string - entity: - type: string - document: - type: string - uuid: - type: string - iri: - type: string - hash: - type: string - status: - type: string - topicId: - type: string - version: - type: string - owner: - type: string - messageId: - type: string - required: - - id - - name - - description - - entity - - document - - uuid - - iri - - hash - - status - - topicId - - version - - owner - - messageId - VersionSchemaDTO: - type: object - properties: - version: - type: string - required: - - version - MessageSchemaDTO: - type: object - properties: - messageId: - type: string - required: - - messageId - ExportSchemaDTO: - type: object - properties: - id: - type: string - name: - type: string - description: - type: string - version: - type: string - owner: - type: string - messageId: - type: string - required: - - id - - name - - description - - version - - owner - - messageId - SystemSchemaDTO: - type: object - properties: - name: - type: string - entity: - type: string - required: - - name - - entity - SettingsDTO: - type: object - properties: - ipfsStorageApiKey: - type: string - operatorId: - type: string - operatorKey: - type: string - required: - - ipfsStorageApiKey - - operatorId - - operatorKey - SuggestionsInputDTO: - type: object - properties: - blockType: - type: string - children: - nullable: true - type: array - items: - type: object - required: - - blockType - - children - SuggestionsOutputDTO: - type: object - properties: - next: - type: string - nested: - type: string - required: - - next - - nested - SuggestionsConfigItemDTO: - type: object - properties: - id: - type: string - type: - type: string - enum: - - Policy - - Module - index: - type: number - required: - - id - - type - - index - SuggestionsConfigDTO: - type: object - properties: - items: - $ref: '#/components/schemas/SuggestionsConfigItemDTO' - required: - - items - NotificationDTO: - type: object - properties: - title: - type: string - message: - type: string - type: - type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - action: - type: string - enum: - - POLICY_CONFIGURATION - - POLICY_VIEW - - POLICIES_PAGE - - SCHEMAS_PAGE - - TOKENS_PAGE - - PROFILE_PAGE - result: - type: object - read: - type: boolean - old: - type: boolean - required: - - title - - message - - type - - action - - result - - read - - old - ProgressDTO: - type: object - properties: - action: - type: string - message: - type: string - progress: - type: number - type: - type: string - enum: - - INFO - - ERROR - - WARN - - SUCCESS - taskId: - type: string - required: - - action - - message - - progress - - type - - taskId - ProjectDTO: - type: object - properties: - id: - type: string - policyId: - type: string - policyName: - type: string - registered: - type: string - title: - type: string - companyName: - type: string - sectoralScope: - type: string - required: - - id - - policyId - - policyName - - registered - - title - - companyName - - sectoralScope - PropertiesDTO: - type: object - properties: - id: - type: string - title: - type: string - value: - type: string - required: - - id - - title - - value - RecordStatusDTO: - type: object - properties: - type: - type: string - policyId: - type: string - uuid: - type: string - status: - type: string - required: - - type - - policyId - - uuid - - status - Object: - type: object - properties: {} - RecordActionDTO: - type: object - properties: - uuid: - type: string - policyId: - type: string - method: - type: string - action: - type: string - time: - type: string - user: - type: string - target: - type: string - required: - - uuid - - policyId - - method - - action - - time - - user - - target - ResultInfoDTO: - type: object - properties: - tokens: - type: number - documents: - type: number - required: - - tokens - - documents - ResultDocumentDTO: - type: object - properties: - type: - type: string - schema: - type: string - rate: - type: string - documents: - type: object - required: - - type - - schema - - rate - - documents - RunningResultDTO: - type: object - properties: - info: - $ref: '#/components/schemas/ResultInfoDTO' - total: - type: number - documents: - $ref: '#/components/schemas/ResultDocumentDTO' - required: - - info - - total - - documents - RunningDetailsDTO: - type: object - properties: - left: - type: object - right: - type: object - total: - type: number - documents: - type: object - required: - - left - - right - - total - - documents - RegisteredUsersDTO: - type: object - properties: - username: - type: string - did: - type: string - parent: - type: string - role: - type: string - policyRoles: - type: array - items: - type: string - required: - - username - - did - - parent - - role - - policyRoles - ToolDTO: - type: object - properties: - id: - type: string - uuid: - type: string - name: - type: string - description: - type: string - config: - type: object - status: - type: string - creator: - type: string - owner: - type: string - topicId: - type: string - messageId: - type: string - codeVersion: - type: string - createDate: - type: string - required: - - id - - uuid - - name - - description - - config - - status - - creator - - owner - - topicId - - messageId - - codeVersion - - createDate - Credentials: - type: object - required: - - username - - password - properties: - username: - type: string - password: - type: string - Account: - type: object - required: - - username - - role - properties: - username: - type: string - role: - type: string - did: - type: string - Session: - type: object - required: - - username - - role - - accessToken - properties: - username: - type: string - role: - type: string - accessToken: - type: string - User: - type: object - required: - - username - - role - properties: - confirmed: - type: string - failed: - type: string - username: - type: string - role: - type: string - hederaAccountId: - type: string - hederaAccountKey: - type: string - did: - type: string - didDocument: - type: object - vcDocument: - type: object - parent: - type: string - topicId: - type: string - Schema: - type: object - required: - - id - - name - - description - - entity - - document - properties: - id: - type: string - iri: - type: string - uuid: - type: string - name: - type: string - description: - type: string - entity: - type: string - hash: - type: string - status: - type: string - document: - oneOf: - - type: string - - type: object - topicId: - type: string - version: - type: string - owner: - type: string - messageId: - type: string - ImportSchema: - type: object - required: - - schemes - properties: - schemes: - type: array - items: - type: object - required: - - document - - entity - - name - - uuid - properties: - document: - type: string - entity: - type: string - hash: - type: string - name: - type: string - uuid: - type: string - ExportSchema: - type: object - required: - - ids - properties: - name: - type: string - version: - type: string - messageId: - type: string - Token: - type: object - required: - - changeSupply - - decimals - - enableAdmin - - enableKYC - - enableFreeze - - enableWipe - - initialSupply - - tokenName - - tokenSymbol - - tokenType - properties: - changeSupply: - type: boolean - decimals: - type: string - enableAdmin: - type: boolean - enableFreeze: - type: boolean - enableKYC: - type: boolean - enableWipe: - type: boolean - initialSupply: - type: string - tokenName: - type: string - tokenSymbol: - type: string - tokenType: - type: string - TokenInfo: - type: object - required: - - id - - tokenId - - tokenName - - tokenSymbol - - tokenType - - decimals - - associated - - balance - - frozen - - kyc - properties: - id: - type: string - tokenId: - type: string - tokenName: - type: string - tokenSymbol: - type: string - tokenType: - type: string - decimals: - type: string - associated: - type: boolean - balance: - type: string - frozen: - type: boolean - kyc: - type: boolean - enableAdmin: - type: boolean - enableKYC: - type: boolean - enableFreeze: - type: boolean - enableWipe: - type: boolean - PolicyConfig: - type: object - required: - - name - - version - - description - - topicDescription - - config - - topicId - - policyTag - properties: - id: - type: string - uuid: - type: string - name: - type: string - version: - type: string - description: - type: string - topicDescription: - type: string - config: - type: object - status: - type: string - owner: - type: string - policyRoles: - type: array - items: - type: string - topicId: - type: string - policyTag: - type: string - policyTopics: - type: array - items: - type: object - properties: - name: - type: string - description: - type: string - type: - type: string - static: - type: boolean - TrustChains: - type: object - required: - - chain - - userMap - properties: - chain: - type: array - items: - type: object - required: - - id - - type - - tag - - label - - schema - - owner - - document - properties: - id: - type: string - type: - type: string - tag: - type: string - label: - type: string - schema: - type: string - owner: - type: string - document: - type: object - userMap: - type: array - items: - type: object - required: - - did - - username - properties: - did: - type: string - username: - type: string - VerifiablePresentation: - type: object - required: - - hash - - id - - policyId - - signature - - status - - tag - - type - - updateDate - - createDate - - owner - - document - properties: - hash: - type: string - id: - type: string - policyId: - type: string - signature: - type: string - status: - type: string - tag: - type: string - type: - type: string - updateDate: - type: string - createDate: - type: string - owner: - type: string - document: - type: object - PublishPolicy: - type: object - required: - - errors - - isValid - - policies - properties: - errors: - type: array - items: - type: object - isValid: - type: boolean - policies: - type: array - items: - type: object - ValidatePolicy: - type: object - required: - - config - - results - properties: - config: - type: object - results: - type: object - PolicyBlock: - type: object - required: - - id - - blockType - - isActive - - uiMetaData - properties: - id: - type: string - blockType: - type: string - isActive: - type: boolean - uiMetaData: - type: object - blocks: - type: array - items: - type: object - PolicyBlockData: - type: object - required: - - id - - isActive - - uiMetaData - - data - properties: - id: - type: string - blockType: - type: string - isActive: - type: boolean - uiMetaData: - type: object - data: - type: object - fields: - type: array - items: - type: object - index: - type: number - roles: - type: array - items: - type: string - blocks: - type: array - items: - $ref: '#/components/schemas/PolicyBlock' - ExportPolicy: - type: object - required: - - name - - version - - messageId - properties: - name: - type: string - version: - type: string - tokens: - type: string - PreviewPolicy: - type: object - required: - - policy - - schemas - - tokens - properties: - policy: - type: object - schemas: - type: array - items: - type: object - tokens: - type: array - items: - type: object - Error: - type: object - required: - - code - - message - properties: - code: - type: number - message: - type: string - ExternalData: - type: object - required: - - owner - - policyTag - - document - properties: - owner: - type: string - policyTag: - type: string - document: - type: object - HederaAccount: - type: object - required: - - id - - key - properties: - id: - type: string - key: - type: string - CommonSettings: - type: object - properties: - operatorId: - type: string - operatorKey: - type: string - nftApiKey: - deprecated: true - type: string - ipfsStorageApiKey: - type: string - LogFilters: - type: object - properties: - type: - type: string - startDate: - type: string - endDate: - type: string - attributes: - type: array - items: - type: string - message: - type: string - pageSize: - type: number - pageIndex: - type: number - sortDirection: - type: string - enum: - - ASC - - DESC - Log: - type: object - properties: - type: - type: string - datetime: - type: string - message: - type: string - attributes: - type: array - items: - type: string - Task: - type: object - properties: - taskId: - type: string - expectation: - type: number - TaskStatus: - type: object - properties: - date: - type: string - name: - type: string - statuses: - type: array - items: - type: object - properties: - type: - type: string - message: - type: string - result: - type: object - error: - type: object - Artifact: - type: object - properties: - id: - type: string - name: - type: string - uuid: - type: string - extention: - type: string - type: - type: string - MultiPolicyConfig: - type: object - properties: - id: - type: string - uuid: - type: string - owner: - type: string - type: - type: string - instanceTopicId: - type: string - mainPolicyTopicId: - type: string - synchronizationTopicId: - type: string - policyOwner: - type: string - user: - type: string - Contract: - type: object - properties: - id: - type: string - contractId: - type: string - description: - type: string - owner: - type: string - isOwnerCreator: - type: string - status: - type: string - RetireRequest: - type: object - properties: - id: - type: string - contractId: - type: string - baseTokenId: - type: string - owner: - type: string - oppositeTokenId: - type: string - baseTokenCount: - type: number - oppositeTokenCount: - type: number - Module: - type: object - properties: - id: - type: string - uuid: - type: string - name: - type: string - description: - type: string - config: - type: object - status: - type: string - creator: - type: string - owner: - type: string - topicId: - type: string - messageId: - type: string - codeVersion: - type: string - createDate: - type: string - type: - type: string - PreviewModule: - type: object - properties: - module: - $ref: '#/components/schemas/Module' - ExportModule: - type: object - properties: - uuid: - type: string - name: - type: string - description: - type: string - messageId: - type: string - owner: - type: string - PublishModule: - type: object - properties: - errors: - type: object - isValid: - type: boolean - module: - $ref: '#/components/schemas/Module' - ValidateModule: - type: object - properties: - module: - $ref: '#/components/schemas/Module' - results: - type: object - Tag: - type: object - required: - - name - - entity - - localTarget - properties: - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Tag label - description: - type: string - example: Description - owner: - type: string - example: did - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: - type: string - example: '0000000000.000000000' - localTarget: - type: string - example: db id - status: - type: string - enum: - - Draft - - Published - - History - example: Published - operation: - type: string - enum: - - Create - - Delete - example: Create - date: - type: string - example: '1900-01-01T00:00:00.000Z' - topicId: - type: string - example: 0.0.0000000 - messageId: - type: string - example: '0000000000.000000000' - policyId: - type: string - example: db id - uri: - type: string - example: document uri - document: - type: object - TagMap: - type: object - required: - - entity - - target - - refreshDate - - tags - properties: - entity: - type: string - enum: - - Schema - - Policy - - Token - - Module - - Contract - - PolicyDocument - example: PolicyDocument - target: - type: string - example: db id - refreshDate: - type: string - example: '1900-01-01T00:00:00.000Z' - tags: - type: array - items: - $ref: '#/components/schemas/Tag' - Theme: - type: object - required: - - uuid - - name - - rules - properties: - id: - type: string - example: db id - uuid: - type: string - example: 00000000-0000-0000-0000-000000000000 - name: - type: string - example: Theme name - rules: - type: array - items: - type: object - required: - - text - - background - - border - - shape - - borderWidth - - filterType - - filterValue - properties: - description: - type: string - example: description - text: - type: string - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - background: - type: string - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - border: - type: string - pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) - example: '#000000' - shape: - type: string - enum: - - '0' - - '1' - - '2' - - '3' - - '4' - - '5' - example: '0' - borderWidth: - type: string - enum: - - 0px - - 1px - - 2px - - 3px - - 4px - - 5px - - 6px - - 7px - example: 2px - filterType: - type: string - enum: - - type - - api - - role - example: type - filterValue: - oneOf: - - type: string - - type: array - items: - type: string - example: - - type - WizardConfig: - type: object - required: - - policy - - roles - - schemas - - trustChain - properties: - roles: - type: array - items: - type: string - policy: - type: object - properties: - name: - type: string - description: - type: string - topicDescription: - type: string - policyTag: - type: string - schemas: - type: array - items: - type: object - properties: - name: - type: string - iri: - type: string - isApproveEnable: - type: boolean - isMintSchema: - type: boolean - mintOptions: - type: object - properties: - tokenId: - type: string - rule: - type: string - dependencySchemaIri: - type: string - relationshipsSchemaIri: - type: string - initialRolesFor: - type: array - items: - type: string - rolesConfig: - type: array - items: - type: object - properties: - role: - type: string - isApprover: - type: boolean - isCreator: - type: boolean - gridColumns: - type: array - items: - type: object - properties: - field: - type: string - title: - type: string - trustChain: - type: array - items: - type: object - properties: - role: - type: string - mintSchemaIri: - type: string - viewOnlyOwnDocuments: - type: boolean +openapi: 3.0.0 +paths: + /accounts/session: + get: + operationId: AccountApi_getSession + summary: Returns current session of the user. + description: Returns current user session. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_0 + - accounts + security: + - bearer: [] + /accounts/register: + post: + operationId: AccountApi_register + summary: Registers a new user account. + description: Object that contain username, password and role (optional) fields. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RegisterUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/login: + post: + operationId: AccountApi_login + summary: Logs user into the system. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LoginUserDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsSessionResponseDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /accounts/access-token: + post: + operationId: AccountApi_getAccessToken + summary: Returns access token. + description: Returns access token. + parameters: [] + responses: + '200': + description: Successful operation. + tags: *ref_0 + /accounts: + get: + operationId: AccountApi_getAllAccounts + summary: Returns a list of users, excluding Standard Registry and Auditors. + description: >- + Returns all users except those with roles Standard Registry and Auditor. + Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/standard-registries: + get: + operationId: AccountApi_getStandardRegistries + summary: Returns all Standard Registries. + description: Returns all Standard Registries. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/standard-registries/aggregated: + get: + operationId: AccountApi_getAggregatedStandardRegistries + summary: Returns all Standard Registries aggregated with polices and vcDocuments. + description: Returns all Standard Registries aggregated with polices and vcDocuments + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AggregatedDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /accounts/balance: + get: + operationId: AccountApi_getBalance + summary: Returns user's Hedera account balance. + description: Requests current Hedera account balance. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceResponseDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + security: + - bearer: [] + /analytics/search/policies: + post: + operationId: AnalyticsApi_searchPolicies + summary: Search policies. + description: >- + Search policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchPoliciesDTO' + examples: + Filter: + value: + policyId: '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_1 + - analytics + security: + - bearer: [] + /analytics/compare/policies: + post: + operationId: AnalyticsApi_comparePolicies + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter3: + value: + policies: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ComparePoliciesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/modules: + post: + operationId: AnalyticsApi_compareModules + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000001' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareModulesDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/schemas: + post: + operationId: AnalyticsApi_compareSchemas + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000001' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareSchemasDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/documents: + post: + operationId: AnalyticsApi_compareDocuments + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/tools: + post: + operationId: AnalyticsApi_compareTools + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000001' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareToolsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/policies/export: + post: + operationId: AnalyticsApi_comparePoliciesExport + summary: Compare policies. + description: >- + Compare policies. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterPoliciesDTO' + examples: + Filter1: + value: + policyId1: '000000000000000000000001' + policyId2: '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter2: + value: + policyIds: + - '000000000000000000000001' + - '000000000000000000000001' + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + Filter3: + value: + policies: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + eventsLvl: '0' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/modules/export: + post: + operationId: AnalyticsApi_compareModulesExport + summary: Compare modules. + description: >- + Compare modules. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterModulesDTO' + examples: + Filter: + value: + moduleId1: '000000000000000000000001' + moduleId2: '000000000000000000000001' + propLvl: '0' + childrenLvl: '0' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/schemas/export: + post: + operationId: AnalyticsApi_compareSchemasExport + summary: Compare schemas. + description: >- + Compare schemas. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSchemasDTO' + examples: + Filter: + value: + schemaId1: '000000000000000000000001' + schemaId2: '000000000000000000000001' + idLvl: '0' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/documents/export: + post: + operationId: AnalyticsApi_compareDocumentsExport + summary: Compare documents. + description: >- + Compare documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/compare/tools/export: + post: + operationId: AnalyticsApi_compareToolsExport + summary: Compare tools. + description: >- + Compare tools. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: type + required: true + in: query + description: File type + example: csv + schema: + type: string + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterToolsDTO' + examples: + Filter1: + value: + toolId1: '000000000000000000000001' + toolId2: '000000000000000000000001' + Filter2: + value: + toolIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /analytics/search/blocks: + post: + operationId: AnalyticsApi_searchBlocks + summary: Search same blocks. + description: >- + Search same blocks. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterSearchBlocksDTO' + examples: + Filter: + value: + uuid: '' + config: {} + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchBlocksDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + security: + - bearer: [] + /artifacts: + get: + operationId: ArtifactApi_getArtifactsV2 + summary: Returns all artifacts. + description: Returns all artifacts. + parameters: + - name: id + required: false + in: query + description: Artifact identifier + example: '000000000000000000000001' + schema: + type: string + - name: type + required: false + in: query + description: Tool|Policy + example: policy + schema: + enum: + - tool + - policy + type: string + - name: policyId + required: false + in: query + description: Policy identifier + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool identifier + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ArtifactDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_2 + - artifacts + security: + - bearer: [] + /artifacts/{parentId}: + post: + operationId: ArtifactApi_uploadArtifacts + summary: Upload artifact. + description: Upload artifact. For users with the Standard Registry role only. + parameters: + - name: parentId + required: true + in: path + description: Parent ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Form data with artifacts. + content: + multipart/form-data: + schema: + type: array + items: + type: object + properties: + artifacts: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ArtifactDTOItem' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /artifacts/{artifactId}: + delete: + operationId: ArtifactApi_deleteArtifact + summary: Delete artifact. + description: Delete artifact. + parameters: + - name: artifactId + required: true + in: path + description: Artifact ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_2 + security: + - bearer: [] + /contracts: + get: + operationId: ContractsApi_getContracts + summary: Return a list of all contracts. + description: Returns all contracts. + parameters: + - name: type + required: true + in: query + description: Contract type + example: RETIRE + schema: + enum: + - WIPE + - RETIRE + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Contracts. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_3 + - contracts + security: + - bearer: [] + post: + operationId: ContractsApi_createContract + summary: Create contract. + description: >- + Create smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ContractConfigDTO' + responses: + '201': + description: Created contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/import: + post: + operationId: ContractsApi_importContract + summary: Import contract. + description: >- + Import smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + contractId: + type: string + description: Hedera Identifier + example: 0.0.1 + description: + type: string + required: + - contractId + responses: + '200': + description: Imported contract. + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/{contractId}/permissions: + get: + operationId: ContractsApi_contractPermissions + summary: Get contract permissions. + description: >- + Get smart-contract permissions. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Contract permissions. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/{contractId}: + delete: + operationId: ContractsApi_removeContract + summary: Remove contract. + description: >- + Remove smart-contract. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests: + get: + operationId: ContractsApi_getWipeRequests + summary: Return a list of all wipe requests. + description: >- + Returns all wipe requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WiperRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/enable: + post: + operationId: ContractsApi_enableWipeRequests + summary: Enable wipe requests. + description: >- + Enable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests/disable: + post: + operationId: ContractsApi_disableWipeRequests + summary: Disable wipe requests. + description: >- + Disable wipe contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveWipeRequest + summary: Approve wipe request. + description: >- + Approve wipe contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/requests/{requestId}/reject: + delete: + operationId: ContractsApi_rejectWipeRequest + summary: Reject wipe request. + description: >- + Reject wipe contract request. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: ban + required: false + in: query + description: Reject and ban + example: true + schema: + type: boolean + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/requests: + delete: + operationId: ContractsApi_clearWipeRequests + summary: Clear wipe requests. + description: >- + Clear wipe contract requests. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_wipeAddAdmin + summary: Add wipe admin. + description: >- + Add wipe contract admin. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/manager/{hederaId}: + post: + operationId: ContractsApi_wipeAddManager + summary: Add wipe manager. + description: >- + Add wipe contract manager. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveManager + summary: Remove wipe manager. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/wipe/{contractId}/wiper/{hederaId}: + post: + operationId: ContractsApi_wipeAddWiper + summary: Add wipe wiper. + description: >- + Add wipe contract wiper. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_wipeRemoveWiper + summary: Remove wipe wiper. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/pools/sync: + post: + operationId: ContractsApi_retireSyncPools + summary: Sync retire pools. + description: >- + Sync retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Sync date. + content: + application/json: + schema: + $ref: '#/components/schemas/Date' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests: + get: + operationId: ContractsApi_getRetireRequests + summary: Return a list of all retire requests. + description: Returns all retire requests. + parameters: + - name: contractId + required: true + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetireRequestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools: + get: + operationId: ContractsApi_getRetirePools + summary: Return a list of all retire pools. + description: Returns all retire pools. + parameters: + - name: contractId + required: true + in: query + description: Contract identifier + example: 0.0.1 + schema: + type: string + - name: tokens + required: true + in: query + description: Tokens + example: 0.0.1,0.0.2,0.0.3 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/requests: + delete: + operationId: ContractsApi_clearRetireRequests + summary: Clear retire requests. + description: >- + Clear retire contract requests. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/pools: + delete: + operationId: ContractsApi_clearRetirePools + summary: Clear retire pools. + description: >- + Clear retire contract pools. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + post: + operationId: ContractsApi_setRetirePool + summary: Set retire pool. + description: >- + Set retire contract pool. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RetirePoolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools/{poolId}: + delete: + operationId: ContractsApi_unsetRetirePool + summary: Unset retire pool. + description: >- + Unset retire contract pool. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: poolId + required: true + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}: + delete: + operationId: ContractsApi_unsetRetireRequest + summary: Unset retire request. + description: >- + Unset retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/pools/{poolId}/retire: + post: + operationId: ContractsApi_retire + summary: Retire tokens. + description: Retire tokens. + parameters: + - name: poolId + required: true + in: path + description: Pool Identifier + example: 652745597a7b53526de37c05 + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RetireRequestTokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/approve: + post: + operationId: ContractsApi_approveRetire + summary: Approve retire request. + description: >- + Approve retire contract request. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/requests/{requestId}/cancel: + delete: + operationId: ContractsApi_cancelRetireRequest + summary: Cancel retire request. + description: Cancel retire contract request. + parameters: + - name: requestId + required: true + in: path + description: Request identifier + example: 652745597a7b53526de37c05 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire/{contractId}/admin/{hederaId}: + post: + operationId: ContractsApi_retireAddAdmin + summary: Add retire admin. + description: >- + Add retire contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + delete: + operationId: ContractsApi_retireRemoveAdmin + summary: Remove wipe admin. + description: >- + Remove wipe contract admin. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: contractId + required: true + in: path + description: Contract identifier + example: 652745597a7b53526de37c05 + schema: + type: string + - name: hederaId + required: true + in: path + description: Hedera identifier + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /contracts/retire: + get: + operationId: ContractsApi_getRetireVCs + summary: Return a list of all retire vcs. + description: Returns all retire vcs. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: true + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_3 + security: + - bearer: [] + /demo/registered-users: + get: + operationId: DemoApi_registeredUsers + summary: Returns list of registered users. + description: Returns list of registered users. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RegisteredUsersDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_4 + - demo + /demo/random-key: + get: + operationId: DemoApi_randomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearer: [] + /demo/push/random-key: + get: + operationId: DemoApi_pushRandomKey + summary: Generate demo key. + description: Generate demo key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_4 + security: + - bearer: [] + /external: + post: + operationId: ExternalApi_receiveExternalData + summary: Sends data from an external source. + description: Sends data from an external source. + parameters: [] + requestBody: + required: true + description: Object that contains a VC Document. + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - external + /ipfs/file: + post: + operationId: IpfsApi_postFile + summary: Add file from ipfs. + description: Add file from ipfs. + parameters: [] + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_5 + - ipfs + security: + - bearer: [] + /ipfs/file/dry-run/{policyId}: + post: + operationId: IpfsApi_postFileDryRun + summary: Add file from ipfs for dry run mode. + description: Add file from ipfs for dry run mode. + parameters: + - name: policyId + required: true + in: path + description: Policy id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Binary data. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /ipfs/file/{cid}: + get: + operationId: IpfsApi_getFile + summary: Get file from ipfs. + description: Get file from ipfs. + parameters: + - name: cid + required: true + in: path + description: File cid + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /ipfs/file/{cid}/dry-run: + get: + operationId: IpfsApi_getFileDryRun + summary: Get file from ipfs for dry run mode. + description: Get file from ipfs for dry run mode. + parameters: + - name: cid + required: true + in: path + description: File cid + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_5 + security: + - bearer: [] + /logs: + post: + operationId: LoggerApi_getLogs + summary: Return a list of all logs. + description: >- + Return a list of all logs. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/LogFilterDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/LogResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_6 + - logs + security: + - bearer: [] + /logs/attributes: + get: + operationId: LoggerApi_getAttributes + summary: Return a list of attributes. + description: >- + Return a list of attributes. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: name + required: false + in: query + description: Name + example: Search + schema: + type: number + - name: existingAttributes + required: false + in: query + description: Existing attributes + example: + - WORKER + schema: + type: array + items: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearer: [] + /logs/seq: + get: + operationId: LoggerApi_getSeqUrl + summary: Return url on seq store. + description: >- + Return url on seq store. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + seq_url: + type: string + example: http://localhost:5341 + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearer: [] + /map/key: + get: + operationId: MapApi_getKey + summary: Get map API key. + description: Return map API key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_7 + - map + security: + - bearer: [] + /map/sh: + get: + operationId: MapApi_getSentinelKey + summary: Get sentinel API key. + description: Return sentinel API key. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_7 + security: + - bearer: [] + /metrics: + get: + operationId: MetricsApi_getMetrics + parameters: [] + responses: + '200': + description: '' + tags: + - metrics + /modules: + post: + operationId: ModulesApi_postModules + summary: Creates a new module. + description: >- + Creates a new module. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_8 + - modules + security: + - bearer: [] + get: + operationId: ModulesApi_getModulesV2 + summary: Return a list of all modules. + description: >- + Returns all modules. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/schemas: + get: + operationId: ModulesApi_getModuleSchemas + summary: Return a list of all module schemas. + description: >- + Returns all module schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + post: + operationId: ModulesApi_postSchemas + summary: Creates a new module schema. + description: >- + Creates a new module schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '201': + description: Created schema. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}: + delete: + operationId: ModulesApi_deleteModule + summary: Deletes the module. + description: >- + Deletes the module with the provided module ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + get: + operationId: ModulesApi_getModule + summary: Retrieves module configuration. + description: >- + Retrieves module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + put: + operationId: ModulesApi_putModule + summary: Updates module configuration. + description: >- + Updates module configuration for the specified module ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/menu: + get: + operationId: ModulesApi_getMenu + summary: Return a list of modules. + description: >- + Returns modules menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/export/file: + get: + operationId: ModulesApi_moduleExportFile + summary: >- + Return module and its artifacts in a zip file format for the specified + module. + description: >- + Returns a zip file containing the published module and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: File. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/export/message: + get: + operationId: ModulesApi_moduleExportMessage + summary: Return Heder message ID for the specified published module. + description: >- + Returns the Hedera message ID for the specified module published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/message: + post: + operationId: ModulesApi_moduleImportMessage + summary: Imports new module from IPFS. + description: >- + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/file: + post: + operationId: ModulesApi_moduleImportFile + summary: Imports new module from a zip file. + description: >- + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Created module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/message/preview: + post: + operationId: ModulesApi_moduleImportMessagePreview + summary: Imports new module from IPFS. + description: >- + Imports new module and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ModulePreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/import/file/preview: + post: + operationId: ModulesApi_moduleImportFilePreview + summary: Imports new module from a zip file. + description: >- + Imports new module and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ModulePreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/{uuid}/publish: + put: + operationId: ModulesApi_publishModule + summary: Publishes the module onto IPFS. + description: >- + Publishes the module with the specified (internal) module ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: uuid + required: true + in: path + description: Module Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Module. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /modules/validate: + post: + operationId: ModulesApi_validateModule + summary: Validates selected module. + description: >- + Validates selected module. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Module config. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_8 + security: + - bearer: [] + /tools: + post: + operationId: ToolsApi_createNewTool + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_9 + - tools + security: + - bearer: [] + get: + operationId: ToolsApi_getToolsV2 + summary: Return a list of all tools. + description: >- + Returns all tools. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push: + post: + operationId: ToolsApi_createNewToolAsync + summary: Creates a new tool. + description: >- + Creates a new tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}: + delete: + operationId: ToolsApi_deleteTool + summary: >- + Deletes the tool with the provided tool ID. Only users with the Standard + Registry role are allowed to make the request. + description: Deletes the tool. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + get: + operationId: ToolsApi_getToolById + summary: Retrieves tool configuration. + description: >- + Retrieves tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + put: + operationId: ToolsApi_updateTool + summary: Updates tool configuration. + description: >- + Updates tool configuration for the specified tool ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/publish: + put: + operationId: ToolsApi_publishTool + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/push/publish: + put: + operationId: ToolsApi_publishToolAsync + summary: Publishes the tool onto IPFS. + description: >- + Publishes the tool with the specified (internal) tool ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/validate: + post: + operationId: ToolsApi_validateTool + summary: Validates selected tool. + description: >- + Validates selected tool. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Tool configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/export/file: + get: + operationId: ToolsApi_toolExportFile + summary: >- + Return tool and its artifacts in a zip file format for the specified + tool. + description: >- + Returns a zip file containing the published tool and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/{id}/export/message: + get: + operationId: ToolsApi_toolExportMessage + summary: Return Heder message ID for the specified published tool. + description: >- + Returns the Hedera message ID for the specified tool published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: id + required: true + in: path + description: Tool ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/message/preview: + post: + operationId: ToolsApi_toolImportMessagePreview + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Tool preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/message: + post: + operationId: ToolsApi_toolImportMessage + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file/preview: + post: + operationId: ToolsApi_toolImportFilePreview + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Module preview. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file: + post: + operationId: ToolsApi_toolImportFile + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: File. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadata + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/file: + post: + operationId: ToolsApi_toolImportFileAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing tool config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/file-metadata: + post: + operationId: ToolsApi_toolImportFileWithMetadataAsync + summary: Imports new tool from a zip file. + description: >- + Imports new tool and all associated artifacts, such as schemas and VCs, + from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Form data with tool file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/push/import/message: + post: + operationId: ToolsApi_toolImportMessageAsync + summary: Imports new tool from IPFS. + description: >- + Imports new tool and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /tools/menu/all: + get: + operationId: ToolsApi_getMenu + summary: Return a list of tools. + description: >- + Returns tools menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_9 + security: + - bearer: [] + /profiles/{username}: + get: + operationId: ProfileApi_getProfile + summary: Returns user account info. + description: >- + Returns user account information. For users with the Standard Registry + role it also returns address book and VC document information. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the information + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ProfileDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_10 + - profiles + security: + - bearer: [] + put: + operationId: ProfileApi_setUserProfile + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Created. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/push/{username}: + put: + operationId: ProfileApi_setUserProfileAsync + summary: Sets Hedera credentials for the user. + description: >- + Sets Hedera credentials for the user. For users with the Standard + Registry role it also creates an address book. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to update the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/{username}/balance: + get: + operationId: ProfileApi_getUserBalance + summary: Returns user's Hedera account balance. + description: >- + Requests Hedera account balance. Only users with the Installer role are + allowed to make the request. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to fetch the balance. + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/restore/{username}: + put: + operationId: ProfileApi_restoreUserProfile + summary: Restore user data (policy, DID documents, VC documents). + description: Restore user data (policy, DID documents, VC documents). + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/restore/topics/{username}: + put: + operationId: ProfileApi_restoreTopic + summary: List of available recovery topics. + description: List of available recovery topics. + parameters: + - name: username + required: true + in: path + description: The name of the user for whom to restore the information. + example: username + schema: + type: string + requestBody: + required: true + description: Object that contains the Hedera account data. + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialsDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/did-document/validate: + post: + operationId: ProfileApi_validateDidDocument + summary: Validate DID document format. + description: Validate DID document format. + parameters: [] + requestBody: + required: true + description: DID Document. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /profiles/did-keys/validate: + post: + operationId: ProfileApi_validateDidKeys + summary: Validate DID document keys. + description: Validate DID document keys. + parameters: [] + requestBody: + required: true + description: DID Document and keys. + content: + application/json: + schema: + $ref: '#/components/schemas/DidDocumentWithKeyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/DidKeyStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_10 + security: + - bearer: [] + /policies: + get: + operationId: PolicyApi_getPoliciesV2 + summary: Return a list of all policies. + description: Returns all policies. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_11 + - policies + security: + - bearer: [] + post: + operationId: PolicyApi_createPolicy + summary: Creates a new policy. + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/migrate-data: + post: + operationId: PolicyApi_migrateData + summary: Migrate policy data. + description: >- + Migrate policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration config. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '200': + description: Errors while migration. + content: + application/json: + schema: + type: array + items: + type: object + properties: + error: + type: string + id: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/migrate-data: + post: + operationId: PolicyApi_migrateDataAsync + summary: Migrate policy data asynchronous. + description: >- + Migrate policy data asynchronous. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Migration configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/MigrationConfigDTO' + responses: + '202': + description: Created task. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push: + post: + operationId: PolicyApi_createPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/{policyId}: + post: + operationId: PolicyApi_updatePolicyAsync + summary: Clones policy. + description: >- + Clones policy. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + delete: + operationId: PolicyApi_deletePolicyAsync + summary: Remove policy. + description: >- + Remove policy. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}: + get: + operationId: PolicyApi_getPolicy + summary: Retrieves policy configuration. + description: >- + Retrieves policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + put: + operationId: PolicyApi_updatePolicy + summary: Updates policy configuration. + description: >- + Updates policy configuration for the specified policy ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicy + summary: Publishes the policy onto IPFS. + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PoliciesValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/{policyId}/publish: + put: + operationId: PolicyApi_publishPolicyAsync + summary: Publishes the policy onto IPFS. + description: >- + Publishes the policy with the specified (internal) policy ID onto IPFS, + sends a message featuring its IPFS CID into the corresponding Hedera + topic. Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run: + put: + operationId: PolicyApi_dryRunPolicy + summary: Dry Run policy. + description: >- + Run policy without making any persistent changes or executing + transaction. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PoliciesValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/discontinue: + put: + operationId: PolicyApi_discontinuePolicy + summary: Discontinue policy. + description: >- + Discontinue policy. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Discontinue details. + content: + application/json: + schema: + type: object + properties: + date: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/draft: + put: + operationId: PolicyApi_draftPolicy + summary: Return policy to editing. + description: >- + Return policy to editing. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/validate: + post: + operationId: PolicyApi_validatePolicy + summary: Validates policy. + description: >- + Validates selected policy. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + responses: + '200': + description: Validation result. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyValidationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/navigation: + get: + operationId: PolicyApi_getPolicyNavigation + summary: Returns a policy navigation. + description: Returns a policy navigation. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/groups: + get: + operationId: PolicyApi_getPolicyGroups + summary: Returns a list of groups the user is a member of. + description: Returns a list of groups the user is a member of. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setPolicyGroups + summary: Makes the selected group active. + description: >- + Makes the selected group active. if UUID is not set then returns the + user to the default state. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Group + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/documents: + get: + operationId: PolicyApi_getPolicyDocuments + summary: Get policy documents. + description: >- + Get policy documents. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: type + required: false + in: query + description: Document type. + example: VC + schema: + enum: + - VC + - VP + type: string + - name: includeDocument + required: false + in: query + description: Include document field. + example: true + schema: + type: boolean + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Documents. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/data: + get: + operationId: PolicyApi_downloadPolicyData + summary: Get policy data. + description: >- + Get policy data. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy data. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/data: + post: + operationId: PolicyApi_uploadPolicyData + summary: Upload policy data. + description: >- + Upload policy data. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Policy data file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Uploaded policy. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/virtual-keys: + get: + operationId: PolicyApi_downloadVirtualKeys + summary: Get policy virtual keys. + description: >- + Get policy virtual keys. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy virtual keys. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_uploadVirtualKeys + summary: Upload policy virtual keys. + description: >- + Upload policy virtual keys. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Virtual keys file + content: + application/json: + schema: + type: string + format: binary + responses: + '200': + description: Operation completed. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag-block-map: + get: + operationId: PolicyApi_getTagBlockMap + summary: Get policy tag block map. + description: >- + Get policy tag block map. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Policy tag block map. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks: + get: + operationId: PolicyApi_getPolicyBlocks + summary: Retrieves data for the policy root block. + description: >- + Returns data from the root policy block. Only users with the Standard + Registry and Installer role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks/{uuid}: + get: + operationId: PolicyApi_getBlockData + summary: Requests block data. + description: >- + Requests block data. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setBlockData + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + requestBody: + required: true + description: Data + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag/{tagName}/blocks: + post: + operationId: PolicyApi_setBlocksByTagName + summary: Sends data to the specified block. + description: Sends data to the specified block. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + requestBody: + required: true + description: Data + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + get: + operationId: PolicyApi_getBlocksByTagName + summary: Requests block data. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/tag/{tagName}: + get: + operationId: PolicyApi_getBlockByTagName + summary: Requests block config. + description: >- + Requests block data by tag. Only users with a role that described in + block are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: tagName + required: true + in: path + description: Block name (Tag) + example: block-tag + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/blocks/{uuid}/parents: + get: + operationId: PolicyApi_getBlockParents + summary: Requests block's parents. + description: >- + Requests block's parents. Only users with a role that described in block + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: uuid + required: true + in: path + description: Block Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/BlockDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/blocks/about: + get: + operationId: PolicyApi_getBlockAbout + summary: Returns block descriptions. + description: >- + Returns block descriptions. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Block descriptions. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/file: + get: + operationId: PolicyApi_getPolicyExportFile + summary: >- + Return policy and its artifacts in a zip file format for the specified + policy. + description: >- + Returns a zip file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/message: + get: + operationId: PolicyApi_getPolicyExportMessage + summary: Return Heder message ID for the specified published policy. + description: >- + Returns the Hedera message ID for the specified policy published onto + IPFS. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportMessageDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/export/xlsx: + get: + operationId: PolicyApi_getPolicyExportXlsx + summary: >- + Return policy and its artifacts in a xlsx file format for the specified + policy. + description: >- + Returns a xlsx file containing the published policy and all associated + artifacts, i.e. schemas and VCs. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/message: + post: + operationId: PolicyApi_importPolicyFromMessage + summary: Imports new policy from IPFS. + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Created policy. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/message: + post: + operationId: PolicyApi_importPolicyFromMessageAsync + summary: Imports new policy from IPFS. + description: >- + Imports new policy and all associated artifacts from IPFS into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/message/preview: + post: + operationId: PolicyApi_importMessage + summary: Policy preview from IPFS. + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Policy preview. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/message/preview: + post: + operationId: PolicyApi_importFromMessagePreview + summary: Policy preview from IPFS. + description: >- + Previews the policy from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Message. + content: + application/json: + schema: + $ref: '#/components/schemas/ImportMessageDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file: + post: + operationId: PolicyApi_importPolicyFromFile + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Created policy. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadata + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/file: + post: + operationId: PolicyApi_importPolicyFromFileAsync + summary: Imports new policy from a zip file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/file-metadata: + post: + operationId: PolicyApi_importPolicyFromFileWithMetadataAsync + summary: Imports new policy from a zip file with metadata. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided zip file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: versionOfTopicId + required: false + in: query + description: The topic ID of policy version. + example: 0.0.00000001 + schema: + type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean + requestBody: + required: true + description: Form data with policy file and metadata. + content: + multipart/form-data: + schema: + type: object + properties: + policyFile: + type: string + format: binary + metadata: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/file/preview: + post: + operationId: PolicyApi_importPolicyFromFilePreview + summary: Policy preview from a zip file. + description: >- + Previews the policy from a zip file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A zip file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Policy preview. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsx + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/push/import/xlsx: + post: + operationId: PolicyApi_importPolicyFromXlsxAsync + summary: Imports new policy from a xlsx file. + description: >- + Imports new policy and all associated artifacts, such as schemas and + VCs, from the provided xlsx file into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/import/xlsx/preview: + post: + operationId: PolicyApi_importPolicyFromXlsxPreview + summary: Policy preview from a xlsx file. + description: >- + Previews the policy from a xlsx file without loading it into the local + DB. Only users with the Standard Registry role are allowed to make the + request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing policy config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/users: + get: + operationId: PolicyApi_getDryRunUsers + summary: Returns virtual users. + description: >- + Returns virtual users. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/user: + post: + operationId: PolicyApi_setDryRunUser + summary: Creates virtual users. + description: >- + Creates virtual users. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/login: + post: + operationId: PolicyApi_loginDryRunUser + summary: Change active virtual user. + description: >- + Change active virtual user. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Credentials. + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Virtual users. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/restart: + post: + operationId: PolicyApi_restartDryRun + summary: Clear dry-run state. + description: >- + Clear dry-run state. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: . + content: + application/json: + schema: + type: string + responses: + '200': + description: . + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/transactions: + get: + operationId: PolicyApi_getDryRunTransactions + summary: Get dry-run details (Transactions). + description: >- + Get dry-run details (Transactions). Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Transactions. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/artifacts: + get: + operationId: PolicyApi_getDryRunArtifacts + summary: Get dry-run details (Artifacts). + description: >- + Get dry-run details (Artifacts). Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Artifacts. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/dry-run/ipfs: + get: + operationId: PolicyApi_getDryRunIpfs + summary: Get dry-run details (Files). + description: >- + Get dry-run details (Files). Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 20 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Files. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/multiple: + get: + operationId: PolicyApi_getMultiplePolicies + summary: Requests policy links. + description: >- + Requests policy links. Only users with a role that described in block + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + post: + operationId: PolicyApi_setMultiplePolicies + summary: Creates policy link. + description: >- + Creates policy link. Only users with a role that described in block are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test: + post: + operationId: PolicyApi_addPolicyTest + summary: Add policy test. + description: >- + Add policy test. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Form data with tests. + content: + multipart/form-data: + schema: + type: array + items: + type: object + properties: + tests: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}: + get: + operationId: PolicyApi_getPolicyTest + summary: Get policy test. + description: >- + Get policy test. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + delete: + operationId: PolicyApi_deletePolicyTest + summary: Delete policy test. + description: >- + Delete policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/start: + post: + operationId: PolicyApi_startPolicyTest + summary: Start policy test. + description: >- + Start policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/stop: + post: + operationId: PolicyApi_stopPolicyTest + summary: Stop policy test. + description: >- + Stop policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/details: + get: + operationId: PolicyApi_getTestDetails + summary: Get test details. + description: >- + Get test details. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/methodologies/categories: + get: + operationId: PolicyApi_getPolicyCategoriesAsync + summary: Get all categories + description: Get all categories + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyCategoryDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /policies/methodologies/search: + post: + operationId: PolicyApi_getPoliciesByCategory + summary: Get filtered policies + description: Get policies by categories and text + parameters: [] + requestBody: + required: true + description: Filters + content: + application/json: + schema: + type: string + examples: + Filter1: + value: + categoryIds: + - '000000000000000000000001' + - '000000000000000000000001' + text: abc + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + /schema/{schemaId}: + get: + operationId: SingleSchemaApi_getSchema + summary: Returns schema by schema ID. + description: >- + Returns schema by schema ID. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_12 + - schema + security: + - bearer: [] + /schema/{schemaId}/parents: + get: + operationId: SingleSchemaApi_getSchemaParents + summary: Returns all parent schemas. + description: Returns all parent schemas. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + /schema/{schemaId}/tree: + get: + operationId: SingleSchemaApi_getSchemaTree + summary: Returns schema tree. + description: Returns schema tree. + parameters: + - name: schemaId + required: true + in: path + description: Schema identifier + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + name: + type: string + type: + type: string + children: + type: array + items: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_12 + security: + - bearer: [] + /schemas: + get: + operationId: SchemaApi_getSchemasPageV2 + summary: Return a list of all schemas. + description: Returns all schemas. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: policyId + required: false + in: query + description: Policy id + example: '000000000000000000000001' + schema: + type: string + - name: moduleId + required: false + in: query + description: Module id + example: '000000000000000000000001' + schema: + type: string + - name: toolId + required: false + in: query + description: Tool id + example: '000000000000000000000001' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_13 + - schemas + security: + - bearer: [] + put: + operationId: SchemaApi_setSchema + summary: Updates the schema. + description: >- + Updates the schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}: + get: + operationId: SchemaApi_getSchemasPageByTopicId + summary: Return a list of all schemas. + description: Returns all schemas. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + post: + operationId: SchemaApi_createNewSchema + summary: Creates a new schema. + description: >- + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/type/{schemaType}: + get: + operationId: SchemaApi_getSchemaByType + summary: Finds the schema using the json document type. + description: Finds the schema using the json document type. + parameters: + - name: schemaType + required: true + in: path + description: Type + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/list/all: + get: + operationId: SchemaApi_getAll + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/list/sub: + get: + operationId: SchemaApi_getSub + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + example: 0.0.1 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/schema-with-sub-schemas: + get: + operationId: SchemaApi_getSchemaWithSubSchemas + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: category + required: false + in: query + description: Schema category + example: POLICY + schema: + type: string + - name: topicId + required: false + in: query + description: Topic Id + example: 0.0.1 + schema: + type: string + - name: schemaId + required: true + in: query + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/copy: + post: + operationId: SchemaApi_copySchemaAsync + summary: Copy schema. + description: >- + Copy schema. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}: + post: + operationId: SchemaApi_createNewSchemaAsync + summary: Creates a new schema. + description: >- + Creates a new schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}: + delete: + operationId: SchemaApi_deleteSchema + summary: Deletes the schema with the provided schema ID. + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchema + summary: Publishes the schema with the provided schema ID. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{schemaId}/publish: + put: + operationId: SchemaApi_publishSchemaAsync + summary: Publishes the schema with the provided schema ID. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionSchemaDTO' + examples: + Version: + value: + version: 1.0.0 + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreview + summary: Previews the schema from IPFS without loading it into the local DB. + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/import/message/preview: + post: + operationId: SchemaApi_importFromMessagePreviewAsync + summary: Previews the schema from IPFS without loading it into the local DB. + description: >- + Previews the schema from IPFS without loading it into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/file/preview: + post: + operationId: SchemaApi_importFromFilePreview + summary: Previews the schema from a zip file. + description: >- + Previews the schema from a zip file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessage + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/message: + post: + operationId: SchemaApi_importFromMessageAsync + summary: Imports new schema from IPFS into the local DB. + description: >- + Imports new schema from IPFS into the local DB. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains version. + content: + application/json: + schema: + $ref: '#/components/schemas/MessageSchemaDTO' + examples: + Message: + value: + messageId: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFile + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/file: + post: + operationId: SchemaApi_importToTopicFromFileAsync + summary: Imports new schema from a zip file into the local DB. + description: >- + Imports new schema from a zip file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A zip file containing schema to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/message: + get: + operationId: SchemaApi_exportMessage + summary: Returns Hedera message IDs of the published schemas. + description: >- + Returns Hedera message IDs of the published schemas, these messages + contain IPFS CIDs of these schema files. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ExportSchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/file: + get: + operationId: SchemaApi_exportToFile + summary: Returns schema files for the schema. + description: >- + Returns schema files for the schema. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{username}: + post: + operationId: SchemaApi_postSystemSchema + summary: Creates a new system schema. + description: >- + Creates a new system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: username + required: true + in: path + description: username + example: username + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SystemSchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + get: + operationId: SchemaApi_getSystemSchemaV2 + summary: Return a list of all system schemas. + description: >- + Returns all system schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: username + required: true + in: path + description: username + example: username + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{schemaId}: + delete: + operationId: SchemaApi_deleteSystemSchema + summary: Deletes the system schema with the provided schema ID. + description: >- + Deletes the system schema with the provided schema ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + put: + operationId: SchemaApi_setSystemSchema + summary: Updates the system schema. + description: >- + Updates the system schema. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: Object that contains a valid schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/{schemaId}/active: + put: + operationId: SchemaApi_activeSystemSchema + summary: >- + Makes the selected scheme active. Other schemes of the same type become + inactive + description: >- + Makes the selected scheme active. Other schemes of the same type become + inactive Only users with the Standard Registry role are allowed to make + the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/system/entity/{schemaEntity}: + get: + operationId: SchemaApi_getSchemaEntity + summary: Finds the schema using the schema type. + description: Finds the schema using the schema type. + parameters: + - name: schemaEntity + required: true + in: path + description: Entity name + example: STANDARD_REGISTRY + schema: + type: string + enum: + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - WIPE_TOKEN + - MINT_NFTOKEN + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{schemaId}/export/xlsx: + get: + operationId: SchemaApi_getPolicyExportXlsx + summary: Return schemas in a xlsx file format for the specified policy. + description: >- + Returns a xlsx file containing schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsx + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/push/{topicId}/import/xlsx: + post: + operationId: SchemaApi_importPolicyFromXlsxAsync + summary: Imports new schema from a xlsx file into the local DB. + description: >- + Imports new schema from a xlsx file into the local DB. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: topicId + required: true + in: path + description: Topic Id + example: 0.0.1 + schema: + type: string + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/import/xlsx/preview: + post: + operationId: SchemaApi_importPolicyFromXlsxPreview + summary: Previews the schema from a xlsx file. + description: >- + Previews the schema from a xlsx file. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A xlsx file containing schema config. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /schemas/export/template: + get: + operationId: SchemaApi_exportTemplate + summary: Returns a list of schemas. + description: >- + Returns a list of schemas. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_13 + security: + - bearer: [] + /settings: + post: + operationId: SettingsApi_updateSettings + summary: Set settings. + description: Set settings. For users with the Standard Registry role only. + parameters: [] + requestBody: + required: true + description: Settings. + content: + application/json: + schema: + $ref: '#/components/schemas/SettingsDTO' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_14 + - settings + security: + - bearer: [] + get: + operationId: SettingsApi_getSettings + summary: Returns current settings. + description: >- + Returns current settings. For users with the Standard Registry role + only. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/SettingsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /settings/environment: + get: + operationId: SettingsApi_getEnvironment + summary: Returns current environment name. + description: Returns current environment name. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /settings/about: + get: + operationId: SettingsApi_getAbout + summary: Returns package version. + description: Returns package version. For users with the Standard Registry role only. + parameters: [] + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_14 + security: + - bearer: [] + /tags: + post: + operationId: TagsApi_setTags + summary: Creates new tag. + description: Creates new tag. + parameters: [] + requestBody: + required: true + description: Object that contains tag information. + content: + application/json: + schema: + $ref: '#/components/schemas/TagDTO' + responses: + '200': + description: Created tag. + content: + application/json: + schema: + $ref: '#/components/schemas/TagDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_15 + - tags + security: + - bearer: [] + /tags/search: + post: + operationId: TagsApi_searchTags + summary: Search tags. + description: Search tags. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' + Multiple: + value: + entity: PolicyDocument + targets: + - '0000000000.000000001' + - '0000000000.000000001' + responses: + '200': + description: Created tag. + content: + application/json: + schema: + $ref: '#/components/schemas/TagMapDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/{uuid}: + delete: + operationId: TagsApi_deleteTag + summary: Delete tag. + description: Delete tag. + parameters: + - name: uuid + required: true + in: path + description: Tag identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/synchronization: + post: + operationId: TagsApi_synchronizationTags + summary: Synchronization of tags with an external network. + description: Synchronization of tags with an external network. + parameters: [] + requestBody: + required: true + description: Object that contains filters + content: + application/json: + schema: + $ref: '#/components/schemas/TagFilterDTO' + examples: + Single: + value: + entity: PolicyDocument + target: '0000000000.000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TagMapDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas: + get: + operationId: TagsApi_getSchemasV2 + summary: Return a list of all tag schemas. + description: >- + Returns all tag schemas. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + post: + operationId: TagsApi_postSchemas + summary: Creates a new tag schema. + description: >- + Creates a new tag schema. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '201': + description: Created schema. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/{schemaId}: + delete: + operationId: TagsApi_deleteSchema + summary: Deletes the schema. + description: >- + Deletes the schema with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + put: + operationId: TagsApi_updateSchema + summary: Updates schema configuration. + description: >- + Updates schema configuration for the specified schema ID. Only users + with the Standard Registry role are allowed to make the request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Schema config. + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/{schemaId}/publish: + put: + operationId: TagsApi_publishTag + summary: Publishes the schema. + description: >- + Publishes the schema with the provided (internal) schema ID onto IPFS, + sends a message featuring IPFS CID into the corresponding Hedera topic. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: schemaId + required: true + in: path + description: Schema Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tags/schemas/published: + get: + operationId: TagsApi_getPublished + summary: Return a list of all published schemas. + description: >- + Return a list of all published schemas. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SchemaDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_15 + security: + - bearer: [] + /tasks/{taskId}: + get: + operationId: TaskApi_getTask + summary: Returns task statuses by Id. + description: Returns task statuses by Id. + parameters: + - name: taskId + required: true + in: path + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - tasks + security: + - bearer: [] + /tokens: + get: + operationId: TokensApi_getTokensV2 + summary: Return a list of tokens. + description: >- + Returns all tokens. For the Standard Registry role it returns only the + list of tokens, for other users it also returns token balances as well + as the KYC, Freeze, and Association statuses. Not allowed for the + Auditor role. + parameters: + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: status + required: false + in: query + description: Token status + example: All + schema: + enum: + - Associated + - All + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_16 + - tokens + security: + - bearer: [] + post: + operationId: TokensApi_newToken + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + put: + operationId: TokensApi_updateToken + summary: Update token. + description: >- + Update token. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Updated token. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}: + get: + operationId: TokensApi_getTokenByIdWithPolicies + summary: Return a token by id. + description: Return the token. + parameters: + - name: tokenId + required: true + in: path + schema: + type: string + - name: policyId + required: true + in: query + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push: + post: + operationId: TokensApi_pushTokenAsync + summary: Creates a new token. + description: >- + Creates a new token. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + put: + operationId: TokensApi_updateTokenAsync + summary: Update token. + description: >- + Update token. Only users with the Standard Registry role are allowed to + make the request. + parameters: [] + requestBody: + required: true + description: Object that contains token information. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}: + delete: + operationId: TokensApi_deleteTokenAsync + summary: Deletes the token with the provided schema ID. + description: >- + Deletes the token with the provided schema ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/associate: + put: + operationId: TokensApi_associateToken + summary: Associates the user with the provided Hedera token. + description: >- + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/associate: + put: + operationId: TokensApi_associateTokenAsync + summary: Associates the user with the provided Hedera token. + description: >- + Associates the user with the provided Hedera token. Only users with the + Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateToken + summary: Associate the user with the provided Hedera token. + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/dissociate: + put: + operationId: TokensApi_dissociateTokenAsync + summary: Associate the user with the provided Hedera token. + description: >- + Disassociates the user with the provided Hedera token. Only users with + the Installer role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKyc + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/grant-kyc: + put: + operationId: TokensApi_grantKycAsync + summary: Sets the KYC flag for the user. + description: >- + Sets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKyc + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/revoke-kyc: + put: + operationId: TokensApi_revokeKycAsync + summary: Unsets the KYC flag for the user. + description: >- + Unsets the KYC flag for the user. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeToken + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeToken + summary: Unfreezes transfers of the specified token for the user. + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/freeze: + put: + operationId: TokensApi_freezeTokenAsync + summary: Freeze transfers of the specified token for the user. + description: >- + Freezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/push/{tokenId}/{username}/unfreeze: + put: + operationId: TokensApi_unfreezeTokenAsync + summary: Unfreezes transfers of the specified token for the user. + description: >- + Unfreezes transfers of the specified token for the user. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/{username}/info: + get: + operationId: TokensApi_getTokenInfo + summary: Returns user information for the selected token. + description: >- + Returns user information for the selected token. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + - name: username + required: true + in: path + description: Username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TokenInfoDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/{tokenId}/serials: + get: + operationId: TokensApi_getTokenSerials + summary: Return token serials. + description: Returns token serials of current user. + parameters: + - name: tokenId + required: true + in: path + description: Token ID + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Token serials. + content: + application/json: + schema: + type: array + items: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /tokens/menu/all: + get: + operationId: TokensApi_getMenu + summary: Return a list of tokens. + description: >- + Returns tokens menu. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Modules. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_16 + security: + - bearer: [] + /themes: + post: + operationId: ThemesApi_setThemes + summary: Creates a new theme. + description: >- + Creates a new theme. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains a theme. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_17 + - themes + security: + - bearer: [] + get: + operationId: ThemesApi_getThemes + summary: Returns a list of all themes. + description: >- + Returns a list of all themes. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/{themeId}: + put: + operationId: ThemesApi_updateTheme + summary: Updates theme configuration. + description: >- + Updates theme configuration for the specified theme ID. Only users with + the Standard Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains a theme. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + delete: + operationId: ThemesApi_deleteTheme + summary: Deletes the theme. + description: >- + Deletes the theme with the provided theme ID. Only users with the + Standard Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/import/file: + post: + operationId: ThemesApi_importTheme + summary: Imports new theme from a zip file. + description: >- + Imports new theme from the provided zip file into the local DB. Only + users with the Standard Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: A zip file containing theme to be imported. + content: + application/json: + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/ThemeDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /themes/{themeId}/export/file: + get: + operationId: ThemesApi_exportTheme + summary: Returns a zip file containing the theme. + description: >- + Returns a zip file containing the theme. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: themeId + required: true + in: path + description: Theme Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Response zip file. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_17 + security: + - bearer: [] + /trust-chains: + get: + operationId: TrustChainsApi_getTrustChains + summary: Returns a list of all VP documents. + description: >- + Returns a list of all VP documents. Only users with the Standard + Registry role are allowed to make the request. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: policyId + required: false + in: query + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: policyOwner + required: false + in: query + description: Policy Owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VpDocumentDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_18 + - trust-chains + security: + - bearer: [] + /trust-chains/{hash}: + get: + operationId: TrustChainsApi_getTrustChainByHash + summary: Builds and returns a trustchain, from the VP to the root VC document. + description: >- + Builds and returns a trustchain, from the VP to the root VC document. + Only users with the Standard Registry role are allowed to make the + request. + parameters: + - name: hash + required: true + in: path + description: Hash + example: hash + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + chain: + type: array + items: + type: object + properties: + id: + type: string + type: + type: string + tag: + type: string + label: + type: string + schema: + type: string + owner: + type: string + document: + type: object + required: + - id + - type + - tag + - label + - schema + - owner + - document + userMap: + type: array + items: + type: object + properties: + did: + type: string + username: + type: string + required: + - did + - username + required: + - chain + - userMap + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_18 + security: + - bearer: [] + /wizard/policy: + post: + operationId: WizardApi_setPolicy + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_19 + - wizard + security: + - bearer: [] + /wizard/push/policy: + post: + operationId: WizardApi_setPolicyAsync + summary: Creates a new policy. + description: >- + Creates a new policy by wizard. Only users with the Standard Registry + role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigAsyncDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/TaskDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 + security: + - bearer: [] + /wizard/{policyId}/config: + post: + operationId: WizardApi_setPolicyConfig + summary: Get policy config. + description: >- + Get policy config by wizard. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains wizard configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardConfigDTO' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/WizardPreviewDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_19 + security: + - bearer: [] + /branding: + post: + operationId: BrandingApi_setBranding + summary: Update branding. + description: >- + Update branding. Only users with the Standard Registry role are allowed + to make the request. + parameters: [] + requestBody: + required: true + description: Object that contains config. + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingDTO' + responses: + '200': + description: Successful operation. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_20 + - branding + security: + - bearer: [] + get: + operationId: BrandingApi_getBranding + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/BrandingDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_20 + /suggestions: + post: + operationId: SuggestionsApi_policySuggestions + summary: Get next and nested suggested block types + description: >- + Get next and nested suggested block types. Only users with the Standard + Registry role are allowed to make the request. + parameters: [] + requestBody: + required: true + description: Data. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsInputDTO' + responses: + '200': + description: >- + Successful operation. Suggested next and nested block types + respectively. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsOutputDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_21 + - suggestions + security: + - bearer: [] + /suggestions/config: + post: + operationId: SuggestionsApi_setPolicySuggestionsConfig + summary: Set suggestions config + description: >- + Set suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + requestBody: + required: true + description: Suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + responses: + '201': + description: Successful operation. Response setted suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + get: + operationId: SuggestionsApi_getPolicySuggestionsConfig + summary: Get suggestions config + description: >- + Get suggestions config. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. Response suggestions config. + content: + application/json: + schema: + $ref: '#/components/schemas/SuggestionsConfigDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_21 + security: + - bearer: [] + /notifications: + get: + operationId: NotificationsApi_getAllNotifications + summary: Get all notifications + description: Returns all notifications. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_22 + - notifications + security: + - bearer: [] + /notifications/new: + get: + operationId: NotificationsApi_getNewNotifications + summary: Get new notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns new notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/progresses: + get: + operationId: NotificationsApi_getProgresses + summary: Get progresses + description: Returns progresses. + parameters: [] + responses: + '200': + description: Successful operation. Returns progresses. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProgressDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/read/all: + post: + operationId: NotificationsApi_readAll + summary: Read all notifications + description: Returns new notifications. + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NotificationDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /notifications/delete/{notificationId}: + delete: + operationId: NotificationsApi_delete + summary: Delete notifications up to this point + description: Returns deleted notifications count. + parameters: + - name: notificationId + required: true + in: path + description: Notification Identifier + example: 00000000-0000-0000-0000-000000000000 + schema: + type: string + responses: + '200': + description: Successful operation. Returns deleted notifications count. + content: + application/json: + schema: + type: number + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_22 + security: + - bearer: [] + /projects/search: + post: + operationId: ProjectsAPI_projectSearch + summary: Search projects + description: Search projects by filters + parameters: [] + requestBody: + required: true + description: The question of choosing a methodology + content: + application/json: + schema: + type: string + examples: + q: + value: >- + What methodology can I use for production of electricity using + renewable energy technologies? + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_23 + - projects + /projects/compare/documents: + post: + operationId: ProjectsAPI_compareDocumentsV2 + summary: Compare documents. + description: Compare documents. + parameters: [] + requestBody: + required: true + description: Filters. + content: + application/json: + schema: + $ref: '#/components/schemas/FilterDocumentsDTO' + examples: + Filter1: + value: + documentId1: '000000000000000000000001' + documentId2: '000000000000000000000001' + Filter2: + value: + documentIds: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/CompareDocumentsV2DTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /projects/properties: + get: + operationId: ProjectsAPI_getPolicyProperties + summary: Get all properties + description: Get all properties + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PropertiesDTO' + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_23 + /record/{policyId}/status: + get: + operationId: RecordApi_getRecordStatus + summary: Get recording or running status. + description: >- + Get recording or running status. Only users with the Standard Registry + role are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RecordStatusDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_24 + - record + security: + - bearer: [] + /record/{policyId}/recording/start: + post: + operationId: RecordApi_startRecord + summary: Start recording. + description: >- + Start recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/stop: + post: + operationId: RecordApi_stopRecord + summary: Stop recording. + description: >- + Stop recording. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: string + format: binary + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/recording/actions: + get: + operationId: RecordApi_getRecordActions + summary: Get recorded actions. + description: >- + Get recorded actions. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RecordActionDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/start: + post: + operationId: RecordApi_runRecord + summary: Run record from a zip file. + description: >- + Run record from a zip file. Only users with the Standard Registry role + are allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: A zip file containing record to be run. + content: + application/json: + schema: + type: string + responses: + '200': + description: Record UUID. + content: + application/json: + schema: + type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/stop: + post: + operationId: RecordApi_stopRunning + summary: Stop running. + description: >- + Stop running. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/results: + get: + operationId: RecordApi_getRecordResults + summary: Get running results. + description: >- + Get running results. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningResultDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/details: + get: + operationId: RecordApi_getRecordDetails + summary: Get running details. + description: >- + Get running details. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/fast-forward: + post: + operationId: RecordApi_fastForward + summary: Fast Forward. + description: >- + Fast Forward. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/retry: + post: + operationId: RecordApi_retryStep + summary: Retry step. + description: >- + Retry step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /record/{policyId}/running/skip: + post: + operationId: RecordApi_skipStep + summary: Skip step. + description: >- + Skip step. Only users with the Standard Registry role are allowed to + make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Object that contains options + content: + application/json: + schema: + $ref: '#/components/schemas/Object' + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_24 + security: + - bearer: [] + /ai-suggestions/ask: + get: + operationId: AISuggestionsAPI_getAIAnswer + summary: Get methodology suggestion + description: Returns AI response to the current question + parameters: + - name: q + required: true + in: query + description: The question of choosing a methodology + example: Find me large scale projects + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + example: ACM0001, ACM0002, ACM0006, ACM0007, ACM0018 + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_25 + - ai-suggestions + /ai-suggestions/rebuild-vector: + put: + operationId: AISuggestionsAPI_rebuildVector + summary: Rebuild AI vector + description: Rebuilds vector based on policy data in the DB + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_25 + /permissions: + get: + operationId: PermissionsApi_getPermissions + summary: Return a list of all permissions. + description: Returns all permissions. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PermissionsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_26 + - permissions + security: + - bearer: [] + /permissions/roles: + get: + operationId: PermissionsApi_getRoles + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: name + required: false + in: query + description: Filter by role name + example: name + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + post: + operationId: PermissionsApi_createRole + summary: Creates new role. + description: Creates new role. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/{id}: + put: + operationId: PermissionsApi_updateRole + summary: Updates role configuration. + description: Updates role configuration for the specified role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + responses: + '200': + description: Role configuration. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + delete: + operationId: PermissionsApi_deleteModule + summary: Deletes the role. + description: Deletes the role with the provided role ID. + parameters: + - name: id + required: true + in: path + description: Role Identifier + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/roles/default: + post: + operationId: PermissionsApi_setDefaultRole + summary: Set default role. + description: Set the role as default for new users. + parameters: [] + requestBody: + required: true + description: Object that contains role information. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Role Identifier + example: '000000000000000000000001' + required: + - id + examples: + Default: + value: + id: '000000000000000000000001' + responses: + '200': + description: Created role. + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users: + get: + operationId: PermissionsApi_getUsers + summary: Return a list of all users. + description: Returns all users. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: role + required: false + in: query + description: Filter by role + example: '000000000000000000000001' + schema: + type: string + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - Active + - Inactive + type: string + - name: username + required: false + in: query + description: Filter by username + example: username + schema: + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}: + get: + operationId: PermissionsApi_getUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + put: + operationId: PermissionsApi_updateUser + summary: Updates user permissions. + description: Updates user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies: + get: + operationId: PermissionsApi_getAssignedPolicies + summary: Return a list of all roles. + description: Returns all roles. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + - name: status + required: false + in: query + description: Filter by status + example: Active + schema: + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + type: string + responses: + '200': + description: Successful operation. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/assign: + post: + operationId: PermissionsApi_assignPolicy + summary: Assign policy. + description: Assign policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/delegate: + put: + operationId: PermissionsApi_delegateRole + summary: Delegate user permissions. + description: Delegate user permissions for the specified username. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: User permissions. + content: + application/json: + schema: + type: array + items: + type: string + examples: + Roles: + value: + - '000000000000000000000001' + - '000000000000000000000001' + responses: + '200': + description: User permissions. + content: + application/json: + schema: + $ref: '#/components/schemas/UserDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /permissions/users/{username}/policies/delegate: + post: + operationId: PermissionsApi_delegatePolicy + summary: Delegate policy. + description: Delegate policy. + parameters: + - name: username + required: true + in: path + description: User Identifier + example: username + schema: + type: string + requestBody: + required: true + description: Options. + content: + application/json: + schema: + $ref: '#/components/schemas/AssignPolicyDTO' + responses: + '200': + description: Assigned policy. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_26 + security: + - bearer: [] + /worker-tasks: + get: + operationId: WorkerTasksController_getAllWorkerTasks + summary: Get all worker tasks + description: Returns all worker tasks. + parameters: + - name: pageIndex + required: false + in: query + description: >- + The number of pages to skip before starting to collect the result + set + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: The numbers of items to return + example: 20 + schema: + type: number + responses: + '200': + description: Successful operation. Returns notifications and count. + headers: + X-Total-Count: + schema: + type: integer + description: Total items in the collection. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WorkersTasksDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_27 + - worker-tasks + security: + - bearer: [] + /worker-tasks/restart: + post: + operationId: WorkerTasksController_restartTask + summary: Restart task + description: Restart task + parameters: [] + responses: + '200': + description: Successful operation. Returns notifications. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] + /worker-tasks/delete/{taskId}: + delete: + operationId: WorkerTasksController_deleteTask + summary: Delete task + description: Delete task + parameters: + - name: taskId + required: true + in: path + description: Task Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. Returns notifications. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_27 + security: + - bearer: [] +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine + (PWE) that enables applications to offer a requirements-based tokenization + implementation. + version: 2.26.2 + contact: + name: API developer + url: https://envisionblockchain.com + email: info@envisionblockchain.com + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +tags: [] +servers: + - url: /api/v1 + description: version 1.0 +components: + securitySchemes: + bearer: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + AccountsSessionResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + accessToken: + type: string + required: + - username + - role + - accessToken + InternalServerErrorDTO: + type: object + properties: + code: + type: number + example: 500 + message: + type: string + example: Error message + required: + - code + - message + AccountsResponseDTO: + type: object + properties: + username: + type: string + role: + type: string + did: + type: string + required: + - username + - role + - did + RegisterUserDTO: + type: object + properties: + username: + type: string + password: + type: string + password_confirmation: + type: string + role: + type: string + required: + - username + - password + - password_confirmation + - role + LoginUserDTO: + type: object + properties: + username: + type: string + password: + type: string + required: + - username + - password + CredentialSubjectDTO: + type: object + properties: + geography: + type: string + law: + type: string + tags: + type: string + ISIC: + type: string + '@context': + type: array + items: + type: string + id: + type: string + type: + type: string + required: + - geography + - law + - tags + - ISIC + - '@context' + - id + - type + ProofDTO: + type: object + properties: + type: + type: string + created: + format: date-time + type: string + verificationMethod: + type: string + proofPurpose: + type: string + jws: + type: string + required: + - type + - created + - verificationMethod + - proofPurpose + - jws + VcDocumentDTO: + type: object + properties: + id: + type: string + type: + type: array + items: + type: string + issuer: + type: string + issuanceDate: + format: date-time + type: string + '@context': + type: array + items: + type: string + credentialSubject: + $ref: '#/components/schemas/CredentialSubjectDTO' + proof: + $ref: '#/components/schemas/ProofDTO' + required: + - id + - type + - issuer + - issuanceDate + - '@context' + - credentialSubject + - proof + PolicyTestDTO: + type: object + properties: + id: + type: string + description: Test ID + example: '000000000000000000000001' + uuid: + type: string + description: Test UUID + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + description: Test Name + example: Test Name + policyId: + type: string + description: Policy ID + example: '000000000000000000000001' + owner: + type: string + description: Test owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + status: + type: string + description: Test status + enum: + - New + - Running + - Stopped + - Success + - Failure + example: New + date: + type: string + description: Last start date + example: '1900-01-01T00:00:00.000Z' + duration: + type: string + description: Test duration + example: 0 + progress: + type: string + description: Test progress + example: 0 + resultId: + type: string + description: Test result + example: 00000000-0000-0000-0000-000000000000 + result: + type: string + description: Test result + required: + - id + - uuid + - name + - policyId + - owner + - status + - date + - duration + - progress + - resultId + - result + PolicyDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Policy name + description: + type: string + example: Description + topicDescription: + type: string + example: Description + policyTag: + type: string + example: Tag + status: + type: string + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + example: DRAFT + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + codeVersion: + type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + version: + type: string + example: 1.0.0 + config: + type: object + userRole: + type: string + example: Installer + userRoles: + example: + - Installer + type: array + items: + type: string + userGroup: + type: object + example: + uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true + userGroups: + example: + - uuid: 00000000-0000-0000-0000-000000000000 + role: Installer + groupLabel: Label + groupName: Name + active: true + type: array + items: + type: object + policyRoles: + example: + - Registrant + type: array + items: + type: string + policyNavigation: + example: + - role: Registrant + steps: + - block: Block tag + level: 1 + name: Step name + type: array + items: + type: object + policyTopics: + example: + - name: Project + description: Project + memoObj: topic + static: false + type: any + type: array + items: + type: object + policyTokens: + example: + - tokenName: Token name + tokenSymbol: Token symbol + tokenType: non-fungible + decimals: '' + changeSupply: true + enableAdmin: true + enableFreeze: true + enableKYC: true + enableWipe: true + templateTokenTag: token_template_0 + type: array + items: + type: object + policyGroups: + example: + - name: Group name + creator: Registrant + groupAccessType: Private + groupRelationshipType: Multiple + members: + - Registrant + type: array + items: + type: object + categories: + type: array + items: + type: string + projectSchema: + type: string + example: 00000000-0000-0000-0000-000000000000 + tests: + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' + required: + - id + - uuid + - name + - description + - topicDescription + - policyTag + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - version + - config + - userRole + - userRoles + - userGroup + - userGroups + - policyRoles + - policyNavigation + - policyTopics + - policyTokens + - policyGroups + - categories + - projectSchema + - tests + AggregatedDTOItem: + type: object + properties: + did: + type: string + hederaAccountId: + type: string + vcDocument: + $ref: '#/components/schemas/VcDocumentDTO' + policies: + $ref: '#/components/schemas/PolicyDTO' + required: + - did + - hederaAccountId + - vcDocument + - policies + UserDTO: + type: object + properties: + username: + type: string + example: username + role: + type: string + enum: &ref_36 + - STANDARD_REGISTRY + - USER + - AUDITOR + example: USER + permissionsGroup: + example: &ref_37 + - {} + type: array + items: + type: string + permissions: + example: &ref_38 + - POLICIES_POLICY_READ + type: array + items: + type: string + did: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 + required: + - username + - role + - permissions + BalanceResponseDTO: + type: object + properties: + balance: + type: number + unit: + type: string + user: + $ref: '#/components/schemas/UserDTO' + required: + - balance + - unit + - user + FilterSearchPoliciesDTO: + type: object + properties: + policyId: + type: string + example: '000000000000000000000001' + type: + type: string + enum: + - Owned + - Local + - Global + example: Local + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + minVcCount: + type: number + example: 0 + minVpCount: + type: number + example: 0 + minTokensCount: + type: number + example: 0 + text: + type: string + example: Policy name + threshold: + type: number + minimum: 0 + maximum: 100 + example: 0 + SearchPolicyDTO: + type: object + properties: + type: + type: string + enum: + - Local + - Global + example: Local + id: + type: string + example: '000000000000000000000001' + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Policy name + description: + type: string + example: Policy description + version: + type: string + example: 1.0.0 + status: + type: string + enum: + - DRY-RUN + - DRAFT + - PUBLISH_ERROR + - PUBLISH + - DISCONTINUED + - DEMO + example: DRAFT + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + tags: + example: Tag + type: array + items: + type: object + vcCount: + type: number + example: 0 + vpCount: + type: number + example: 0 + tokensCount: + type: number + example: 0 + rate: + type: number + example: 0 + SearchPoliciesDTO: + type: object + properties: + target: + type: object + result: + type: array + items: + $ref: '#/components/schemas/SearchPolicyDTO' + required: + - result + CompareFileDTO: + type: object + properties: + id: + type: string + description: File ID + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + description: File Name + example: File Name + value: + type: string + description: Buffer + example: base64... + required: + - id + - name + - value + FilterPolicyDTO: + type: object + properties: + type: + type: string + description: Identifier type + enum: + - id + - message + - file + example: id + value: + oneOf: + - type: string + description: Policy ID + - type: string + description: Policy Message ID + - $ref: '#/components/schemas/CompareFileDTO' + description: Policy File + example: '000000000000000000000001' + required: + - type + - value + FilterPoliciesDTO: + type: object + properties: + idLvl: + oneOf: &ref_28 + - type: string + - type: number + enum: &ref_29 + - 0 + - 1 + example: 0 + eventsLvl: + oneOf: &ref_30 + - type: string + - type: number + enum: &ref_31 + - 0 + - 1 + example: 0 + propLvl: + oneOf: &ref_32 + - type: string + - type: number + enum: &ref_33 + - 0 + - 1 + - 2 + example: 0 + childrenLvl: + oneOf: &ref_34 + - type: string + - type: number + enum: &ref_35 + - 0 + - 1 + - 2 + example: 0 + policyId1: + type: string + example: '000000000000000000000001' + policyId2: + type: string + example: '000000000000000000000001' + policyIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + policies: + example: + - type: id + value: '000000000000000000000001' + - type: message + value: '0000000000.000000001' + - type: file + value: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + type: array + items: + $ref: '#/components/schemas/FilterPolicyDTO' + ComparePoliciesDTO: + type: object + properties: + blocks: + type: object + groups: + type: object + left: + type: object + right: + type: object + roles: + type: object + tokens: + type: object + topics: + type: object + total: + type: object + required: + - blocks + - groups + - left + - right + - roles + - tokens + - topics + - total + FilterModulesDTO: + type: object + properties: + idLvl: + oneOf: *ref_28 + enum: *ref_29 + example: 0 + eventsLvl: + oneOf: *ref_30 + enum: *ref_31 + example: 0 + propLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + childrenLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 + moduleId1: + type: string + example: '000000000000000000000001' + moduleId2: + type: string + example: '000000000000000000000001' + required: + - moduleId1 + - moduleId2 + CompareModulesDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + FilterSchemaDTO: + type: object + properties: + type: + type: string + description: Identifier type + enum: + - id + - policy-message + - policy-file + example: id + value: + type: string + description: Schema ID + example: '000000000000000000000001' + policy: + oneOf: + - description: Policy Message ID + type: string + - $ref: '#/components/schemas/CompareFileDTO' + description: Policy File + example: '000000000000000000000001' + required: + - type + - value + FilterSchemasDTO: + type: object + properties: + schemaId1: + type: string + example: '000000000000000000000001' + schemaId2: + type: string + example: '000000000000000000000001' + schemas: + example: + - type: id + value: '000000000000000000000001' + - type: policy-message + value: 00000000-0000-0000-0000-000000000000 + policy: '0000000000.000000001' + - type: policy-file + value: 00000000-0000-0000-0000-000000000000 + policy: + id: 00000000-0000-0000-0000-000000000000 + name: File Name + value: base64... + type: array + items: + $ref: '#/components/schemas/FilterSchemaDTO' + idLvl: + oneOf: + - type: string + - type: number + enum: + - 0 + - 1 + example: 0 + CompareSchemasDTO: + type: object + properties: + fields: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - fields + - left + - right + - total + FilterDocumentsDTO: + type: object + properties: + idLvl: + oneOf: *ref_28 + enum: *ref_29 + example: 0 + eventsLvl: + oneOf: *ref_30 + enum: *ref_31 + example: 0 + propLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + childrenLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 + documentId1: + type: string + example: '000000000000000000000001' + documentId2: + type: string + example: '000000000000000000000001' + documentIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + CompareDocumentsDTO: + type: object + properties: + documents: + type: object + left: + type: object + right: + type: object + total: + type: object + required: + - documents + - left + - right + - total + FilterToolsDTO: + type: object + properties: + idLvl: + oneOf: *ref_28 + enum: *ref_29 + example: 0 + eventsLvl: + oneOf: *ref_30 + enum: *ref_31 + example: 0 + propLvl: + oneOf: *ref_32 + enum: *ref_33 + example: 0 + childrenLvl: + oneOf: *ref_34 + enum: *ref_35 + example: 0 + toolId1: + type: string + example: '000000000000000000000001' + toolId2: + type: string + example: '000000000000000000000001' + toolIds: + example: + - '000000000000000000000001' + - '000000000000000000000001' + type: array + items: + type: string + CompareToolsDTO: + type: object + properties: + blocks: + type: object + left: + type: object + right: + type: object + inputEvents: + type: object + outputEvents: + type: object + variables: + type: object + total: + type: object + required: + - blocks + - left + - right + - inputEvents + - outputEvents + - variables + - total + FilterSearchBlocksDTO: + type: object + properties: + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + config: + type: object + required: + - id + - config + SearchBlocksDTO: + type: object + properties: + name: + type: string + description: + type: string + version: + type: string + owner: + type: string + topicId: + type: string + messageId: + type: string + hash: + type: string + chains: + type: object + required: + - name + - description + - version + - owner + - topicId + - messageId + - hash + - chains + ArtifactDTOItem: + type: object + properties: + id: + type: string + name: + type: string + uuid: + type: string + extention: + type: string + type: + type: string + required: + - id + - name + - uuid + - extention + - type + ContractDTO: + type: object + properties: + id: + type: string + contractId: + type: string + description: + type: string + owner: + type: string + permissions: + type: number + topicId: + type: string + type: + type: string + enum: + - WIPE + - RETIRE + syncRequestsDate: + format: date-time + type: string + syncPoolsDate: + format: date-time + type: string + lastSyncEventTimeStamp: + type: string + wipeContractIds: + type: array + items: + type: string + required: + - id + - contractId + - description + - owner + - permissions + - topicId + - type + - syncRequestsDate + - syncPoolsDate + - lastSyncEventTimeStamp + - wipeContractIds + ContractConfigDTO: + type: object + properties: + type: + type: string + description: + type: string + required: + - type + - description + WiperRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + user: + type: string + required: + - id + - contractId + - user + RetireRequestDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + user: + type: string + required: + - id + - contractId + - tokens + - tokenIds + - user + Date: + type: object + properties: {} + RetirePoolDTO: + type: object + properties: + id: + type: string + contractId: + type: string + tokens: + type: object + properties: + token: + type: string + contract: + type: string + count: + type: number + decimals: + type: number + type: + enum: + - non-fungible + - fungible + tokenSymbol: + type: string + tokenIds: + type: array + items: + type: string + immediately: + type: boolean + enabled: + type: boolean + required: + - id + - contractId + - tokens + - tokenIds + - immediately + - enabled + RetirePoolTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + required: + - token + - count + RetireRequestTokenDTO: + type: object + properties: + token: + type: string + count: + type: number + serials: + type: array + items: + type: string + required: + - token + - count + - serials + RegisteredUsersDTO: + type: object + properties: + username: + type: string + did: + type: string + parent: + type: string + role: + type: string + policyRoles: + type: array + items: + type: string + required: + - username + - did + - parent + - role + - policyRoles + TaskDTO: + type: object + properties: + taskId: + type: string + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + expectation: + type: number + description: Expected count of task phases + example: 0 + required: + - taskId + - expectation + VCDocumentDTO: + type: object + properties: + id: + type: string + nullable: false + '@context': + type: array + items: + type: string + type: + type: array + items: + type: string + credentialSubject: + type: array + items: + type: object + issuer: + type: object + issuanceDate: + type: string + proof: + type: object + nullable: true + required: + - id + - '@context' + - type + - credentialSubject + - issuer + - issuanceDate + - proof + ExternalDocumentDTO: + type: object + properties: + owner: + type: string + policyTag: + type: string + document: + nullable: false + allOf: + - $ref: '#/components/schemas/VCDocumentDTO' + required: + - owner + - policyTag + - document + LogFilterDTO: + type: object + properties: + type: + type: string + nullable: true + startDate: + type: string + nullable: true + endDate: + type: string + nullable: true + attributes: + nullable: true + type: array + items: + type: string + message: + type: string + nullable: true + pageSize: + type: number + nullable: true + pageIndex: + type: number + nullable: true + sortDirection: + type: string + nullable: true + required: + - type + - startDate + - endDate + - attributes + - message + - pageSize + - pageIndex + - sortDirection + LogResultDTO: + type: object + properties: + totalCount: + type: number + logs: + type: array + items: + type: object + required: + - totalCount + - logs + ModuleDTO: + type: object + properties: + id: + type: string + nullable: false + uuid: + type: string + nullable: false + type: + type: string + nullable: false + name: + type: string + nullable: false + description: + type: string + nullable: false + status: + type: string + nullable: false + creator: + type: string + nullable: false + owner: + type: string + nullable: false + topicId: + type: string + nullable: false + messageId: + type: string + nullable: false + codeVersion: + type: string + nullable: false + createDate: + type: string + nullable: false + config: + type: object + nullable: true + required: + - id + - uuid + - type + - name + - description + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - config + SchemaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Schema name + description: + type: string + example: Description + entity: + type: string + enum: + - NONE + - VC + - EVC + - STANDARD_REGISTRY + - USER + - POLICY + - MINT_TOKEN + - RETIRE + - WIPE_TOKEN + - MINT_NFTOKEN + - ISSUER + - USER_ROLE + - CHUNK + - ACTIVITY_IMPACT + - TOKEN_DATA_SOURCE + - ROLE + - USER_PERMISSIONS + example: POLICY + iri: + type: string + example: 00000000-0000-0000-0000-000000000000 + status: + type: string + enum: + - DRAFT + - PUBLISHED + - UNPUBLISHED + - ERROR + - DEMO + example: DRAFT + topicId: + type: string + example: 0.0.1 + version: + type: string + example: 1.0.0 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + category: + type: string + enum: + - POLICY + - MODULE + - SYSTEM + - TAG + - TOOL + example: POLICY + documentURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + contextURL: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + document: + type: object + context: + type: object + required: + - id + - uuid + - name + - description + - entity + - iri + - status + - topicId + - version + - owner + - messageId + - category + - documentURL + - contextURL + - document + - context + ExportMessageDTO: + type: object + properties: + uuid: + type: string + name: + type: string + description: + type: string + messageId: + type: string + owner: + type: string + required: + - uuid + - name + - description + - messageId + - owner + ImportMessageDTO: + type: object + properties: + messageId: + type: string + metadata: + type: object + nullable: true + required: + - messageId + - metadata + ModulePreviewDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + messageId: + type: string + schemas: + nullable: true + type: array + items: + type: object + tags: + nullable: true + type: array + items: + type: object + moduleTopicId: + type: string + nullable: true + required: + - module + - messageId + - schemas + - tags + - moduleTopicId + BlockErrorsDTO: + type: object + properties: + id: + type: string + name: + type: string + errors: + type: array + items: + type: string + isValid: + type: boolean + required: + - id + - name + - errors + - isValid + ValidationErrorsDTO: + type: object + properties: + blocks: + nullable: true + type: array + items: + $ref: '#/components/schemas/BlockErrorsDTO' + errors: + nullable: true + type: array + items: + type: string + required: + - blocks + - errors + ModuleValidationDTO: + type: object + properties: + module: + nullable: false + allOf: + - $ref: '#/components/schemas/ModuleDTO' + results: + nullable: false + allOf: + - $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - module + - results + BlockDTO: + type: object + properties: + id: + type: string + blockType: + type: string + blocks: + type: array + items: + $ref: '#/components/schemas/BlockDTO' + required: + - id + - blockType + - blocks + ToolDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tool name + description: + type: string + example: Description + status: + type: string + enum: + - DRAFT + - PUBLISHED + - PUBLISH_ERROR + example: NEW + creator: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + codeVersion: + type: string + example: 1.0.0 + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + config: + $ref: '#/components/schemas/BlockDTO' + required: + - id + - uuid + - name + - description + - status + - creator + - owner + - topicId + - messageId + - codeVersion + - createDate + - config + ToolValidationDTO: + type: object + properties: + tool: + $ref: '#/components/schemas/ToolDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - tool + - results + ToolPreviewDTO: + type: object + properties: + tool: + $ref: '#/components/schemas/ToolDTO' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + tools: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + required: + - tool + - schemas + - tags + - tools + ProfileDTO: + type: object + properties: + username: + type: string + example: username + role: + type: string + enum: *ref_36 + example: USER + permissionsGroup: + example: *ref_37 + type: array + items: + type: string + permissions: + example: *ref_38 + type: array + items: + type: string + did: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + parent: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + hederaAccountId: + type: string + example: 0.0.1 + confirmed: + type: boolean + example: true + failed: + type: boolean + example: true + topicId: + type: string + example: 0.0.1 + parentTopicId: + type: string + example: 0.0.1 + didDocument: + type: object + nullable: true + vcDocument: + type: object + nullable: true + required: + - username + - role + - permissions + SubjectDTO: + type: object + properties: + '@context': + nullable: true + type: array + items: + type: string + id: + type: string + nullable: true + type: + type: string + nullable: true + required: + - '@context' + DidDocumentDTO: + type: object + properties: + id: + type: string + nullable: false + context: + nullable: true + type: array + items: + type: string + alsoKnownAs: + nullable: true + type: array + items: + type: string + controller: + nullable: true + type: array + items: + type: string + verificationMethod: + nullable: true + type: array + items: + type: object + authentication: + nullable: true + type: array + items: + type: object + assertionMethod: + nullable: true + type: array + items: + type: object + keyAgreement: + nullable: true + type: array + items: + type: object + capabilityInvocation: + nullable: true + type: array + items: + type: object + capabilityDelegation: + nullable: true + type: array + items: + type: object + service: + nullable: true + type: array + items: + type: object + required: + - id + - context + - alsoKnownAs + - controller + - verificationMethod + - authentication + - assertionMethod + - keyAgreement + - capabilityInvocation + - capabilityDelegation + - service + DidKeyDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + required: + - id + - key + CredentialsDTO: + type: object + properties: + entity: + type: string + nullable: false + hederaAccountId: + type: string + nullable: false + hederaAccountKey: + type: string + nullable: false + parent: + type: string + nullable: true + vcDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/SubjectDTO' + didDocument: + nullable: true + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + didKeys: + nullable: true + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - entity + - hederaAccountId + - hederaAccountKey + DidDocumentStatusDTO: + type: object + properties: + valid: + type: boolean + nullable: false + error: + type: string + nullable: true + didDocument: + type: object + nullable: false + required: + - valid + - error + - didDocument + DidKeyStatusDTO: + type: object + properties: + id: + type: string + nullable: false + key: + type: string + nullable: false + valid: + type: boolean + nullable: false + required: + - id + - key + - valid + DidDocumentWithKeyDTO: + type: object + properties: + document: + nullable: false + allOf: + - $ref: '#/components/schemas/DidDocumentDTO' + keys: + nullable: false + type: array + items: + $ref: '#/components/schemas/DidKeyDTO' + required: + - document + - keys + MigrationConfigPoliciesDTO: + type: object + properties: + src: + type: string + dst: + type: string + required: + - src + - dst + MigrationConfigDTO: + type: object + properties: + policies: + $ref: '#/components/schemas/MigrationConfigPoliciesDTO' + vcs: + type: array + items: + type: string + vps: + type: array + items: + type: string + schemas: + type: object + groups: + type: object + roles: + type: object + blocks: + type: object + tokens: + type: object + migrateState: + type: boolean + migrateRetirePools: + type: boolean + editedVCs: + type: object + retireContractId: + type: string + required: + - policies + - vcs + - vps + - schemas + - groups + - roles + - blocks + - tokens + - migrateState + - migrateRetirePools + - editedVCs + - retireContractId + PoliciesValidationDTO: + type: object + properties: + policies: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + isValid: + type: string + errors: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - policies + - isValid + - errors + PolicyValidationDTO: + type: object + properties: + policy: + $ref: '#/components/schemas/PolicyDTO' + results: + $ref: '#/components/schemas/ValidationErrorsDTO' + required: + - policy + - results + Object: + type: object + properties: {} + PolicyPreviewDTO: + type: object + properties: + module: + $ref: '#/components/schemas/PolicyDTO' + messageId: + type: string + example: '0000000000.000000001' + schemas: + type: array + items: + type: object + tags: + type: array + items: + type: object + moduleTopicId: + type: string + example: 0.0.1 + required: + - module + - messageId + - schemas + - tags + - moduleTopicId + RunningDetailsDTO: + type: object + properties: + left: + type: object + right: + type: object + total: + type: number + documents: + type: object + required: + - left + - right + - total + - documents + PolicyCategoryDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + name: + type: string + example: Large-Scale + type: + type: string + example: PROJECT_SCALE + required: + - id + - name + - type + VersionSchemaDTO: + type: object + properties: + version: + type: string + example: 1.0.0 + required: + - version + MessageSchemaDTO: + type: object + properties: + messageId: + type: string + example: '0000000000.000000001' + required: + - messageId + ExportSchemaDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + name: + type: string + example: Schema name + description: + type: string + example: Description + version: + type: string + example: 1.0.0 + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + messageId: + type: string + example: '0000000000.000000001' + required: + - id + - name + - description + - version + - owner + - messageId + SystemSchemaDTO: + type: object + properties: + name: + type: string + example: Schema name + entity: + type: string + enum: + - STANDARD_REGISTRY + - USER + example: STANDARD_REGISTRY + required: + - name + - entity + SettingsDTO: + type: object + properties: + ipfsStorageApiKey: + type: string + operatorId: + type: string + operatorKey: + type: string + required: + - ipfsStorageApiKey + - operatorId + - operatorKey + TagDTO: + type: object + properties: + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Tag label + description: + type: string + example: Description + owner: + type: string + example: DID + date: + type: string + example: '1900-01-01T00:00:00.000Z' + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + status: + type: string + enum: + - Draft + - Published + - History + example: Published + operation: + type: string + enum: + - Create + - Delete + example: Create + topicId: + type: string + example: 0.0.1 + messageId: + type: string + example: '0000000000.000000001' + policyId: + type: string + example: '000000000000000000000001' + uri: + type: string + example: ipfs://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + target: + type: string + example: '0000000000.000000001' + localTarget: + type: string + example: '000000000000000000000001' + document: + type: object + required: + - uuid + - name + - description + - owner + - date + - entity + - status + - operation + - topicId + - messageId + - policyId + - uri + - target + - localTarget + - document + TagFilterDTO: + type: object + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000001' + targets: + example: '0000000000.000000001' + type: array + items: + type: string + required: + - entity + - target + - targets + TagMapDTO: + type: object + properties: + entity: + type: string + enum: + - Schema + - Policy + - Token + - Module + - Contract + - PolicyDocument + example: PolicyDocument + target: + type: string + example: '0000000000.000000001' + refreshDate: + type: string + example: '1900-01-01T00:00:00.000Z' + tags: + type: array + items: + $ref: '#/components/schemas/TagDTO' + required: + - entity + - target + - refreshDate + - tags + StatusDTO: + type: object + properties: + message: + type: string + description: Text + type: + type: string + description: Type + enum: + - Processing + - Completed + - Info + example: Info + required: + - message + - type + TaskStatusDTO: + type: object + properties: + action: + type: string + description: Task type + example: Create policy + userId: + type: string + description: User Id + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + expectation: + type: number + description: Expected count of task phases + example: 0 + taskId: + type: string + description: Task Id + example: 00000000-0000-0000-0000-000000000000 + date: + type: string + description: Date + example: '1900-01-01T00:00:00.000Z' + statuses: + type: array + items: + $ref: '#/components/schemas/StatusDTO' + result: + type: object + error: + type: object + required: + - action + - userId + - expectation + - taskId + - date + - statuses + - result + - error + TokenDTO: + type: object + properties: + tokenId: + type: string + example: 0.0.1 + tokenName: + type: string + example: Token name + tokenSymbol: + type: string + example: Token symbol + tokenType: + type: string + enum: + - fungible + - non-fungible + example: non-fungible + initialSupply: + type: string + example: '0' + decimals: + type: string + example: '0' + changeSupply: + type: boolean + description: Add Supply key + example: true + enableAdmin: + type: boolean + description: Add Admin key + example: true + enableFreeze: + type: boolean + description: Add Freeze key + example: true + enableKYC: + type: boolean + description: Add KYC key + example: true + enableWipe: + type: boolean + description: Add Wipe key + example: true + required: + - tokenId + - tokenName + - tokenSymbol + - tokenType + - initialSupply + - decimals + - changeSupply + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + TokenInfoDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + tokenId: + type: string + example: 0.0.1 + tokenName: + type: string + example: Token name + tokenSymbol: + type: string + example: Token symbol + tokenType: + type: string + enum: + - fungible + - non-fungible + example: non-fungible + decimals: + type: string + example: '0' + associated: + type: boolean + description: '' + example: true + frozen: + type: boolean + description: '' + example: true + kyc: + type: boolean + description: '' + example: true + balance: + type: string + description: User balance + example: '0' + enableAdmin: + type: boolean + description: There is an Admin key + example: true + enableFreeze: + type: boolean + description: There is an Freeze key + example: true + enableKYC: + type: boolean + description: There is an KYC key + example: true + enableWipe: + type: boolean + description: There is an Wipe key + example: true + required: + - id + - tokenId + - tokenName + - tokenSymbol + - tokenType + - decimals + - associated + - frozen + - kyc + - balance + - enableAdmin + - enableFreeze + - enableKYC + - enableWipe + ThemeRoleDTO: + type: object + properties: + description: + type: string + example: Description + text: + type: string + description: Text color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + background: + type: string + description: Background color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + border: + type: string + description: Border color + pattern: (^#[0-9a-f]{3}$)|(^#[0-9a-f]{6}$)|(^#[0-9a-f]{8}$) + example: '#000000' + shape: + type: string + description: Object shape + enum: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + example: '0' + borderWidth: + type: string + description: Border width + enum: + - 0px + - 1px + - 2px + - 3px + - 4px + - 5px + - 6px + - 7px + example: 2px + filterType: + type: string + description: Filter by type + enum: + - type + - api + - role + example: type + filterValue: + oneOf: + - type: string + - type: array + items: + type: string + required: + - description + - text + - background + - border + - shape + - borderWidth + - filterType + - filterValue + ThemeDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Theme name + rules: + type: array + items: + $ref: '#/components/schemas/ThemeRoleDTO' + required: + - id + - uuid + - name + - rules + VpDTO: + type: object + properties: + '@context': + type: array + items: + type: string + id: + type: string + example: 00000000-0000-0000-0000-000000000000 + type: + type: array + items: + type: string + verifiableCredential: + type: array + items: + type: object + proof: + type: object + required: + - '@context' + - id + - type + - verifiableCredential + - proof + VpDocumentDTO: + type: object + properties: + id: + type: string + example: '000000000000000000000001' + policyId: + type: string + example: '000000000000000000000001' + hash: + type: string + example: hash + signature: + type: number + example: 0 + status: + type: string + enum: + - NEW + - ISSUE + - REVOKE + - SUSPEND + - RESUME + - FAILED + example: NEW + tag: + type: string + example: Block tag + type: + type: string + example: Document type + createDate: + type: string + example: '1900-01-01T00:00:00.000Z' + updateDate: + type: string + example: '1900-01-01T00:00:00.000Z' + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + document: + $ref: '#/components/schemas/VpDTO' + required: + - id + - policyId + - hash + - signature + - status + - tag + - type + - createDate + - updateDate + - owner + - document + WizardConfigDTO: + type: object + properties: + roles: + type: array + items: + type: string + policy: + type: string + properties: + name: + type: string + description: + type: string + topicDescription: + type: string + policyTag: + type: string + schemas: + properties: + name: + type: string + iri: + type: string + isApproveEnable: + type: boolean + isMintSchema: + type: boolean + mintOptions: + type: object + properties: + tokenId: + type: string + rule: + type: string + dependencySchemaIri: + type: string + relationshipsSchemaIri: + type: string + initialRolesFor: + type: array + items: + type: string + rolesConfig: + type: array + items: + type: object + properties: + role: + type: string + isApprover: + type: boolean + isCreator: + type: boolean + gridColumns: + type: array + items: + type: object + properties: + field: + type: string + title: + type: string + type: array + items: + type: string + trustChain: + properties: + role: + type: string + mintSchemaIri: + type: string + viewOnlyOwnDocuments: + type: boolean + type: array + items: + type: string + required: + - roles + - policy + - schemas + - trustChain + WizardResultDTO: + type: object + properties: + policyId: + type: string + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - policyId + - wizardConfig + WizardConfigAsyncDTO: + type: object + properties: + saveState: + type: boolean + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - saveState + - wizardConfig + WizardPreviewDTO: + type: object + properties: + policyConfig: + $ref: '#/components/schemas/PolicyDTO' + wizardConfig: + $ref: '#/components/schemas/WizardConfigDTO' + required: + - policyConfig + - wizardConfig + BrandingDTO: + type: object + properties: + headerColor: + type: string + primaryColor: + type: string + companyName: + type: string + companyLogoUrl: + type: string + loginBannerUrl: + type: string + faviconUrl: + type: string + headerColor1: + type: string + termsAndConditions: + type: string + required: + - headerColor + - primaryColor + - companyName + - companyLogoUrl + - loginBannerUrl + - faviconUrl + - headerColor1 + - termsAndConditions + SuggestionsInputDTO: + type: object + properties: + blockType: + type: string + children: + nullable: true + type: array + items: + type: object + required: + - blockType + - children + SuggestionsOutputDTO: + type: object + properties: + next: + type: string + nested: + type: string + required: + - next + - nested + SuggestionsConfigItemDTO: + type: object + properties: + id: + type: string + type: + type: string + enum: + - Policy + - Module + index: + type: number + required: + - id + - type + - index + SuggestionsConfigDTO: + type: object + properties: + items: + $ref: '#/components/schemas/SuggestionsConfigItemDTO' + required: + - items + NotificationDTO: + type: object + properties: + title: + type: string + message: + type: string + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + action: + type: string + enum: + - POLICY_CONFIGURATION + - POLICY_VIEW + - POLICIES_PAGE + - SCHEMAS_PAGE + - TOKENS_PAGE + - PROFILE_PAGE + result: + type: object + read: + type: boolean + old: + type: boolean + required: + - title + - message + - type + - action + - result + - read + - old + ProgressDTO: + type: object + properties: + action: + type: string + message: + type: string + progress: + type: number + type: + type: string + enum: + - INFO + - ERROR + - WARN + - SUCCESS + taskId: + type: string + required: + - action + - message + - progress + - type + - taskId + ProjectDTO: + type: object + properties: + id: + type: string + policyId: + type: string + policyName: + type: string + registered: + type: string + title: + type: string + companyName: + type: string + sectoralScope: + type: string + required: + - id + - policyId + - policyName + - registered + - title + - companyName + - sectoralScope + CompareDocumentsV2DTO: + type: object + properties: + projects: + $ref: '#/components/schemas/CompareDocumentsDTO' + presentations: + $ref: '#/components/schemas/CompareDocumentsDTO' + required: + - projects + - presentations + PropertiesDTO: + type: object + properties: + id: + type: string + title: + type: string + value: + type: string + required: + - id + - title + - value + RecordStatusDTO: + type: object + properties: + type: + type: string + policyId: + type: string + uuid: + type: string + status: + type: string + required: + - type + - policyId + - uuid + - status + RecordActionDTO: + type: object + properties: + uuid: + type: string + policyId: + type: string + method: + type: string + action: + type: string + time: + type: string + user: + type: string + target: + type: string + required: + - uuid + - policyId + - method + - action + - time + - user + - target + ResultInfoDTO: + type: object + properties: + tokens: + type: number + documents: + type: number + required: + - tokens + - documents + ResultDocumentDTO: + type: object + properties: + type: + type: string + schema: + type: string + rate: + type: string + documents: + type: object + required: + - type + - schema + - rate + - documents + RunningResultDTO: + type: object + properties: + info: + $ref: '#/components/schemas/ResultInfoDTO' + total: + type: number + documents: + $ref: '#/components/schemas/ResultDocumentDTO' + required: + - info + - total + - documents + RoleDTO: + type: object + properties: + uuid: + type: string + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + example: Name + description: + type: string + example: Description + owner: + type: string + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + permissions: + type: string + enum: &ref_39 + - ANALYTIC_POLICY_READ + - ANALYTIC_MODULE_READ + - ANALYTIC_TOOL_READ + - ANALYTIC_SCHEMA_READ + - ANALYTIC_DOCUMENT_READ + - ARTIFACTS_FILE_READ + - ARTIFACTS_FILE_CREATE + - ARTIFACTS_FILE_DELETE + - CONTRACTS_CONTRACT_READ + - CONTRACTS_CONTRACT_EXECUTE + - CONTRACTS_CONTRACT_MANAGE + - MODULES_MODULE_READ + - MODULES_MODULE_CREATE + - MODULES_MODULE_UPDATE + - MODULES_MODULE_DELETE + - MODULES_MODULE_REVIEW + - POLICIES_POLICY_READ + - POLICIES_POLICY_CREATE + - POLICIES_POLICY_UPDATE + - POLICIES_POLICY_DELETE + - POLICIES_POLICY_REVIEW + - POLICIES_POLICY_EXECUTE + - POLICIES_POLICY_MANAGE + - SCHEMAS_SCHEMA_READ + - SCHEMAS_SCHEMA_CREATE + - SCHEMAS_SCHEMA_UPDATE + - SCHEMAS_SCHEMA_DELETE + - SCHEMAS_SCHEMA_REVIEW + - TOOLS_TOOL_READ + - TOOLS_TOOL_CREATE + - TOOLS_TOOL_UPDATE + - TOOLS_TOOL_DELETE + - TOOLS_TOOL_REVIEW + - TOKENS_TOKEN_READ + - TOKENS_TOKEN_CREATE + - TOKENS_TOKEN_UPDATE + - TOKENS_TOKEN_DELETE + - TOKENS_TOKEN_EXECUTE + - TOKENS_TOKEN_MANAGE + - TAGS_TAG_READ + - TAGS_TAG_CREATE + - SUGGESTIONS_SUGGESTIONS_READ + - SUGGESTIONS_SUGGESTIONS_UPDATE + - PERMISSIONS_ROLE_READ + - PERMISSIONS_ROLE_CREATE + - PERMISSIONS_ROLE_UPDATE + - PERMISSIONS_ROLE_DELETE + - PERMISSIONS_ROLE_MANAGE + - ACCESS_POLICY_ALL + - ACCESS_POLICY_ASSIGNED + - ACCESS_POLICY_PUBLISHED + - ACCESS_POLICY_ASSIGNED_AND_PUBLISHED + - DELEGATION_ROLE_MANAGE + example: + - POLICIES_POLICY_READ + required: + - uuid + - name + - description + - owner + - permissions + PermissionsDTO: + type: object + properties: + name: + type: string + enum: *ref_39 + example: ANALYTIC_POLICY_READ + category: + type: string + enum: + - ACCOUNTS + - SESSION + - PROFILES + - ANALYTIC + - ARTIFACTS + - POLICIES + - BRANDING + - CONTRACTS + - DEMO + - IPFS + - LOG + - MODULES + - SETTINGS + - SUGGESTIONS + - TAGS + - SCHEMAS + - TOKENS + - AUDIT + - TOOLS + - PERMISSIONS + - ACCESS + - DELEGATION + example: ANALYTIC + entity: + type: string + enum: + - ACCOUNT + - STANDARD_REGISTRY + - USER + - BALANCE + - RESTORE + - RECORD + - POLICY + - TOOL + - DOCUMENT + - SCHEMA + - MODULE + - FILE + - CONFIG + - CONTRACT + - WIPE_REQUEST + - WIPE_ADMIN + - WIPE_MANAGER + - WIPER + - POOL + - RETIRE_REQUEST + - RETIRE_ADMIN + - PERMISSIONS + - KEY + - LOG + - MIGRATION + - SETTINGS + - SUGGESTIONS + - TAG + - SYSTEM_SCHEMA + - THEME + - TOKEN + - TRUST_CHAIN + - ROLE + example: POLICY + action: + type: string + enum: + - ALL + - READ + - CREATE + - UPDATE + - DELETE + - REVIEW + - AUDIT + - EXECUTE + - MANAGE + - ASSIGNED + - PUBLISHED + - ASSIGNED_AND_PUBLISHED + example: READ + disabled: + type: boolean + example: false + dependOn: + example: + - POLICIES_POLICY_READ + type: array + items: + type: string + required: + - name + - category + - entity + - action + - disabled + - dependOn + AssignPolicyDTO: + type: object + properties: + policyIds: + example: + - '000000000000000000000001' + type: array + items: + type: string + assign: + type: boolean + example: true + required: + - policyIds + - assign + WorkersTasksDTO: + type: object + properties: + createDate: + type: string + done: + type: boolean + id: + type: string + isRetryableTask: + type: boolean + processedTime: + type: string + sent: + type: boolean + taskId: + type: string + type: + type: string + updateDate: + type: string + required: + - createDate + - done + - id + - isRetryableTask + - processedTime + - sent + - taskId + - type + - updateDate diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index ee95181431..9c895891e1 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -53,6 +53,46 @@ * [🔥 FireBlocks Signing Sequence Diagram](guardian/architecture/fireblocks-signing-sequence-diagram.md) * [📇 Global Indexer](guardian/global-indexer/README.md) * [💻 Indexer User Guide](guardian/global-indexer/indexer-user-guide.md) + * [⚙️ Indexer APIs](guardian/global-indexer/indexer-apis/README.md) + * [Full Text Indexer Search](guardian/global-indexer/indexer-apis/full-text-indexer-search.md) + * [Returns Standard Registries](guardian/global-indexer/indexer-apis/returns-standard-registries.md) + * [Returns Registry as per MessageID](guardian/global-indexer/indexer-apis/returns-registry-as-per-messageid.md) + * [Returns Registry Users](guardian/global-indexer/indexer-apis/returns-registry-users.md) + * [Returns Registry User as per MessageID](guardian/global-indexer/indexer-apis/returns-registry-user-as-per-messageid.md) + * [Returns Policies](guardian/global-indexer/indexer-apis/returns-policies.md) + * [Returns policy as per MessageID](guardian/global-indexer/indexer-apis/returns-policy-as-per-messageid.md) + * [Returns Tools](guardian/global-indexer/indexer-apis/returns-tools.md) + * [Returns Tool as per MessageID](guardian/global-indexer/indexer-apis/returns-tool-as-per-messageid.md) + * [Returns Modules](guardian/global-indexer/indexer-apis/returns-modules.md) + * [Returns Module as per MessageID](guardian/global-indexer/indexer-apis/returns-module-as-per-messageid.md) + * [Returns Schemas](guardian/global-indexer/indexer-apis/returns-schemas.md) + * [Returns Schema as per MessageID](guardian/global-indexer/indexer-apis/returns-schema-as-per-messageid.md) + * [Returns Schema Tree](guardian/global-indexer/indexer-apis/returns-schema-tree.md) + * [Returns Tokens](guardian/global-indexer/indexer-apis/returns-tokens.md) + * [Returns Token as per TokenID](guardian/global-indexer/indexer-apis/returns-token-as-per-tokenid.md) + * [Returns Roles](guardian/global-indexer/indexer-apis/returns-roles.md) + * [Returns Role as per MessageID](guardian/global-indexer/indexer-apis/returns-role-as-per-messageid.md) + * [Returns DIDs](guardian/global-indexer/indexer-apis/returns-dids.md) + * [Returns DID as per MessageID](guardian/global-indexer/indexer-apis/returns-did-as-per-messageid.md) + * [Returns DID Relationships](guardian/global-indexer/indexer-apis/returns-did-relationships.md) + * [Returns VP Documents](guardian/global-indexer/indexer-apis/returns-vp-documents.md) + * [Returns VP Document as per MessageID](guardian/global-indexer/indexer-apis/returns-vp-document-as-per-messageid.md) + * [Returns VP Relationships](guardian/global-indexer/indexer-apis/returns-vp-relationships.md) + * [Returns VC Documents](guardian/global-indexer/indexer-apis/returns-vc-documents.md) + * [Returns VC Document as per MessageID](guardian/global-indexer/indexer-apis/returns-vc-document-as-per-messageid.md) + * [Returns VC Relationships](guardian/global-indexer/indexer-apis/returns-vc-relationships.md) + * [Returns NFTs](guardian/global-indexer/indexer-apis/returns-nfts.md) + * [Returns NFT as per Serial No.](guardian/global-indexer/indexer-apis/returns-nft-as-per-serial-no..md) + * [Returns Topics](guardian/global-indexer/indexer-apis/returns-topics.md) + * [Returns Topic as per TopicID](guardian/global-indexer/indexer-apis/returns-topic-as-per-topicid.md) + * [Returns Contracts](guardian/global-indexer/indexer-apis/returns-contracts.md) + * [Returns Contract as per MessageID](guardian/global-indexer/indexer-apis/returns-contract-as-per-messageid.md) + * [Returns Landing Page Analytics](guardian/global-indexer/indexer-apis/returns-landing-page-analytics.md) + * [Returns Project Coordinates](guardian/global-indexer/indexer-apis/returns-project-coordinates.md) + * [Returns Search Policy Results](guardian/global-indexer/indexer-apis/returns-search-policy-results.md) +* [🗺️ Map Related APIs](guardian/map-related-apis/README.md) + * [Returning map API Key](guardian/map-related-apis/returning-map-api-key.md) + * [Returning Sentinel API Key](guardian/map-related-apis/returning-sentinel-api-key.md) * [🗄️ Standard Registry](guardian/standard-registry/README.md) * [🛠️ Schemas](guardian/standard-registry/schemas/README.md) * [📂 Available Schema Types](guardian/standard-registry/schemas/available-schema-types.md) @@ -253,7 +293,6 @@ * [Comparing Policies](guardian/standard-registry/policies/policy-differentiation/policy-differentiation-apis/returns-result-of-policy-comparison.md) * [Searching Policies](guardian/standard-registry/policies/policy-differentiation/policy-differentiation-apis/searching-policies.md) * [Exports Comparison results](guardian/standard-registry/policies/policy-differentiation/policy-differentiation-apis/exports-comparison-results.md) - * [Page](guardian/standard-registry/policies/policy-differentiation/policy-differentiation-apis/page.md) * [🔍 Block/Policy Discoverability](guardian/standard-registry/policies/block-policy-discoverability/README.md) * [💻 Search Policy using UI](guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md) * [⚙️ Search Policy APIs](guardian/standard-registry/policies/block-policy-discoverability/search-policy-apis/README.md) @@ -338,6 +377,15 @@ * [Get next and nested suggested block types](guardian/standard-registry/policies/auto-suggestion/auto-suggestion-apis/get-next-and-nested-suggested-block-types.md) * [Get suggestions configuration](guardian/standard-registry/policies/auto-suggestion/auto-suggestion-apis/get-suggestions-configuration.md) * [Set suggestions configuration](guardian/standard-registry/policies/auto-suggestion/auto-suggestion-apis/set-suggestions-configuration.md) + * [📁 Auto Testing of the Policies](guardian/standard-registry/policies/auto-testing-of-the-policies/README.md) + * [💻 Auto Testing using UI](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-using-ui.md) + * [⚙️ Auto Testing Policies APIs](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/README.md) + * [Adding new Test to the policy](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/adding-new-test-to-the-policy.md) + * [Returning Policy Test by ID](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-policy-test-by-id.md) + * [Running the Policy Test](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/running-the-policy-test.md) + * [Stopping the Specified Test](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/stopping-the-specified-test.md) + * [Deleting the Specified Test](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/deleting-the-specified-test.md) + * [Returning details of the most recent test run](guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-details-of-the-most-recent-test-run.md) * [📔 Library of Policy Examples](guardian/standard-registry/policies/library-of-policy-examples/README.md) * [💻 Creating and using Roles](guardian/standard-registry/policies/library-of-policy-examples/creating-and-using-roles.md) * [🔢 Data input via Forms, using Roles to partition user activities.](guardian/standard-registry/policies/library-of-policy-examples/data-input-via-forms-using-roles-to-partition-user-activities..md) @@ -551,6 +599,7 @@ * [👾 Automation Testing](guardian/automation-testing/README.md) * [💻 Performing API Automation Testing](guardian/automation-testing/how-to-perform-api-automation-testing.md) * [💻 Performing UI Automation Testing](guardian/automation-testing/performing-ui-automation-testing.md) +* [📕 Logging Configuration using Pino Library](guardian/logging-configuration-using-pino-library.md) * [📔 Guidance for Open Source Policy Submissions](guardian/guidance-for-open-source-policy.md) * [📝 Demo Guide](guardian/demo-guide/README.md) * [🔋 Renewable Energy Credits](guardian/demo-guide/renewable-energy-credits/README.md) @@ -598,6 +647,7 @@ * [🏭 AMS-I.D: Grid Connected Renewable Electricity Generation – v.18.0](guardian/demo-guide/carbon-offsets/ams-i.d-grid-connected-renewable-electricity-generation-v.18.0.md) * [🏭 PWRM0002 : Plastic Waste Recycling Methodology](guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md) * [🍚 Methane Emission Reduction by Adjusted Water Management Practice in Rice Cultivation](guardian/demo-guide/carbon-offsets/methane-emission-reduction-by-adjusted-water-management-practice-in-rice-cultivation.md) + * [⛽ Verra VMR0006: Energy Efficiency and Fuel Switch Measures in Thermal Applications](guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md) * [🏭 Carbon Emissions](guardian/demo-guide/carbon-emissions/README.md) * [🏡 Remote Work GHG Policy](guardian/demo-guide/carbon-emissions/remote-work-ghg-policy/README.md) * [📖 Introduction to Remote Work GHG](guardian/demo-guide/carbon-emissions/remote-work-ghg-policy/introduction-to-remote-work-ghg.md) diff --git a/docs/guardian/automation-testing/performing-ui-automation-testing.md b/docs/guardian/automation-testing/performing-ui-automation-testing.md index 87622043b7..e025f8126d 100644 --- a/docs/guardian/automation-testing/performing-ui-automation-testing.md +++ b/docs/guardian/automation-testing/performing-ui-automation-testing.md @@ -28,7 +28,7 @@ and then select test under ui-tests/specs/policies Finally, all the selected test runs and you can see the key components of the Test Runner that you need to pay attention to when executing tests. -
+
**Test Status Menu:** The menu shows a summary of the number of tests passed, passed, failed, or incomplete, and the time spent on the test. diff --git a/docs/guardian/demo-guide/carbon-emissions/ghgp-corporate-standard-v2.md b/docs/guardian/demo-guide/carbon-emissions/ghgp-corporate-standard-v2.md index b26ea7c218..a3e3dfe825 100644 --- a/docs/guardian/demo-guide/carbon-emissions/ghgp-corporate-standard-v2.md +++ b/docs/guardian/demo-guide/carbon-emissions/ghgp-corporate-standard-v2.md @@ -48,7 +48,7 @@ The Guardian GHGP Corporate Policy offers a unique technical opportunity for com ### Policy Workflow -
+
### Policy Guide @@ -145,19 +145,19 @@ The Organization is responsible for inputting key data and information and assig 1. Assign role as VVB and add VVB name -
-
+
+ 2. All the GHG resources once viewed can be verified. -
+
-
+
-
+
-
+
3. After verification of GHG resources, VVB reviews reporting metrics and approve/reject. diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md index 121ac4690f..67646f9170 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas.md @@ -90,21 +90,21 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 1. Log in as the Standard Registry and import the policy either by file or through IPFS timestamp by selecting the third button at the top right. -
+
-
+
-
+
-
+
2. Once the policy has successfully imported, you will be redirected to the policy configurator. The policy configurator can be used to edit the policy using the workflow blocks. There will also be a tab for the “Tools” used within this policy as illustrated in the image below. To start using the policy you must first change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” or “Go” button. This can be done through the policy configurator page or though the “Policies” page. -
+
-
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md index c0eda9034d..f56138c7fb 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources.md @@ -98,23 +98,23 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. -
+
-
+
3. Create a new user by clicking the “Create User” button and assign their role as Project Participant. -
+
4. The Project Participant can now provide their name or the name they would like to see reflect when registering for this project (i.e. their organization’s name). -
+
5. Сreate a new user again and assign their role as VVB. diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md index ee2c05bd0d..730da1d1e3 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation.md @@ -72,19 +72,19 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. -
+
-
+
3. Create a new user by clicking the “Create User” button and assign their role as Project Participant. -
+
4. The Project Participant can now provide their name or the name they would like to see reflect when registering for this project (i.e. their organization’s name). diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md index 4e1e5f8e6c..1ee5d8cd74 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants.md @@ -91,21 +91,21 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 1. Log in as the Standard Registry and import the policy either by file or through IPFS timestamp by selecting the third button at the top right. -
+
-
+
-
+
2. Once the policy has successfully imported, you will be redirected to the policy configurator. The policy configurator can be used to edit the policy using the workflow blocks. There will also be a tab for the “Tools” used within this policy as illustrated in the image below. To start using the policy you must first change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” or “Go” button. This can be done through the policy configurator page or though the “Policies” page. -
+
-
+
-
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md index b2aec01538..6611e63573 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user.md @@ -84,19 +84,19 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
-
+
2. Once the policy has successfully imported, you will be redirected to the policy configurator. The policy configurator can be used to edit the policy using the workflow blocks. There will also be a tab for the “Tools” used within this policy as illustrated in the image below. To start using the policy you must first change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” or “Go” button. This can be done through the policy configurator page or though the “Policies” page. -
+
-
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md index 858863eddf..fc8de1f50a 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies.md @@ -92,25 +92,25 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. -
+
-
+
3. Create a new user by clicking the “Create User” button and assign their role as Project Participant. -
+
4. The Project Participant can now provide their name or the name they would like to see reflect when registering for this project (i.e. their organization’s name). -
+
5. Сreate a new user again and assign their role as VVB. -
+
6. The VVB can now provide their name or the name they would like users to see when reviewing projects (i.e. their organization’s name). -
+
7. Log in as the SR and select the “Project Participant” or the “VVB” tab to view the documents submitted by the Project Participant and by the VVB. The SR can approve their requests by clicking on the “Approve" button. diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md index 658747ea34..afb8eb8fa0 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems.md @@ -75,21 +75,21 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 1. Log in as the Standard Registry and import the policy either by file or through IPFS timestamp by selecting the third button at the top right. -
+
-
+
-
+
2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. -
+
-
+
3. Create a new user by clicking the “Create User” button and assign their role as Project Participant. -
+
4. The Project Participant can now provide their name or the name they would like to see reflect when registering for this project (i.e. their organization’s name). diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md index 762c5f8ada..15cb7ebe7e 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.d.md @@ -83,19 +83,19 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2. 1. Log in as the Standard Registry and import the policy either by file or through IPFS timestamp by selecting the third button at the top right. As the policy is importing you can see the schemas, tools, and tokens importing. -
+
-
+
-
+
2. By clicking on the pen icon, we can open the policy configurator to see the workflow blocks. To expand the containers, click on the dropdown arrow, we’ll then see where the tools are located, like tool 14 in the AMS-III.D policy. Then we can click on the block for tool 14 and scroll down in the properties section at the bottom right of the page this is where we can find the message ID for this tool. -
+
-
+
-
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md index a076bfdb10..33539b1acc 100644 --- a/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md +++ b/docs/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting.md @@ -95,23 +95,23 @@ Certified Emission Reduction (CER) credits, each equivalent to one tonne of CO2.
-
+
-
+
2. To start using the policy you first have to change the status of the policy from “Draft” to “Dry Run” or “Publish”, then select the “Register” button. -
+
-
+
3. Create a new user by clicking the “Create User” button and assign their role as Project Participant. -
+
4. The Project Participant can now provide their name or the name they would like to see reflect when registering for this project (i.e. their organization’s name). -
+
5. Сreate a new user again and assign their role as VVB. diff --git a/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md b/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md index 81781647a6..f273d0a060 100644 --- a/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md +++ b/docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md @@ -48,11 +48,11 @@ for Cool Farm, we see below form: 6. Now we log out and login as Standard Registry, once viewing the registrant documents, we approve the application by clicking on Approve button. 7. Once approved, we again login back as Registrant and submit Farm Registrant form by clicking on Create Farm button: -
+
8. Once filled and clicked on OK, Registrant waits for approval from Standard Registry: -
+
9. Now we login as Standard Registry and click on Farm Projects tab, we can see the Request being submitted by Registrant for Approve/Reject @@ -62,7 +62,7 @@ For testing purpose, we will approve the farm project. 10. Once SR approves, we login back as Registrant and submit AgreCalc Document by filling out the form: -
+
For Cool Farm Tool methodology, you will see the below request form: @@ -71,7 +71,7 @@ For Cool Farm Tool methodology, you will see the below request form: 11. Once the Request is submitted, Registrant is waiting for it to be approved by Verifier. 12. Now we logout and login as Verifier, we verify the documents by clicking on approve. -
+
13. Once approved, we login as SR and check the Token History by clicking on Token History Tab: diff --git a/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md b/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md index 3e7aa35457..b4312290db 100644 --- a/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md +++ b/docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md @@ -40,7 +40,7 @@ We need to first import the policy from open source repository. Once imported, there will be 2 additional users with different roles (aside from the Standard Registry) that need to be created. Create a user account for the Project Developer. Once created and entered into the Policy, select the Project Developer role from the drop-down. -
+
Fill out the Agent Application and wait for the approval. @@ -74,7 +74,7 @@ Now, the Project Developer must go into their screen and "Submit a PDD" and fill
-
+
Now, the Project Developer must go into their screen and "Submit a PDD" and fill out the Project Design Document form. @@ -84,7 +84,7 @@ Now, the Project Developer must go into their screen and "Submit a PDD" and fill The Verifier must now go into their Policy screen and view the PDD by click on the "Review button" and filling out the review form. -
+
After that, the Verifer can select a Review ID and "Finalise review." @@ -94,7 +94,7 @@ After that, the Verifer can select a Review ID and "Finalise review." Once the PDD has been verified, the Project Developer can "Request registration." -
+
diff --git a/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md b/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md index d8f3dac419..a671b37f06 100644 --- a/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md +++ b/docs/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling.md @@ -61,23 +61,23 @@ Waste Recycling Credit (WRC), each equivalent to (1) tonne of plastic that has b
-
+
-
+
2. Set the policy to Dry Run or Publish it using the dropdown. Then select “Register”. -
+
-
+
3. Create a new user and assign their role as the Project Proponent. -
+
4. Create a new project by clicking on the "New Project" button and enter all the required details. -
+
5. Once the project details are submitted, Verra can add it to the project pipeline. diff --git a/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md b/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md index 13b258dd8b..b25e10d7e0 100644 --- a/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md +++ b/docs/guardian/demo-guide/carbon-offsets/verra-redd+-demo-guide.md @@ -27,7 +27,7 @@ REDD 2.2.2 = 1707207149.487956003 Verra REDD Policy 3 groups = 1707207286.119377003 ``` -
+
Once Policy is imported successfully, you get two options : Publish and Dry Run mode. diff --git a/docs/guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md b/docs/guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md new file mode 100644 index 0000000000..7e54d7542d --- /dev/null +++ b/docs/guardian/demo-guide/carbon-offsets/verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md @@ -0,0 +1,159 @@ +# ⛽ Verra VMR0006: Energy Efficiency and Fuel Switch Measures in Thermal Applications + +## Table of Contents + +[Introduction](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc2013717437) + +[Need and Use](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc835592142) + +[Standard Stove Performance Testing](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc1877527206) + +[Different Cookstove Methodologies: Pros and Cons](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc1785634077) + +[Overview of Cookstove Methodologies](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc218047766) + +[Policy Workflow](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc1037455109) + +[Policy Import](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc402141281) + +[Available Roles](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc2047000743) + +[Token (Verified Carbon Unit)](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc1356120787) + +[Step By Step](verra-vmr0006-energy-efficiency-and-fuel-switch-measures-in-thermal-applications.md#toc644247440) + +### Introduction + +This policy focuses on the VMR0006 methodology, "Energy Efficiency and Fuel Switch Measures in Thermal Applications, v1.2." Developed as an extension of CDM’s AMS-II.G, VMR0006 is particularly relevant for improved cookstove projects. This methodology revision aims to provide monitoring parameters and quantification methods, resulting in emission reductions. It provides alternative methods for monitoring parameters and quantifying emission reductions, largely allowing for the increased use of defaults and less frequent monitoring, therefore, maintaining lower project costs. + +### Need and Use + +The VMR0006 methodology can be used by project developers working on improved cookstove projects. By utilizing default values and less frequent monitoring, VMR0006 helps reduce project costs while ensuring reliable data. The methodology focuses on several key areas, including adoption, usage, stacking (the use of multiple types of stoves within the same household), fuel consumption, fraction of non-renewable biomass (fNRB), and emission factors. + +VMR0006 uses short cross-sectional surveys to establish adoption, usage, and stacking rates, similar to AMS-II.G but with more lenient monitoring requirements. Fuel consumption is determined using default values, historical data, or project-led surveys, with options for annual water boil tests to obtain stove efficiency or assume default efficiency depreciation rates. The methodology directs projects to use global averages, CDM’s Tool 33, or CDM's Tool 30 for fNRB, with a 26% emission reduction discount for using Tool 30. Emission factors include point-of-use and upstream emissions for various gases, using IPCC values, which may lead to larger over-crediting compared to AMS-II.G. Rebound effects in the carbon market refer to increased technology usage due to improved energy efficiency, which can lead to higher overall emissions and offset some anticipated savings. In this methodology, rebound effects are not captured, leading to similar over-crediting. Additionality is granted if stoves are free or use the CDM's tool for demonstration, with leakage adjustments like AMS-II.G. + +### Standard Stove Performance Testing + +Monitoring and evaluating improved cookstove performance is crucial for developing effective cookstove programs. There are three main types of stove performance tests: Water Boiling Test (WBT), Controlled Cooking Test (CCT), and Kitchen Performance Test (KPT). + +**Water Boiling Test (WBT):** WBT is a laboratory test that evaluates stove performance during a controlled task (boiling and simmering water). It is simple, quick, and cost-effective but does not accurately reflect real cooking conditions. WBT is conducted by trained technicians in a controlled environment, revealing technical performance rather than actual household use. + +**Controlled Cooking Test (CCT):** CCT measures stove performance when a local meal is prepared, either in a lab or field setting. It assesses performance under ideal conditions, simulating local practices. However, CCT still doesn't capture the full range of real-world variables like fuel variability and operator behavior differences. + +**Kitchen Performance Test (KPT):** KPT is the primary field test used to evaluate stove performance in real-world settings, conducted in users' homes to assess actual impacts on household fuel consumption. KPTs provide the most accurate understanding of stove performance but are labor-intensive and intrusive, with results influenced by the less controlled environment. + +Overall, improved cookstove performance testing involves balancing logistical complexities and realistic reflection of outcomes. While each test type has strengths and weaknesses, a combination of laboratory and field testing is recommended for comprehensive evaluation. This approach ensures that performance testing accounts for local food preparation and real-world usage, enhancing the reliability of results. + +### Different Cookstove Methodologies: Pros and Cons + +**VMR0006:** VMR0006 provides a cost-effective solution by utilizing default values and less frequent monitoring, which helps reduce project costs while maintaining reliable data. However, this approach may not capture real-time variations in fuel use and emissions as precisely as continuous monitoring methods. + +**Gold Standard Metered Methodology:** The Gold Standard Metered Methodology offers robust monitoring of stove usage and fuel consumption, ensuring high data accuracy and transparency. However, it involves higher costs due to the need for continuous monitoring equipment and may require more technical expertise to implement. + +**Clean Development Mechanism (CDM) AMS-II.G:** The CDM AMS-II.G methodology is well-established and widely recognized, using conservative estimates to ensure credibility. However, it can be complex and costly to implement due to rigorous data requirements and may not be as flexible as other methodologies in adapting to local conditions. + +### Overview of Cookstove Methodologies + +Various methodologies are used to quantify emissions reductions in cookstove projects, each with its own approach to monitoring and verification. These methodologies include cross-sectional surveys, kitchen performance tests (KPTs), and continuous monitoring systems (CMS). Cross-sectional surveys and KPTs are commonly used to gather data on stove adoption, usage, and fuel consumption, while CMS provides real-time data but at a higher cost. The methodologies also address issues such as stove stacking, rebound effects, and leakage to ensure accurate emissions reductions. More details on these methodologies can be found on the [Berkeley Carbon Trading Project's website](https://gspp.berkeley.edu/research-and-impact/centers/cepp/projects/berkeley-carbon-trading-project/cookstoves/how-the-methodologies-work). + +### Policy Workflow + +![](<../../../.gitbook/assets/0 (17).png>) + +### Policy Import + +This policy is published to Hedera network and can either be imported via Github (.policy file) or IPSF timestamp. + +### Available Roles + +* Project Proponent - The project proponent is responsible for executing the emission reduction project. The project proponent must adhere to the requirements outlined by Verra’s VCS program and provide evidence of the emission reductions achieved. Upon successful verification, the project proponent receives Verified Carbon Units (VCU) as an incentive for their emission reductions. +* Verification and Validation Body (VVB) - The VVB plays a critical role in independently verifying and validating the project data submitted by the project proponent. They thoroughly assess the project's emission reduction potential, methodologies, and adherence to the policy guidelines. Based on their evaluation, the VVB either approves or rejects the project for registration. +* Registry (Verra) – With Verra as the registry they take on responsibilities that encompass project intake, pipeline management, and final review of project descriptions and monitoring reports. This process ensures that emission reduction projects meet the highest standards before tokens are issued. + +### Token (Verified Carbon Unit) + +Verified Carbon Unit (VCU) credits, each equivalent to one tonne of CO2. + +### Step By Step + +1. Import the policy using IPFS or Policy File. Once imported, you will be redirected to the policy configurator. + +![](<../../../.gitbook/assets/1 (19).png>) + +![](<../../../.gitbook/assets/2 (21).png>) + +![](<../../../.gitbook/assets/3 (18).png>) + +![](<../../../.gitbook/assets/4 (16).png>) + +![](<../../../.gitbook/assets/5 (19).png>) + +2. Set the policy to Dry Run or Publish it using the dropdown. Then select “Go” or “Register”. + +![](<../../../.gitbook/assets/6 (18).png>) + +![](<../../../.gitbook/assets/7 (18).png>) + +![](<../../../.gitbook/assets/8 (19).png>) + +3. Create a new user and assign their role as the Project Proponent. + +![](<../../../.gitbook/assets/9 (16).png>) + +![](<../../../.gitbook/assets/10 (17).png>) + +![](<../../../.gitbook/assets/11 (14).png>) + +4. Create a new project by clicking on the "New Project" button and enter all the required details. + +![](<../../../.gitbook/assets/12 (12).png>) + +5. Once the project details are submitted, Verra can add it to the project pipeline.\ + + +
+6. The Standard Registry can now add the project to the project pipeline by selecting “Add”. + +![](<../../../.gitbook/assets/14 (10).png>) + +7. Now, we create a new user and assign its role as the VVB. + +![](<../../../.gitbook/assets/15 (12).png>) + +8. The VVB must now give their name. Once the VVB’s name is set, the VVB waits for SR to approve it. + +![](<../../../.gitbook/assets/16 (11).png>) + +9. Now we log in as SR and approve the VVB. + +![](<../../../.gitbook/assets/17 (12).png>) + +10. Log in as the Project Proponent and assign the VVB to the project using the dropdown. + +![](<../../../.gitbook/assets/18 (10).png>) + +11. Once the VVB is assigned, the VVB will now have access to the project for validation/verification. + +![](<../../../.gitbook/assets/19 (7).png>) + +12. Once validated, we log in as Project Proponent and add a monitoring report. + +![](<../../../.gitbook/assets/20 (4).png>) + +
+ +13. Once the report is submitted, we now log in as the VVB and validate the monitoring report by clicking on the “Verify” button.\ + + +
+14. Once the monitoring report is validated, we log in as the SR and click on “Mint” to mint the tokens.\ + + +
+15. Once minting is completed, we can view tokens in the “VPs” tab.\ + + +
+16. The Trust Chain can also be viewed by clicking on the “View Trust Chain” button: + +
diff --git a/docs/guardian/global-indexer/README.md b/docs/guardian/global-indexer/README.md index 8383339e8f..d7cd1dc852 100644 --- a/docs/guardian/global-indexer/README.md +++ b/docs/guardian/global-indexer/README.md @@ -1,2 +1,9 @@ # 📇 Global Indexer +Global Indexer is a crucial component designed to enhance data search, retrieval, and management across various instances of the Guardian framework. Here are the key features and functionalities of the Global Indexer: + +1. **Comprehensive Data Search**: The Global Indexer allows users to perform advanced searches across all data within the Guardian ecosystem. This includes searching for specific data points, documents, and policy-related information across different Guardian instances. +2. **Data Storage and Indexing**: It improves data storage capabilities, ensuring that complex analytical queries can be run efficiently. This includes searches for data similarities and checks for potential double entries across different instances. +3. **Global Search Capability**: Users can perform global searches on the entire dataset produced by all Guardian instances since the project's inception. This ensures a thorough and comprehensive retrieval of data. +4. **User-Friendly Interface**: The Indexer provides a user-friendly interface that facilitates efficient navigation and utilization of the extensive data stored within the Guardian system. This interface is designed to help users execute searches and retrieve results effectively. +5. **Integration with Hedera and IPFS**: The Indexer is integrated with Hedera and IPFS, enhancing the data storage and indexing capabilities of the Guardian framework. This integration supports the efficient handling of large datasets and complex queries. diff --git a/docs/guardian/global-indexer/indexer-apis/README.md b/docs/guardian/global-indexer/indexer-apis/README.md new file mode 100644 index 0000000000..e25bc3a9ac --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/README.md @@ -0,0 +1,2 @@ +# ⚙️ Indexer APIs + diff --git a/docs/guardian/global-indexer/indexer-apis/full-text-indexer-search.md b/docs/guardian/global-indexer/indexer-apis/full-text-indexer-search.md new file mode 100644 index 0000000000..c9d2cc8f9a --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/full-text-indexer-search.md @@ -0,0 +1,5 @@ +# Full Text Indexer Search + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/search" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-contract-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-contract-as-per-messageid.md new file mode 100644 index 0000000000..4db1743bda --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-contract-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns Contract as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/contracts/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-contracts.md b/docs/guardian/global-indexer/indexer-apis/returns-contracts.md new file mode 100644 index 0000000000..59b9faa98a --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-contracts.md @@ -0,0 +1,5 @@ +# Returns Contracts + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/contracts" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-did-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-did-as-per-messageid.md new file mode 100644 index 0000000000..2f17d53aa7 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-did-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns DID as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/did-documents/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-did-relationships.md b/docs/guardian/global-indexer/indexer-apis/returns-did-relationships.md new file mode 100644 index 0000000000..bc6004614d --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-did-relationships.md @@ -0,0 +1,5 @@ +# Returns DID Relationships + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/did-documents/{messageId}/relationships" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-dids.md b/docs/guardian/global-indexer/indexer-apis/returns-dids.md new file mode 100644 index 0000000000..7ce239fb65 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-dids.md @@ -0,0 +1,5 @@ +# Returns DIDs + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/did-documents" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-landing-page-analytics.md b/docs/guardian/global-indexer/indexer-apis/returns-landing-page-analytics.md new file mode 100644 index 0000000000..03e2a844a4 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-landing-page-analytics.md @@ -0,0 +1,5 @@ +# Returns Landing Page Analytics + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/landing/analytics" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-module-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-module-as-per-messageid.md new file mode 100644 index 0000000000..a6ecdcaf31 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-module-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns Module as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/modules/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-modules.md b/docs/guardian/global-indexer/indexer-apis/returns-modules.md new file mode 100644 index 0000000000..d252443b61 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-modules.md @@ -0,0 +1,5 @@ +# Returns Modules + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/modules" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-nft-as-per-serial-no..md b/docs/guardian/global-indexer/indexer-apis/returns-nft-as-per-serial-no..md new file mode 100644 index 0000000000..5c65525eff --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-nft-as-per-serial-no..md @@ -0,0 +1,5 @@ +# Returns NFT as per Serial No. + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/nfts/{tokenId}/{serialNumber}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-nfts.md b/docs/guardian/global-indexer/indexer-apis/returns-nfts.md new file mode 100644 index 0000000000..b552b93432 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-nfts.md @@ -0,0 +1,5 @@ +# Returns NFTs + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/nfts" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-policies.md b/docs/guardian/global-indexer/indexer-apis/returns-policies.md new file mode 100644 index 0000000000..272d966523 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-policies.md @@ -0,0 +1,5 @@ +# Returns Policies + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/policies" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-policy-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-policy-as-per-messageid.md new file mode 100644 index 0000000000..59c551e6dd --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-policy-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns policy as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/policies/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-project-coordinates.md b/docs/guardian/global-indexer/indexer-apis/returns-project-coordinates.md new file mode 100644 index 0000000000..d356116796 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-project-coordinates.md @@ -0,0 +1,5 @@ +# Returns Project Coordinates + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/landing/projects-coordinates" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-registry-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-registry-as-per-messageid.md new file mode 100644 index 0000000000..3c74bd2af0 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-registry-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns Registry as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/registries/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-registry-user-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-registry-user-as-per-messageid.md new file mode 100644 index 0000000000..8d943cdfef --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-registry-user-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns Registry User as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/registry-users/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-registry-users.md b/docs/guardian/global-indexer/indexer-apis/returns-registry-users.md new file mode 100644 index 0000000000..30df95019f --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-registry-users.md @@ -0,0 +1,5 @@ +# Returns Registry Users + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/registry-users" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-role-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-role-as-per-messageid.md new file mode 100644 index 0000000000..0d0fc8f7f6 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-role-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns Role as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/roles/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-roles.md b/docs/guardian/global-indexer/indexer-apis/returns-roles.md new file mode 100644 index 0000000000..b05ecd4601 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-roles.md @@ -0,0 +1,5 @@ +# Returns Roles + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/roles" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-schema-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-schema-as-per-messageid.md new file mode 100644 index 0000000000..3121d25679 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-schema-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns Schema as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/schemas/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-schema-tree.md b/docs/guardian/global-indexer/indexer-apis/returns-schema-tree.md new file mode 100644 index 0000000000..10bbc08133 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-schema-tree.md @@ -0,0 +1,5 @@ +# Returns Schema Tree + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/schemas/{messageId}/tree" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-schemas.md b/docs/guardian/global-indexer/indexer-apis/returns-schemas.md new file mode 100644 index 0000000000..09f12f3240 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-schemas.md @@ -0,0 +1,5 @@ +# Returns Schemas + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/schemas" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-search-policy-results.md b/docs/guardian/global-indexer/indexer-apis/returns-search-policy-results.md new file mode 100644 index 0000000000..296c08ff5c --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-search-policy-results.md @@ -0,0 +1,5 @@ +# Returns Search Policy Results + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/analytics/search/policy" method="post" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-standard-registries.md b/docs/guardian/global-indexer/indexer-apis/returns-standard-registries.md new file mode 100644 index 0000000000..3046083bf3 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-standard-registries.md @@ -0,0 +1,5 @@ +# Returns Standard Registries + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/registries" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-token-as-per-tokenid.md b/docs/guardian/global-indexer/indexer-apis/returns-token-as-per-tokenid.md new file mode 100644 index 0000000000..0a4b632322 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-token-as-per-tokenid.md @@ -0,0 +1,5 @@ +# Returns Token as per TokenID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/tokens/{tokenId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-tokens.md b/docs/guardian/global-indexer/indexer-apis/returns-tokens.md new file mode 100644 index 0000000000..cbde2378c4 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-tokens.md @@ -0,0 +1,5 @@ +# Returns Tokens + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/tokens" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-tool-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-tool-as-per-messageid.md new file mode 100644 index 0000000000..fe3fd2982a --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-tool-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns Tool as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/tools/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-tools.md b/docs/guardian/global-indexer/indexer-apis/returns-tools.md new file mode 100644 index 0000000000..1f58914778 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-tools.md @@ -0,0 +1,5 @@ +# Returns Tools + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/tools" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-topic-as-per-topicid.md b/docs/guardian/global-indexer/indexer-apis/returns-topic-as-per-topicid.md new file mode 100644 index 0000000000..76130d1d2c --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-topic-as-per-topicid.md @@ -0,0 +1,5 @@ +# Returns Topic as per TopicID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/topics/{topicId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-topics.md b/docs/guardian/global-indexer/indexer-apis/returns-topics.md new file mode 100644 index 0000000000..2db8e5bfc8 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-topics.md @@ -0,0 +1,5 @@ +# Returns Topics + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/topics" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-vc-document-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-vc-document-as-per-messageid.md new file mode 100644 index 0000000000..eb0849309a --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-vc-document-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns VC Document as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/vc-documents/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-vc-documents.md b/docs/guardian/global-indexer/indexer-apis/returns-vc-documents.md new file mode 100644 index 0000000000..1d780a6679 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-vc-documents.md @@ -0,0 +1,5 @@ +# Returns VC Documents + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/vc-documents" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-vc-relationships.md b/docs/guardian/global-indexer/indexer-apis/returns-vc-relationships.md new file mode 100644 index 0000000000..e51b3ef0c1 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-vc-relationships.md @@ -0,0 +1,5 @@ +# Returns VC Relationships + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/vc-documents/{messageId}/relationships" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-vp-document-as-per-messageid.md b/docs/guardian/global-indexer/indexer-apis/returns-vp-document-as-per-messageid.md new file mode 100644 index 0000000000..bb8ed9bf74 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-vp-document-as-per-messageid.md @@ -0,0 +1,5 @@ +# Returns VP Document as per MessageID + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/vp-documents/{messageId}" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-vp-documents.md b/docs/guardian/global-indexer/indexer-apis/returns-vp-documents.md new file mode 100644 index 0000000000..88c6bf2bb4 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-vp-documents.md @@ -0,0 +1,5 @@ +# Returns VP Documents + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/vp-documents" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-apis/returns-vp-relationships.md b/docs/guardian/global-indexer/indexer-apis/returns-vp-relationships.md new file mode 100644 index 0000000000..42d04446a0 --- /dev/null +++ b/docs/guardian/global-indexer/indexer-apis/returns-vp-relationships.md @@ -0,0 +1,5 @@ +# Returns VP Relationships + +{% swagger src="../../../.gitbook/assets/swagger-indexer.yaml" path="/entities/vp-documents/{messageId}/relationships" method="get" %} +[swagger-indexer.yaml](../../../.gitbook/assets/swagger-indexer.yaml) +{% endswagger %} diff --git a/docs/guardian/global-indexer/indexer-user-guide.md b/docs/guardian/global-indexer/indexer-user-guide.md index 430bfeb5f5..90a32e5a38 100644 --- a/docs/guardian/global-indexer/indexer-user-guide.md +++ b/docs/guardian/global-indexer/indexer-user-guide.md @@ -17,6 +17,10 @@ To launch the Indexer, please run the following command in the root of the folde docker compose -f "docker-compose-indexer.yml" up -d --build ``` +### **Launching Indexer** + +Once the above command is successfully executed and all the docker containers are running, Indexer can be launched at [http://localhost:3005](http://localhost:3005) + ### Landing page includes following information: * _Registries_, _Methodologies_, _Total Documents_, _Total Issuance_. All cards are clickable. Also there is an ability to check charts with count and date. diff --git a/docs/guardian/logging-configuration-using-pino-library.md b/docs/guardian/logging-configuration-using-pino-library.md new file mode 100644 index 0000000000..4346be3f58 --- /dev/null +++ b/docs/guardian/logging-configuration-using-pino-library.md @@ -0,0 +1,126 @@ +# 📕 Logging Configuration using Pino Library + +## Introduction + +The logger has been implemented using the Pino library. Four transports have been added for logging: console output, MongoDB, file, and Seq storage. + +### Description + +In the .env file, nine environment variables have been provided. Five of them are default variables for configuring logging to MongoDB, file, and Seq. These are typically constant variables and should not be changed: + +``` +DB_LOGGER_NAME="logger_db +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_API_KEY=""1 +SEQ_SERVER_URL="http://localhost:5341"2 +SEQ_UI_URL="http://localhost:5341"3 +``` + +{% hint style="info" %} +Note: + +1 The SEQ\_API\_KEY is an optional variable that allows adding an API key for authentication with the Seq server. It should be set if authentication is required. + +2 When manually building the application, the variables above should be specified in the .env files at the micro -services level + +3 When manually building the application, SEQ\_UI\_URL needs to be specified in the api-gateway service only. +{% endhint %} + +### Transports + +The TRANSPORTS environment variable allows to specify the transports used for logging to various storage options. By default, logs are output to the console and recorded in MongoDB. The default value for the variable looks like this: + +``` +TRANSPORTS="CONSOLE, MONGO" +``` + +However, it can be extended to: + +``` +TRANSPORTS="CONSOLE, MONGO, FILE, SEQ" +``` + +In this case, logs will also be recorded in a log file and Seq storage. + +### Console + +Logging to the console will occur only if CONSOLE is included in the TRANSPORTS variable. + +**Example:** + +``` +TRANSPORTS="CONSOLE" +``` + +### MongoDB + +Logging to MongoDB will occur only if the DB\_LOGGER\_NAME variable is specified and MONGO is included in the TRANSPORTS variable. + +**Example:** + +``` +TRANSPORTS="MONGO" +``` + +**Required Environment Variables for MongoDB Logging** + +DB\_LOGGER\_NAME: The name of the MongoDB database used for logging. + +DB\_LOGGER\_HOST: The host address of the MongoDB server. + +DB\_LOGGER\_COLLECTION: The name of the collection where logs will be stored. + +### File + +Logging to a file will occur only if FILE is included in the TRANSPORTS variable. + +**Example:** + +``` +TRANSPORTS="FILE" +``` + +**Required Environment Variable for File Logging** + +LOG\_FILE\_PATH: The file path where the logs will be stored. + +### Seq + +If you want to use Seq storage ([https://datalust.co/seq](https://datalust.co/seq)), you must first run it in a container using the following command: + +``` +docker run --name seq -d --restart unless-stopped -e ACCEPT_EULA=Y -p 5341:80 datalust/seq:latest +``` + +Logging to Seq will occur only if SEQ is included in the TRANSPORTS variable. + +**Example:** + +``` +TRANSPORTS="SEQ" +``` + +**Required Environment Variables for Seq Logging** + +SEQ\_SERVER\_URL: The URL of the Seq server for internal logging purposes. + +SEQ\_UI\_URL: The URL of the Seq server for external access (viewing logs in a browser). + +SEQ\_API\_KEY: The API key used for authenticating requests to the Seq server. This variable allows adding the API key during the initialization of the Seq logger. + +## Contribution + +### Adding New Transports + +To add new transports for logging, you can update the `pino-logger.ts` file. New transports should be added to the MAP\_TRANSPORTS map. + +{% hint style="info" %} +**Note:** Don't forget to add your new transport to the TRANSPORTS variable in the .env file. +{% endhint %} + +## Additional Documentation + +For more detailed information on Pino transports and configurations, refer to the official Pino documentation: [https://getpino.io/#/docs/transports](https://getpino.io/#/docs/transports) diff --git a/docs/guardian/map-related-apis/README.md b/docs/guardian/map-related-apis/README.md new file mode 100644 index 0000000000..487d01980c --- /dev/null +++ b/docs/guardian/map-related-apis/README.md @@ -0,0 +1,2 @@ +# 🗺️ Map Related APIs + diff --git a/docs/guardian/map-related-apis/returning-map-api-key.md b/docs/guardian/map-related-apis/returning-map-api-key.md new file mode 100644 index 0000000000..f5d45611a2 --- /dev/null +++ b/docs/guardian/map-related-apis/returning-map-api-key.md @@ -0,0 +1,5 @@ +# Returning map API Key + +{% swagger src="../../.gitbook/assets/swagger.yaml" path="/map/key" method="get" %} +[swagger.yaml](../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/map-related-apis/returning-sentinel-api-key.md b/docs/guardian/map-related-apis/returning-sentinel-api-key.md new file mode 100644 index 0000000000..82fd688b13 --- /dev/null +++ b/docs/guardian/map-related-apis/returning-sentinel-api-key.md @@ -0,0 +1,5 @@ +# Returning Sentinel API Key + +{% swagger src="../../.gitbook/assets/swagger.yaml" path="/map/sh" method="get" %} +[swagger.yaml](../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/readme/getting-started/installation/setting-up-environment-parameters.md b/docs/guardian/readme/getting-started/installation/setting-up-environment-parameters.md index b98adc3bad..c578c23dab 100644 --- a/docs/guardian/readme/getting-started/installation/setting-up-environment-parameters.md +++ b/docs/guardian/readme/getting-started/installation/setting-up-environment-parameters.md @@ -24,3 +24,9 @@ Values from .env file need to be set up only on first start (when db or vault ar | DIRECT\_MESSAGE\_HOST | Host for direct messages (if not set get hostname) | localhost | | DIRECT\_MESSAGE\_PROTOCOL | Protocol https or http (http by default, https need additional server like nginx) | http | | MQ\_MAX\_PAYLOAD | Max message size for send via message-broker (otherwise create direct message) if not set always send messages using message broker | 35 | + +### `.env / .env.docker` Parameters in `auth-service` + +| Parameter | Purpose | Example | +| --------------------- | ----------------------------------------------------------------------------------------------------- | ---------- | +| SR\_INITIAL\_PASSWORD | Allows to set SR initial password when it will be created first time. It also should have more than 5 | Env!s!0n!@ | diff --git a/docs/guardian/readme/roadmap.md b/docs/guardian/readme/roadmap.md index a88c9a4e41..e0163901ca 100644 --- a/docs/guardian/readme/roadmap.md +++ b/docs/guardian/readme/roadmap.md @@ -1,713 +1,727 @@ # 🛣️ Roadmap -To get more information on Roadmap, please click: [https://app.zenhub.com/workspaces/guardian-618c27c08661c0001461263a/roadmap?invite=true](https://app.zenhub.com/workspaces/guardian-618c27c08661c0001461263a/roadmap?invite=true) +
FeatureRelease monthReleased?Release Version
Development of AMS-I.C.: Thermal Energy Production with or Without ElectricityJuly 2024No
Development of AMS-I.E and Mass Comparison on Cookstove methodologies for the WebinarJuly 2024No
Indexer APIJuly 2024No
Filtering data for blocks is stateful API, introduce stateless data filters for API usage.July 2024No
Auto-testing community submitted policiesJuly 2024No
GHG Scorecards ResearchJuly 2024No
Code audit: support and resolution of issuesJuly 2024No
Token action block to work with token templatesAugust 2024No
Enhance MongoDB Integration by incorporating seamless support for popular third-party services, such as MongoDB AtlasAugust 2024No
Default values for schema-defined fieldsAugust 2024No
API versioning and support/deprecation scheduleAugust 2024No
Leverage the pre-built images as the default way to start Guardian locallyAugust 2024No
GS Methodology for Emission Reductions from Safe Drinking Water Supply v.1.0August 2024No
Guardian analytics: insights and top-down data way pointsSeptember 2024No
Rationalize API and UI return error codesSeptember 2024No
On-demand state proof generation for critical Guardian operationsSeptember 2024No
Simplify default SR schema to take out optional propertiesSeptember 2024No
Verra SDVM001 SD Vista Methodology for Time Savings from Improved CookstovesSeptember 2024No
Scope 3/PCF Referencing Demo (Methodology Breakdown)September 2024No
Block configuration (mini-) wizardsOctober 2024No
API facilities to retrieve unique references (IDs) of results for API-triggered operationsOctober 2024No
ACR Methodology for Quantifying, Monitoring, Reporting, and Verifying Greenhouse Gas Emissions Reductions and Removals from Landfill Gas Destruction and Beneficial Use ProjectsOctober 2024No
Guardian analytics: bottom-up data traceabilityNovember 2024No
CDM AMS-III.BM Methodology for Lightweight Two and Three Wheeled Personal TransportationNovember 2024No
Trustchain support for contract-based issuance and retirement implementationDecember 2024No
GS Methodology for Collection of Sargassum and Other Macroalgae to Avoid Emissions from Decomposition and to Use for Beneficial ProductsDecember 2024No
Reviewing and Verifying Atma policyDecember 2024No
Emissions Reduction/Removals (ERRs) Calculation Pre-Calculator in GuardianJanuary 2025No
Formula Driven Definitions & Schema Tree EnhancementJanuary 2025No
Dry-run policy execution 'savepoints' - restart policy dry-run from the list of 'saved' placesJanuary 2025No
Standardize UI on Angular Material, remove/replace PrimeNGJanuary 2025No
Verra Methodology for Enhanced Fleet Vehicle and Combustion Engine Efficiency (Under Final Review)January 2025No
Enhancing Research on Indexer and Analytics Use CasesJanuary 2025No
-## ---- January 2024---- +{% tabs %} +{% tab title="Upcoming Releases" %} +## ---- July 2024---- -## UI upgrade, AI search and project comparison +### Development of AMS-I.C.: Thermal Energy Production with or Without Electricity -1. Improving Guardian UI by adding more UI elements and also adding more colorful headers which can be customized. -2. Creating a static landing page which will have capability of performing project comparison within same instance using different parameters such as scale size, sectoral scopes, etc. -3. Implementing AI search for allowing Project developers to search policies as per the information entered. -4. Implementing Guider Search for allowing project developers to search policies using different parameters within same instance. -5. Implementation of property field when schema is created, which will be used for standardizing as per IWA specification. +1. Designing the Schema for the methodology +2. Development of the policy +3. Development of all the tools involved in this policy + * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 06- Project emissions from flaring + * Tool 07- Tool to calculate the emission factor for an electricity system + * Tool 09- Determining the baseline efficiency of thermal or electric energy generation systems + * Tool 12- Project and leakage emissions from transportation of freight + * Tool 16- Project and leakage emissions from biomas + * Tool 19- Demonstration of additionality of microscale project activities + * Tool 21- Demonstration of additionality of small-scale project activities  + * Tool 22- Leakage in biomass small-scale project activities -Referral Link: [https://github.com/hashgraph/guardian/issues/2850](https://github.com/hashgraph/guardian/issues/2850) +Referral Link : [https://github.com/hashgraph/guardian/issues/2873](https://github.com/hashgraph/guardian/issues/2873) -Documentation Link : +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.c.-thermal-energy-production-with-or-without-electricity](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.c.-thermal-energy-production-with-or-without-electricity) -{% embed url="https://docs.hedera.com/guardian/guardian/users/ai-search" %} +### Development of VMR0006: Energy Efficiency and Fuel Switch Measures in Thermal Applications, v1.2v -{% embed url="https://docs.hedera.com/guardian/guardian/users/guided-search-of-methodologies" %} +Designing of the Schema and getting it approved. -### Implement discontinuing policy workflow +Development of the policy using Schema -Implement the policy deprecation workflow which includes: +Development of all the tool involved in the policy -* Guardian UI allowing issuing SR to discontinue a policy (version) or the entire policy from a certain date (in the future or 'now'). -* Policy grid should display a suitable marker against non-active policies, and a different for the ones soon expiring. -* An appropriate message posted in the corresponding Hedera topic recording the 'discontinuing' decision -* For in-progress projects that have been registered and are operating under the policy it should be possible to 'switch' to the appropriate version of the policy which is still valid. +Referral Link : [https://github.com/hashgraph/guardian/issues/2922](https://github.com/hashgraph/guardian/issues/2922) -Referral Link : [https://github.com/hashgraph/guardian/issues/2030](https://github.com/hashgraph/guardian/issues/2030) +### Indexer API -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/discontinuing-policy-workflow](https://docs.hedera.com/guardian/guardian/standard-registry/discontinuing-policy-workflow) +Add suitable API facilities which would allow programmatic access to the indexed data and analytics, which include policy structure data (such as formulas used in the various elements - e.g. Tools) as well as project data. -### Gold Standard’s Carbon Sequestration through Accelerated Carbonation of Concrete Aggregate Webinar +Referral Link: [https://github.com/hashgraph/guardian/issues/3637](https://github.com/hashgraph/guardian/issues/3637) -* Design schemas for the Carbon Sequestration through Accelerated Carbonation of Concrete Aggregate methodology, create a PowerPoint presentation, and conduct webinar. -* Development of the policy using the schemas and workflow designed +### Filtering data for blocks is stateful API, introduce stateless data filters for API usage -Referral Link : [https://github.com/hashgraph/guardian/issues/2321](https://github.com/hashgraph/guardian/issues/2321) +I don't necessarily think there is a hard requirement to remove the stateful nature of guardian filtering, as we cannot predict, what are the downstream API consumers are using this functionality or affects, they will be without some kind of deprecation notice. -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/gold-standard-carbon-sequestration-through-accelerated-carbonation-of-concrete-aggregate](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/gold-standard-carbon-sequestration-through-accelerated-carbonation-of-concrete-aggregate) +So, the recommendation would be: -### Business User Policy Development Feature - schemas MVP +* Add ability to filter using a GET request for a filter, so data can be fetched and filtered in one action +* (As an alternative - preferred) It would be preferable to enable filtering at the block level when retrieving data so a API consumer does not need to add explicit filter blocks in block can use the Guardian API to be more RESTful by default. +* Post a six month deprecation notice for stateful usage of the filter (revert if hard requirement for others) -* Create a excel 'schema representation' standard suitable for non-technical users. _Note: use existing excel schemas from Tools and UNFCCC initiatives as guidance._ -* Create an explicit template for the above, downloadable from Guardian UI, which users can take and update/change to develop new schemas. -* Create an Export/Import UI and tooling which would allow seamless transformation of schemas written in Excel into valid Guardian JSON schemas and vice versa -* Ensure manual interventions are possible for corrections/adjustments of complex formulas and other issues. +An example, code enhancement could be implemented like this (tags are easier to reason about): -Referral Link : [https://github.com/hashgraph/guardian/issues/1885](https://github.com/hashgraph/guardian/issues/1885) +From old version: -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/import-export-in-excel](https://docs.hedera.com/guardian/guardian/standard-registry/import-export-in-excel) +``` + public function filterByTag(string $policyId, string $tag, string $uuid): object + { + return (object) $this->httpClient->post("policies/{$policyId}/tag/{$tag}/blocks", [ + 'filterValue' => $uuid + ], true); + } +``` -### Geographic raster imagery support in Guardian +to: -Introduce support for geoTIFF and other raster types of data such that: +``` +public function filterByTag(string $policyId, string $tag, string $uuid): object +{ + return (object) $this->httpClient->get("policies/{$policyId}/tag/{$tag}/blocks?filterValue={$uuid}"); +} +``` -* Guardian documents (i.e. in schemas) can reference raster data (in geoTIFF and other common formats) which are located on external (3rd party) systems. -* Guardian UI can display raster images and their georeferencing data when they are encountered in documents. -* Guardian policy can access and manipulate (use in calculations, etc) data from raster sources. +Or provide/document clearly a mechanism to filter on an [interface document block](https://docs.hedera.com/guardian/guardian/standard-registry/policies/policy-creation/introduction/interfacedocumentssourceblock) itself, which would be **preferred**. -Referral Link : [https://github.com/hashgraph/guardian/issues/1930](https://github.com/hashgraph/guardian/issues/1930) +Referral Link: [https://github.com/hashgraph/guardian/issues/3610](https://github.com/hashgraph/guardian/issues/3610) -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/schemas/creating-system-schema-using-ui](https://docs.hedera.com/guardian/guardian/standard-registry/schemas/creating-system-schema-using-ui) +### Development of AMS-I.E and Mass Comparison on Cookstove methodologies for the Webinar -### Development of ACM0007: Conversion from Single Cycle to Combined Cycle Power Generation +Designing of the Schema and getting it approved. -Designing of the Schema and getting it approved. Development of the policy using Schema Development of all the tools involved in the policy: +Development of the policy using Schema -* Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality -* Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion -* Tool 07- Tool to calculate the emission factor for an electricity system -* Tool 10- Tool to determine the remaining lifetime of equipment +Development of all the tool involved in the policy -Referral Link : [https://github.com/hashgraph/guardian/issues/2883](https://github.com/hashgraph/guardian/issues/2883) +Referral Link : [https://github.com/hashgraph/guardian/issues/2923](https://github.com/hashgraph/guardian/issues/2923) -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation) +### Auto-testing community submitted policies -## ---- February 2024---- +* Relying on the [Policy equivalence assessment based on their execution results for the same data #1886](https://github.com/hashgraph/guardian/issues/1886) and [Full project data comparison as produced/captured by policies #2704](https://github.com/hashgraph/guardian/issues/2704) introduce capability to automatically and repeatably test policies +* Introduce a hook into the new policy merge and release build events which triggers execution of the community policies regression test cycle -### Support externally controlled DIDs with keys in Guardian +Referral Link : [https://github.com/hashgraph/guardian/issues/2847](https://github.com/hashgraph/guardian/issues/2847) -Introduce a workflow into the Guardian where a DID Controller would introduce a dedicated verification method into the main DID for which the private key would be stored and managed by a Guardian instance. This way Guardian would only be able to control the specific verification method's key, but not the rest of the DID. +### Code audit: support and resolution of issues -Referral Link : [https://github.com/hashgraph/guardian/issues/2678](https://github.com/hashgraph/guardian/issues/2678) +* Define scope and organise code audit and application penetration testing by a reputable 3rd party security firm. +* Support audit team with Q\&A and setting up environments etc +* Resolve critical issues found. -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/bring-your-own-dids](https://docs.hedera.com/guardian/guardian/standard-registry/bring-your-own-dids) +Referral Link: [https://github.com/hashgraph/guardian/issues/2989](https://github.com/hashgraph/guardian/issues/2989) -### Development of AMS-I.D: Grid Connected Renewable Electricity Generation – v.18.0 +### GHG scorecards Research -Designing of the Schema and getting it approved.\ -Development of the policy using Schema\ -Development of all the tool involved in the policy +* Identify the KPIs (and the data requirements behind them) to be captured by the Environmental scorecards to best support demand signaling. +* Identify the business requirements for the Environmental Scorecards, i.e., how they could be used by supply and demand-side actors, markets, etc.? -Referral Link : [https://github.com/hashgraph/guardian/issues/2919](https://github.com/hashgraph/guardian/issues/2919) +Referral Link : [https://github.com/hashgraph/guardian/issues/1017](https://github.com/hashgraph/guardian/issues/1017) -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/ams-i.d-grid-connected-renewable-electricity-generation-v.18.0](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/ams-i.d-grid-connected-renewable-electricity-generation-v.18.0) +## ---- August 2024---- -### Mitigation Credits Research +### Token action block to work with token templates -Introduce the ability to mint Mitigation Asset Type tokens as the result of the calculation of the diff between planned (and reported on the Environmental) and actual results of the calculations based on the MRV data for a reporting period. This would likely require: +Enhance token action block to work with token templates in the same way as it works with pre-defined tokens. -* New type of blocks in the policy definition language specifying 'target' numbers. -* Policy Engine ability to mint different types of tokens depending on the conditions -* Needs to be linked with [GHG scorecards Research #1017](https://github.com/hashgraph/guardian/issues/1017) logic +Referral Link: [https://github.com/hashgraph/guardian/issues/2839 ](https://github.com/hashgraph/guardian/issues/2839) -Referral Link : [https://github.com/hashgraph/guardian/issues/54](https://github.com/hashgraph/guardian/issues/54) +### Enhance MongoDB Integration by incorporating seamless support for popular third-party services, such as MongoDB Atlas. -### Development of AMS-II.J.: Demand-Side Activities for Efficient Lighting Technologies +The task at hand involves modifying the codebase to seamlessly integrate the new MongoDB Atlas connection string without the redundant mongodb:// prefix. The correct format for the DB\_HOST environment variable should be mongodb+srv://:@staging.wj9lvfj.mongodb.net/?retryWrites=true\&w=majority. This adjustment will ensure a successful and accurate connection to our MongoDB Atlas instance. -1. Designing of the Schema and getting it approved. Development of the policy using Schema -2. Development of all the tool involved in the policy: - * Tool 07- Tool to calculate the emission factor for an electricity system +Referral Link: [https://github.com/hashgraph/guardian/issues/2940](https://github.com/hashgraph/guardian/issues/2940) -Referral Link : [https://github.com/hashgraph/guardian/issues/2885](https://github.com/hashgraph/guardian/issues/2885) +### Default values for schema-defined fields -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies) +* Introduce facilities into the Guardian schema language which would allow Guardian policy engine (and humans when they read these schemas in json) to recognize what values should be considered default for the documents based on these schemas. +* Make Guardian policy engine UI to put in the default values into the fields of forms based on such schemas. The fact that these are default values automatically inserted into the field should be clearly identifiable, i.e. they need to look different from the values users explicitly put into the (other) fields. +* All standard tools/libraries (e.g. for verification) should work with such schemas out of the box -### Development of AMS-III.AV.: Low Greenhouse Gas Emitting Safe Drinking Water Production Systems +Referral Link: [https://github.com/hashgraph/guardian/issues/2942](https://github.com/hashgraph/guardian/issues/2942) -1. Designing of the Schema and getting it approved. -2. Development of the policy using Schema -3. Development of all the tools involved in the policy: - * Tool 01- Tool for the demonstration and assessment of additionality - * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 19- Demonstration of additionality of microscale project activities - * Tool 21- Demonstration of additionality of small-scale project activities  - * Tool 30- Calculation of the fraction of non-renewable biomass +### API versioning and support/deprecation schedule -Referral Link : [https://github.com/hashgraph/guardian/issues/2880](https://github.com/hashgraph/guardian/issues/2880) +Introduce versioning of Guardian API such that: -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems) +* Backward compatibility is not broken for 'old' clients which are unaware of the existence of API versions +* The versioning technology selected (see options [here](https://docs.nestjs.com/techniques/versioning)) is aligned with the wishes of Guardian community +* API versions deprecation is appropriately embedded into the Guardian Push schedule +* Versioning numbering scheme: +* Meaningfully reflects changes in the API from version to version +* Is aligned with the generally accepted practice +* Is separate from the Guardian versions -## ---- March 2024---- +Referral Link: [https://github.com/hashgraph/guardian/issues/3236](https://github.com/hashgraph/guardian/issues/3236) -### Development of AMS-III.H.: Methane Recovery in Wastewater Treatment +### Leverage the pre-built images as the default way to start Guardian locally -1. Designing of the Schema and getting it approved. Development of the policy using Schema -2. Development of all the tools involved in the policy: - * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion - * Tool 04- Emissions from solid waste disposal sites - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 06- Project emissions from flaring - * Tool 32- Positive lists of technologies +* Update docker-compose.yml to leverage pre-built images from the latest Push +* Create a docker-compose-build.yml with the same content as the current docker-compose.yml file to allow developers to build images locally via docker +* Update the docs accordingly -Referral Link: [https://github.com/hashgraph/guardian/issues/2881](https://github.com/hashgraph/guardian/issues/2881) +Referral Link: [https://github.com/hashgraph/guardian/issues/3551](https://github.com/hashgraph/guardian/issues/3551) -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.h.-methane-recovery-in-wastewater-treatment](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.h.-methane-recovery-in-wastewater-treatment) +### GS Methodology for Emission Reductions from Safe Drinking Water Supply v.1.0 -## Development of AMS-III.F.: Avoidance of Methane Emissions Through Composting +1. Creating Schema design for this methodology. +2. Development of the schema and policy. +3. Testing the policy development through Guardian UI and configurator. -1. Designing of the Schema and getting it approved. -2. Development of the policy using Schema -3. Development of all the tools involved in the policy - * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion - * Tool 04- Emissions from solid waste disposal sites - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 13- Project and leakage emissions from composting +Referral Link: [https://github.com/hashgraph/guardian/issues/3705](https://github.com/hashgraph/guardian/issues/3705) -Referral Link: [https://github.com/hashgraph/guardian/issues/2876](https://github.com/hashgraph/guardian/issues/2876) +## ---- September 2024---- -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting) +### Guardian analytics: insights and top-down data way points -## Development of ACM0002: Grid-Connected Electricity Generation from Renewable Sources +The overall goal is to create a tool which provides non-technical high-level users (banks, auditors, analysts, accountants, etc) with insights out the box, and can serve as a way point for further data analytics, discovery and diagnostics. -Development of the policy with all details mentioned in the design schema.\ -Tools involved in this policy also needs to be developed. The tools are listed below: +* Introduce an AI data analytics backend which automatically and continuously processes and analyses Guardian data across the entire ecosystem with the purpose of identifying patterns, dependencies, trends, important factors and variables, groups (cohorts) of data, etc. +* Develop an analytics UI and visualization tool which is useable by non-technical users. This UI should allow users to continuously 'zoom in' or 'shift horizontally' on the data or the analytics results to examine them on a more detailed level or for a different parameter set: a different location, industry, sector, time range, specific values etc. +* Implement functionality to visualize and search the structure (or organization) of Guardian data, which allows users to determine for example which schemas refer to attributes, in which policies they are used, and then seamlessly navigate to which data has been generated that's connected to these. +* Provide an intelligent search interface which allows users at any point, while looking at a selection of data or an analytics result, to search for a 'similar' data or analytics result, while parameterizing the search with additional criteria. E.g. 'find similar set of MRVs but from projects in West Africa and those produced between 2021 and 2023'. +* Allow users to save the configuration of their searches, UI settings/configurations and other parameters generating analytics results, etc so users can repeat and further enhance their previous analysis later - with newly available data. -1. Tool 01- Tool for the demonstration and assessment of additionality -2. Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality -3. Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion -4. Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation -5. Tool 07- Tool to calculate the emission factor for an electricity system -6. Tool 10- Tool to determine the remaining lifetime of equipment -7. Tool 32- Positive lists of technologies +Referral Link: [ https://github.com/hashgraph/guardian/issues/3341](https://github.com/hashgraph/guardian/issues/3341) -Referral Link: [https://github.com/hashgraph/guardian/issues/2875](https://github.com/hashgraph/guardian/issues/2875) +### Rationalize API and UI return error codes -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources) +Let’s say I submit incorrect data to a block (as I would like to rely on the schema validation on the guardian) \ +Looking at the logs, I received an error about JSON schema validation: -### Conforming to Hedera DID, VC, VP, Standards +``` +2023-11-22 17:00:39 hedera-guardian-guardian-service-1 | 2023-11-22T17:00:39.765Z [GUARDIAN_SERVICE]: Error: Error: {"type":"JSON_SCHEMA_VALIDATION_ERROR","details":[{"instancePath":"","schemaPath":"#/required","keyword":"required","params":{"missingProperty":"field4"},"message":"must have required property 'field4'"}]} +``` -Update to memo field VP/DID structure to normalize DID spec with the rest of Hedera DID method work (which will also be updated) +I am receiving a 500 status code back from a block submission in point where I would normally expect to receive something kin to a 422 (unprocessable entity)? -Referral Link : [https://github.com/hashgraph/guardian/issues/2211](https://github.com/hashgraph/guardian/issues/2211) +Referral Link: [https://github.com/hashgraph/guardian/issues/2933](https://github.com/hashgraph/guardian/issues/2933) -### Development of PWRM0002 Plastic Waste Recycling Methodology, v1.1 +### Simplify default SR schema to take out optional properties -Designing of the Schema and getting it approved. +Remove ISIC, geography, law 'required' fields so to simplify the creation of the SRs. -Development of the policy using Schema +Referral Link: [https://github.com/hashgraph/guardian/issues/3435 ](https://github.com/hashgraph/guardian/issues/3435) -Development of all the tool involved in the policy +### On-demand state proof generation for critical Guardian operations -Referral Link : [https://github.com/hashgraph/guardian/issues/2920](https://github.com/hashgraph/guardian/issues/2920) +* Introduce the ability to trigger [Hedera State Proof ](https://hedera.com/blog/state-proofs-on-hedera)generation from Guardian interface for actions/operations or the general status of the Policy. +* State proofs are to be generated and presented to users for download. Guardian will not keep any registry or store them on the system. +* Introduce UI and the backend functionality to verify Hedera State Proofs generated by Guardian, ensure the long-term compatibility of this functionality. -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling) +Referral Link: [https://github.com/hashgraph/guardian/issues/2846](https://github.com/hashgraph/guardian/issues/2846) -## ---- April 2024---- +### Verra SDVM001 SD Vista Methodology for Time Savings from Improved Cookstoves -### DLT to Address Flawed Methodologies Blog +1. Creating Schema design for this methodology. +2. Development of the schema and policy. +3. Testing the policy development through Guardian UI and configurator. -Draft and published a blog post on the topic of DLT as a solution to address poor data quality and flawed emission and carbon credit methodologies. +Referral Link: [https://github.com/hashgraph/guardian/issues/3706](https://github.com/hashgraph/guardian/issues/3706) -Referral Link : [https://github.com/hashgraph/guardian/issues/2906](https://github.com/hashgraph/guardian/issues/2906) +### Scope 3/PCF Referencing Demo (Methodology Breakdown) -### Live project (data) migration across Policies, across Guardian instances +Once the approach has been approved, we can update the GHGP policy and run the example data, publish the PCFs to the Hedera Network, and demonstrate how another guardian policy (of a supply chain partner) can reference a dynamic PCF to support scope 3 calculations. I believe Wes was interested in having this be a methodology breakdown. -Implement User Interface (UI) and tooling allowing users to execute multiple cycles of 'export a live project' from a policy and 'import a live project' into another policy. This migration process should work irrespective of the policy versions, standard registries, and Guardian instances, automatically mapping data/documents to the corresponding policy steps in an intelligent way, referring to the Project Developer in situations needing human input via a convenient UI/UX ('User Experience'): - -* Project Developer can preview and assess the compatibility of policies and data, and the result of the migration using something analogous to the 'dry-run' mode. -* For cases where the 'new' schemas and policy steps match perfectly the 'old' valid data/documents from the 'source', the 'old' ones should be automatically accepted into the 'target' policy flow with no human intervention. -* Project Developer can review and select/guide the matching and the destination of the 'source' data/documents into the new policy flow with full visibility with regard to: - * 'source' and 'target' policy structure (side by side), with details of block parameters etc where required. - * content of the original and destination documents with field-level granularity -* Where data needs to be augmented and thus new signatures are required the corresponding Guardian users (e.g. Standard Registry) get requests to sign the data. +Referral Link: [https://github.com/hashgraph/guardian/issues/3723](https://github.com/hashgraph/guardian/issues/3723) -The migration process should be automated, and should result in the 'stopped' project/policy execution on the 'source platform' and 'resumed' from the same point in the policy flow on the 'destination' (other) platform, with full data and tokens visibility and provenance provability in the trust chain. The 'old' data and artifacts produced on the 'source' should be fully useable on the 'target', e.g. +## ---- October 2024---- -* used in reports -* viewable in the UI -* data referencable and useable in calculations and other policy actions (such as minting) -* operations on 'old' tokens are supported in the new policy smart contracts (retirement, exchanges, etc) +### Block configuration (mini-) wizards -Referral Link: [https://github.com/hashgraph/guardian/issues/3176](https://github.com/hashgraph/guardian/issues/3176) +Recent improvement in [#1655](https://github.com/hashgraph/guardian/issues/1655) and [#1687](https://github.com/hashgraph/guardian/issues/1687) introduced high-level wizards for Policy creation. Similar approach can be taken for configuring individual blocks - wizards can guide users via the flow and provide contextual description/documentation of UI items to avoid referring to the official documentation for user convenience: -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui](https://docs.hedera.com/guardian/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui) +* implement (mini-) wizards for block configuration +* ensure there is a brief description of each step to guide user understanding of actions +* allow users to save and exit wizards at any time -### FireBlocks Raw Signing Integration +Referral Link: [https://github.com/hashgraph/guardian/issues/2235](https://github.com/hashgraph/guardian/issues/2235) -We need to integrate FireBlocks , a Key management tool to manage the Keys and secure Guardian. To get complete info on Fireblocks, please look at [https://www.fireblocks.com/](https://www.fireblocks.com/) +### API facilities to retrieve unique references (IDs) of results for API-triggered operations -Referral Link : [https://github.com/hashgraph/guardian/issues/1314](https://github.com/hashgraph/guardian/issues/1314) +* Design a generic approach to the 'traceability' of API calls such that for each API call a chain of events and actions within Guardian policy and especially to outside systems can be established via the unique IDs culminating in: +* Hedera transactions +* Hedera topics messages +* Hedera contract calls +* Artifacts published on IPFS +* Introduce a corresponding UI where users can visually observe the same information +* Consider packaging this into Interactions Resilience Module (see related [Hedera interactions resilience module #2905](https://github.com/hashgraph/guardian/issues/2905)) -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/fireblocks-raw-signing/fireblocks-signing-in-guardian-ui](https://docs.hedera.com/guardian/guardian/standard-registry/fireblocks-raw-signing/fireblocks-signing-in-guardian-ui) +Referral Link: [https://github.com/hashgraph/guardian/issues/3139](https://github.com/hashgraph/guardian/issues/3139) -### Development of ACM0001: Flaring or Use of Landfill Gas +### ACR Methodology for Quantifying, Monitoring, Reporting, and Verifying Greenhouse Gas Emissions Reductions and Removals from Landfill Gas Destruction and Beneficial Use Projects -1. Designing of the Schema and getting it approved. -2. Development of the policy using Schema -3. Development of all the tools involved in the policy: - * Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality - * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion - * Tool 04- Emissions from solid waste disposal sites - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 06- Project emissions from flaring - * Tool 08- Tool to determine the mass flow of a greenhouse gas in a gaseous stream - * Tool 09- Determining the baseline efficiency of thermal or electric energy generation systems - * Tool 10- Tool to determine the remaining lifetime of equipment - * Tool 12- Project and leakage emissions from transportation of freight - * Tool 32- Positive lists of technologies +1. Creating Schema design for this methodology. +2. Development of the schema and policy. +3. Testing the policy development through Guardian UI and configurator. -Referral Link: [https://github.com/hashgraph/guardian/issues/2874](https://github.com/hashgraph/guardian/issues/2874) +Referral Link: [https://github.com/hashgraph/guardian/issues/3707](https://github.com/hashgraph/guardian/issues/3707) -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas) +## ---- November 2024---- -## ---- May 2024---- +### Guardian analytics: bottom-up data traceability -## Development of Gold Standard's Methodology for Methane Emission Reduction by Adjusted Water Management Practice in Rice Cultivation +1. Design and implement specialized analytics engine which would enable Guardian to identify, trace and display relations between data in different artifacts (VCs/VPs/tokens) including events (transactions/messages) on Hedera hashgraph, with unlimited traceability depth. +2. Intelligent 'understanding' of the nature of the transformations (e.g. in formulas in calculation blocks) is out of scope of this ticket, the analytics engine can view transformations as black boxes. If the 'original' data are used as 'input' into such a black box, for this analytics reporting, it can be assumed that the 'output' data depends on that data. +3. The system should correctly identify and display references to the 'original' data such as when VC document fields reference document fields in other VCs. +4. Users should be able to perform complex data searches with the scope limited to the dependencies graph. -Designing of the Schema and getting it approved. +Referral Link: [https://github.com/hashgraph/guardian/issues/3336](https://github.com/hashgraph/guardian/issues/3336) -Development of the policy using Schema +### CDM AMS-III.BM Methodology for Lightweight Two and Three Wheeled Personal Transportation -Development of all the tool involved in the policy +1. Creating Schema design for this methodology. +2. Development of the schema and policy. +3. Testing the policy development through Guardian UI and configurator. -Referral Link : [https://github.com/hashgraph/guardian/issues/2921](https://github.com/hashgraph/guardian/issues/2921) +Referral Link: [https://github.com/hashgraph/guardian/issues/3709](https://github.com/hashgraph/guardian/issues/3709) -Documentation Link: [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/methane-emission-reduction-by-adjusted-water-management-practice-in-rice-cultivation](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/methane-emission-reduction-by-adjusted-water-management-practice-in-rice-cultivation) +## ---- December 2024---- -### Full project data comparison as produced/captured by policies +### Trustchain support for contract-based issuance and retirement implementation -Introduce a comparison functionality where it'd be possible to 'diff' arbitrary sections or the entire trust-chains for different tokens, potentially issued by different policies such that the system would: +Extend/modify trustchain implementation to support new contract-based issuance and retirement functionality such that users have visibility to the entire lifecycle of the token and have access to all significant artifacts produced as a result. -* graphically display the differences where a user would then be able to 'scroll' through and review them in the UI -* get a numerical 'similarity score' indicating how similar the two 'chains' are +Referral Link: [https://github.com/hashgraph/guardian/issues/2243](https://github.com/hashgraph/guardian/issues/2243) -Referral Link : [https://github.com/hashgraph/guardian/issues/2704](https://github.com/hashgraph/guardian/issues/2704) +### GS Methodology for Collection of Sargassum and Other Macroalgae to Avoid Emissions from Decomposition and to Use for Beneficial Products -Documentation Link: [https://docs.hedera.com/guardian/guardian/standard-registry/project-comparison/project-comparison-using-ui](https://docs.hedera.com/guardian/guardian/standard-registry/project-comparison/project-comparison-using-ui) +1. Creating Schema design for this methodology. +2. Development of the schema and policy. +3. Testing the policy development through Guardian UI and configurator. -### Global environmental/Guardian data search (indexer) component for Hedera and IPFS +Referral Link: [https://github.com/hashgraph/guardian/issues/3710](https://github.com/hashgraph/guardian/issues/3710) -* Improve the data storage and indexing capabilities of Guardian for the data belonging to the local instance such that complex analytical queries could be run efficiently, such as 'search for data similar to this' and 'what is the possibility of this being a double entry for something submitted elsewhere'. -* Introduce a global search and indexing capability for data produce by other (all) instances such that queries above could be run on the entire body of Guardian data produced from the beginning of time (in blockchain sense). -* Extend [Block and policy discoverability/search #2281](https://github.com/hashgraph/guardian/issues/2281) for users to be able to preview the usage of the block without having to import "other SR's" policy into their Guardian instance +### Reviewing and Verifying Atma policy -Referral Link : [https://github.com/hashgraph/guardian/issues/2629](https://github.com/hashgraph/guardian/issues/2629) +Some interesting next steps could be to address the final data gaps; engage with PACT to review the policy and schema, provide feedback, and identify new use cases and features; engage with a third-party auditor to review or potentially verify the policy; and eventually have actual downstream supply chain partners referencing the PCF. -Documentation Link: [https://docs.hedera.com/guardian/guardian/global-indexer/indexer-user-guide](https://docs.hedera.com/guardian/guardian/global-indexer/indexer-user-guide) +Referral Link: [https://github.com/hashgraph/guardian/issues/3729](https://github.com/hashgraph/guardian/issues/3729) -### Revamp Guardian user/roles and permissions model +## ---- January 2025---- -* Fundamentally separate the concept of users, roles and permissions in Guardian -* Introduce granular concept of permissions which could be assigned to users, a user could then perform a specific function within the role if its assigned role 'contains' this permission. These should include (but not limited to): - * Policy edit/submit for review - * Policy view - * Policy approval & publish -* Introduce a "user admin" role, which allows: - * defining new roles from permissions - * assigning of roles to users -* Create a permissioning system which verifies actor role before any action has been taken throughout Guardian -* Package in suitable most-common role set into Guardian so it can be operated immediately 'out of the box' without the need for additional configuration -* Create a concept of 'delegation' where a user with a particular role/permission can explicitly 'delegate' this role/permission to another user -* Introduce the functionality to produce a report (page, download) which lists all users and their roles/permissions mapping in the system +### Emissions Reduction/Removals (ERRs) Calculation Pre-Calculator in Guardian -Referral Link : [https://github.com/hashgraph/guardian/issues/2844](https://github.com/hashgraph/guardian/issues/2844) +Based on input data a estimated ERRs should be able to be queried in project development. -Documentation Link: [https://docs.hedera.com/guardian/guardian/standard-registry/roles-and-permissions/roles-and-permissions-user-guide](https://docs.hedera.com/guardian/guardian/standard-registry/roles-and-permissions/roles-and-permissions-user-guide) +Referral Link: [https://github.com/hashgraph/guardian/issues/3619](https://github.com/hashgraph/guardian/issues/3619) -## ---- June 2024---- +### Formula Driven Definitions & Schema Tree Enhancement -### Hedera interactions resilience module +A clear label (and an ability to define a formula) for a business user to build high level definitions and link them to underlying schemas, tools, and patterns closer aligned with VCM formulaic definitions -Create a Guardian 'transaction execution' service which would assure orderly transaction execution and their status tracking, and provide intelligent retry and failure recovery functionality such that required transactions would be guaranteed to be asynchronously executed once, and only once, and in the right order. +Referral Link: [https://github.com/hashgraph/guardian/issues/3408](https://github.com/hashgraph/guardian/issues/3408) -Referral Link : [https://github.com/hashgraph/guardian/issues/2905](https://github.com/hashgraph/guardian/issues/2905) +### Dry-run policy execution 'savepoints' - restart policy dry-run from the list of 'saved' places -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/asynchronous-tasks-status](https://docs.hedera.com/guardian-dev-1/guardian/standard-registry/asynchronous-tasks-status) +* Introduce a new functionality for users to 'save' dry-run execution status at arbitrary points by clicking 'save state' button. +* The system should support the creation of multiple save points for the same execution workflow +* Next time the (draft) policy is executed in the dry-run mode users should be given a choice whether to restart from the beginning or continue execution from any of the 'save points'. +* Starting execution from a 'save point' invalidates and removes all the other save points that logically followed it +* It should be possible to delete some or all save points manually -### Further evolution of policy comparison (a.k.a 'mass diff') +Referral Link: [https://github.com/hashgraph/guardian/issues/2838](https://github.com/hashgraph/guardian/issues/2838) -Relying on the work done in the course of [#1793](https://github.com/hashgraph/guardian/issues/1793) (i.e. creating data structures (hashes) to enable more efficient comparison), allow for mass-comparison of policies such that a user should be able to search for local policies 'similar' to 'different' to some other policy based on some similarity threshold. This is related (but different) to [#2281](https://github.com/hashgraph/guardian/issues/2281) as it focuses on 'easy diff' vs 'easy search'. +### Standardize UI on Angular Material, remove/replace PrimeNG -Referral Link : [https://github.com/hashgraph/guardian/issues/2706](https://github.com/hashgraph/guardian/issues/2706) +* Standardize Guardian UI to be Material-based +* Remove/Replace all PrimeNG with Material without changing the look feel -Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui](https://docs.hedera.com/guardian-dev-1/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui) +Referral Link: [https://github.com/hashgraph/guardian/issues/3141](https://github.com/hashgraph/guardian/issues/3141) -### Correction of all the Methodologies with new DID Spec +### Verra Methodology for Enhanced Fleet Vehicle and Combustion Engine Efficiency (Under Final Review) -1. We need to implement and correct all the methodologies added with new DID specification. -2. Deploy all the methodologies on testnet and create IPFS timestamps. -3. Test the methodologies with dummy and real data. +1. Creating Schema design for this methodology. +2. Development of the schema and policy. +3. Testing the policy development through Guardian UI and configurator. -Referral Link: [https://github.com/hashgraph/guardian/issues/3296](https://github.com/hashgraph/guardian/issues/3296) +Referral Link: [https://github.com/hashgraph/guardian/issues/3711](https://github.com/hashgraph/guardian/issues/3711) -### Development of ACM0018: Electricity Generation from Biomass in Power-Only Plants +### Enhancing Research on Indexer and Analytics Use Cases -1. Designing of the Schema and getting it approved. -2. Development of the policy using Schema -3. Development of all the tools involved in the policy - * Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality - * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion - * Tool 04- Emissions from solid waste disposal sites - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 09- Determining the baseline efficiency of thermal or electric energy generation systems - * Tool 10- Tool to determine the remaining lifetime of equipment - * Tool 12- Project and leakage emissions from transportation of freight - * Tool 16- Project and leakage emissions from biomass +Identify and map out potential uses cases for the indexer and what type of analytics if could be used for. -Referral Link : [https://github.com/hashgraph/guardian/issues/2879](https://github.com/hashgraph/guardian/issues/2879) +Referral Link: [https://github.com/hashgraph/guardian/issues/3730](https://github.com/hashgraph/guardian/issues/3730) +{% endtab %} -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants) +{% tab title="Previous Releases" %} +## ---- January 2024---- -### Development of AMS-I.F.: Renewable Electricity Generation for Captive Use and Mini-Grid +## UI upgrade, AI search and project comparison -1. Designing of the Schema and getting it approved. -2. Development of the policy using Schema -3. Development of all the tools involved in the policy: - * Tool 01- Tool for the demonstration and assessment of additionality - * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion - * Tool 04- Emissions from solid waste disposal sites - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 06- Project emissions from flaring - * Tool 12- Project and leakage emissions from transportation of freight - * Tool 13- Project and leakage emissions from composting - * Tool 14- Project and leakage emissions from anaerobic digesters - * Tool 16- Project and leakage emissions from biomass - * Tool 33- Default values for common parameters +1. Improving Guardian UI by adding more UI elements and also adding more colorful headers which can be customized. +2. Creating a static landing page which will have capability of performing project comparison within same instance using different parameters such as scale size, sectoral scopes, etc. +3. Implementing AI search for allowing Project developers to search policies as per the information entered. +4. Implementing Guider Search for allowing project developers to search policies using different parameters within same instance. +5. Implementation of property field when schema is created, which will be used for standardizing as per IWA specification. -Referral Link: [https://github.com/hashgraph/guardian/issues/2882](https://github.com/hashgraph/guardian/issues/2882) +Referral Link: [https://github.com/hashgraph/guardian/issues/2850](https://github.com/hashgraph/guardian/issues/2850) -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.f.-renewable-electricity-generation-for-captive-use-and-mini-grid](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.f.-renewable-electricity-generation-for-captive-use-and-mini-grid) +Documentation Link : -### Development of AMS-I.A. +{% embed url="https://docs.hedera.com/guardian/guardian/users/ai-search" %} -1. Designing of the Schema and getting it approved. -2. Development of the policy using Schema -3. Development of all the tools involved in the policy: - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 16- Project and leakage emissions from biomass - * Tool 21- Demonstration of additionality of small-scale project activities  - * Tool 33- Default values for common parameters +{% embed url="https://docs.hedera.com/guardian/guardian/users/guided-search-of-methodologies" %} -Referral Link: [https://github.com/hashgraph/guardian/issues/2884](https://github.com/hashgraph/guardian/issues/2884) +### Implement discontinuing policy workflow -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user) +Implement the policy deprecation workflow which includes: -## ---- July 2024---- +* Guardian UI allowing issuing SR to discontinue a policy (version) or the entire policy from a certain date (in the future or 'now'). +* Policy grid should display a suitable marker against non-active policies, and a different for the ones soon expiring. +* An appropriate message posted in the corresponding Hedera topic recording the 'discontinuing' decision +* For in-progress projects that have been registered and are operating under the policy it should be possible to 'switch' to the appropriate version of the policy which is still valid. -### Development of AMS-I.C.: Thermal Energy Production with or Without Electricity +Referral Link : [https://github.com/hashgraph/guardian/issues/2030](https://github.com/hashgraph/guardian/issues/2030) -1. Designing the Schema for the methodology -2. Development of the policy -3. Development of all the tools involved in this policy - * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion - * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation - * Tool 06- Project emissions from flaring - * Tool 07- Tool to calculate the emission factor for an electricity system - * Tool 09- Determining the baseline efficiency of thermal or electric energy generation systems - * Tool 12- Project and leakage emissions from transportation of freight - * Tool 16- Project and leakage emissions from biomas - * Tool 19- Demonstration of additionality of microscale project activities - * Tool 21- Demonstration of additionality of small-scale project activities  - * Tool 22- Leakage in biomass small-scale project activities +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/discontinuing-policy-workflow](https://docs.hedera.com/guardian/guardian/standard-registry/discontinuing-policy-workflow) -Referral Link : [https://github.com/hashgraph/guardian/issues/2873](https://github.com/hashgraph/guardian/issues/2873) +### Gold Standard’s Carbon Sequestration through Accelerated Carbonation of Concrete Aggregate Webinar -Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.c.-thermal-energy-production-with-or-without-electricity](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.c.-thermal-energy-production-with-or-without-electricity) +* Design schemas for the Carbon Sequestration through Accelerated Carbonation of Concrete Aggregate methodology, create a PowerPoint presentation, and conduct webinar. +* Development of the policy using the schemas and workflow designed -### Development of VMR0006: Energy Efficiency and Fuel Switch Measures in Thermal Applications, v1.2v +Referral Link : [https://github.com/hashgraph/guardian/issues/2321](https://github.com/hashgraph/guardian/issues/2321) -Designing of the Schema and getting it approved. +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/gold-standard-carbon-sequestration-through-accelerated-carbonation-of-concrete-aggregate](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/gold-standard-carbon-sequestration-through-accelerated-carbonation-of-concrete-aggregate) -Development of the policy using Schema +### Business User Policy Development Feature - schemas MVP -Development of all the tool involved in the policy +* Create a excel 'schema representation' standard suitable for non-technical users. _Note: use existing excel schemas from Tools and UNFCCC initiatives as guidance._ +* Create an explicit template for the above, downloadable from Guardian UI, which users can take and update/change to develop new schemas. +* Create an Export/Import UI and tooling which would allow seamless transformation of schemas written in Excel into valid Guardian JSON schemas and vice versa +* Ensure manual interventions are possible for corrections/adjustments of complex formulas and other issues. -Referral Link : [https://github.com/hashgraph/guardian/issues/2922](https://github.com/hashgraph/guardian/issues/2922) +Referral Link : [https://github.com/hashgraph/guardian/issues/1885](https://github.com/hashgraph/guardian/issues/1885) -### Indexer API +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/import-export-in-excel](https://docs.hedera.com/guardian/guardian/standard-registry/import-export-in-excel) -Add suitable API facilities which would allow programmatic access to the indexed data and analytics, which include policy structure data (such as formulas used in the various elements - e.g. Tools) as well as project data. +### Geographic raster imagery support in Guardian -Referral Link: [https://github.com/hashgraph/guardian/issues/3637](https://github.com/hashgraph/guardian/issues/3637) +Introduce support for geoTIFF and other raster types of data such that: -### Filtering data for blocks is stateful API, introduce stateless data filters for API usage +* Guardian documents (i.e. in schemas) can reference raster data (in geoTIFF and other common formats) which are located on external (3rd party) systems. +* Guardian UI can display raster images and their georeferencing data when they are encountered in documents. +* Guardian policy can access and manipulate (use in calculations, etc) data from raster sources. -I don't necessarily think there is a hard requirement to remove the stateful nature of guardian filtering, as we cannot predict, what are the downstream API consumers are using this functionality or affects, they will be without some kind of deprecation notice. +Referral Link : [https://github.com/hashgraph/guardian/issues/1930](https://github.com/hashgraph/guardian/issues/1930) -So, the recommendation would be: +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/schemas/creating-system-schema-using-ui](https://docs.hedera.com/guardian/guardian/standard-registry/schemas/creating-system-schema-using-ui) -* Add ability to filter using a GET request for a filter, so data can be fetched and filtered in one action -* (As an alternative - preferred) It would be preferable to enable filtering at the block level when retrieving data so a API consumer does not need to add explicit filter blocks in block can use the Guardian API to be more RESTful by default. -* Post a six month deprecation notice for stateful usage of the filter (revert if hard requirement for others) +### Development of ACM0007: Conversion from Single Cycle to Combined Cycle Power Generation -An example, code enhancement could be implemented like this (tags are easier to reason about): +Designing of the Schema and getting it approved. Development of the policy using Schema Development of all the tools involved in the policy: -From old version: +* Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality +* Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion +* Tool 07- Tool to calculate the emission factor for an electricity system +* Tool 10- Tool to determine the remaining lifetime of equipment -``` - public function filterByTag(string $policyId, string $tag, string $uuid): object - { - return (object) $this->httpClient->post("policies/{$policyId}/tag/{$tag}/blocks", [ - 'filterValue' => $uuid - ], true); - } -``` +Referral Link : [https://github.com/hashgraph/guardian/issues/2883](https://github.com/hashgraph/guardian/issues/2883) -to: +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0007-conversion-from-single-cycle-to-combined-cycle-power-generation) -``` -public function filterByTag(string $policyId, string $tag, string $uuid): object -{ - return (object) $this->httpClient->get("policies/{$policyId}/tag/{$tag}/blocks?filterValue={$uuid}"); -} -``` +## ---- February 2024---- -Or provide/document clearly a mechanism to filter on an [interface document block](https://docs.hedera.com/guardian/guardian/standard-registry/policies/policy-creation/introduction/interfacedocumentssourceblock) itself, which would be **preferred**. +### Support externally controlled DIDs with keys in Guardian -Referral Link: [https://github.com/hashgraph/guardian/issues/3610](https://github.com/hashgraph/guardian/issues/3610) +Introduce a workflow into the Guardian where a DID Controller would introduce a dedicated verification method into the main DID for which the private key would be stored and managed by a Guardian instance. This way Guardian would only be able to control the specific verification method's key, but not the rest of the DID. -### Development of AMS-I.E and Mass Comparison on Cookstove methodologies for the Webinar +Referral Link : [https://github.com/hashgraph/guardian/issues/2678](https://github.com/hashgraph/guardian/issues/2678) -Designing of the Schema and getting it approved. +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/bring-your-own-dids](https://docs.hedera.com/guardian/guardian/standard-registry/bring-your-own-dids) -Development of the policy using Schema +### Development of AMS-I.D: Grid Connected Renewable Electricity Generation – v.18.0 +Designing of the Schema and getting it approved.\ +Development of the policy using Schema\ Development of all the tool involved in the policy -Referral Link : [https://github.com/hashgraph/guardian/issues/2923](https://github.com/hashgraph/guardian/issues/2923) +Referral Link : [https://github.com/hashgraph/guardian/issues/2919](https://github.com/hashgraph/guardian/issues/2919) -### Auto-testing community submitted policies +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/ams-i.d-grid-connected-renewable-electricity-generation-v.18.0](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/ams-i.d-grid-connected-renewable-electricity-generation-v.18.0) -* Relying on the [Policy equivalence assessment based on their execution results for the same data #1886](https://github.com/hashgraph/guardian/issues/1886) and [Full project data comparison as produced/captured by policies #2704](https://github.com/hashgraph/guardian/issues/2704) introduce capability to automatically and repeatably test policies -* Introduce a hook into the new policy merge and release build events which triggers execution of the community policies regression test cycle +### Mitigation Credits Research -Referral Link : [https://github.com/hashgraph/guardian/issues/2847](https://github.com/hashgraph/guardian/issues/2847) +Introduce the ability to mint Mitigation Asset Type tokens as the result of the calculation of the diff between planned (and reported on the Environmental) and actual results of the calculations based on the MRV data for a reporting period. This would likely require: -### GHG scorecards Research +* New type of blocks in the policy definition language specifying 'target' numbers. +* Policy Engine ability to mint different types of tokens depending on the conditions +* Needs to be linked with [GHG scorecards Research #1017](https://github.com/hashgraph/guardian/issues/1017) logic -* Identify the KPIs (and the data requirements behind them) to be captured by the Environmental scorecards to best support demand signaling. -* Identify the business requirements for the Environmental Scorecards, i.e., how they could be used by supply and demand-side actors, markets, etc.? +Referral Link : [https://github.com/hashgraph/guardian/issues/54](https://github.com/hashgraph/guardian/issues/54) -Referral Link : [https://github.com/hashgraph/guardian/issues/1017](https://github.com/hashgraph/guardian/issues/1017) +### Development of AMS-II.J.: Demand-Side Activities for Efficient Lighting Technologies -## ---- August 2024---- +1. Designing of the Schema and getting it approved. Development of the policy using Schema +2. Development of all the tool involved in the policy: + * Tool 07- Tool to calculate the emission factor for an electricity system -### Token action block to work with token templates +Referral Link : [https://github.com/hashgraph/guardian/issues/2885](https://github.com/hashgraph/guardian/issues/2885) -Enhance token action block to work with token templates in the same way as it works with pre-defined tokens. +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-ii.j.-demand-side-activities-for-efficient-lighting-technologies) -Referral Link: [https://github.com/hashgraph/guardian/issues/2839 ](https://github.com/hashgraph/guardian/issues/2839) +### Development of AMS-III.AV.: Low Greenhouse Gas Emitting Safe Drinking Water Production Systems -### Enhance MongoDB Integration by incorporating seamless support for popular third-party services, such as MongoDB Atlas. +1. Designing of the Schema and getting it approved. +2. Development of the policy using Schema +3. Development of all the tools involved in the policy: + * Tool 01- Tool for the demonstration and assessment of additionality + * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 19- Demonstration of additionality of microscale project activities + * Tool 21- Demonstration of additionality of small-scale project activities  + * Tool 30- Calculation of the fraction of non-renewable biomass -The task at hand involves modifying the codebase to seamlessly integrate the new MongoDB Atlas connection string without the redundant mongodb:// prefix. The correct format for the DB\_HOST environment variable should be mongodb+srv://:@staging.wj9lvfj.mongodb.net/?retryWrites=true\&w=majority. This adjustment will ensure a successful and accurate connection to our MongoDB Atlas instance. +Referral Link : [https://github.com/hashgraph/guardian/issues/2880](https://github.com/hashgraph/guardian/issues/2880) -Referral Link: [https://github.com/hashgraph/guardian/issues/2940](https://github.com/hashgraph/guardian/issues/2940) +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.av.-low-greenhouse-gas-emitting-safe-drinking-water-production-systems) -### Default values for schema-defined fields +## ---- March 2024---- -* Introduce facilities into the Guardian schema language which would allow Guardian policy engine (and humans when they read these schemas in json) to recognize what values should be considered default for the documents based on these schemas. -* Make Guardian policy engine UI to put in the default values into the fields of forms based on such schemas. The fact that these are default values automatically inserted into the field should be clearly identifiable, i.e. they need to look different from the values users explicitly put into the (other) fields. -* All standard tools/libraries (e.g. for verification) should work with such schemas out of the box +### Development of AMS-III.H.: Methane Recovery in Wastewater Treatment -Referral Link: [https://github.com/hashgraph/guardian/issues/2942](https://github.com/hashgraph/guardian/issues/2942) +1. Designing of the Schema and getting it approved. Development of the policy using Schema +2. Development of all the tools involved in the policy: + * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion + * Tool 04- Emissions from solid waste disposal sites + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 06- Project emissions from flaring + * Tool 32- Positive lists of technologies -### API versioning and support/deprecation schedule +Referral Link: [https://github.com/hashgraph/guardian/issues/2881](https://github.com/hashgraph/guardian/issues/2881) -Introduce versioning of Guardian API such that: +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.h.-methane-recovery-in-wastewater-treatment](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.h.-methane-recovery-in-wastewater-treatment) -* Backward compatibility is not broken for 'old' clients which are unaware of the existence of API versions -* The versioning technology selected (see options [here](https://docs.nestjs.com/techniques/versioning)) is aligned with the wishes of Guardian community -* API versions deprecation is appropriately embedded into the Guardian Push schedule -* Versioning numbering scheme: -* Meaningfully reflects changes in the API from version to version -* Is aligned with the generally accepted practice -* Is separate from the Guardian versions +## Development of AMS-III.F.: Avoidance of Methane Emissions Through Composting -Referral Link: [https://github.com/hashgraph/guardian/issues/3236](https://github.com/hashgraph/guardian/issues/3236) +1. Designing of the Schema and getting it approved. +2. Development of the policy using Schema +3. Development of all the tools involved in the policy + * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion + * Tool 04- Emissions from solid waste disposal sites + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 13- Project and leakage emissions from composting -### Leverage the pre-built images as the default way to start Guardian locally +Referral Link: [https://github.com/hashgraph/guardian/issues/2876](https://github.com/hashgraph/guardian/issues/2876) + +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-iii.f.-avoidance-of-methane-emissions-through-composting) + +## Development of ACM0002: Grid-Connected Electricity Generation from Renewable Sources + +Development of the policy with all details mentioned in the design schema.\ +Tools involved in this policy also needs to be developed. The tools are listed below: + +1. Tool 01- Tool for the demonstration and assessment of additionality +2. Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality +3. Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion +4. Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation +5. Tool 07- Tool to calculate the emission factor for an electricity system +6. Tool 10- Tool to determine the remaining lifetime of equipment +7. Tool 32- Positive lists of technologies -* Update docker-compose.yml to leverage pre-built images from the latest Push -* Create a docker-compose-build.yml with the same content as the current docker-compose.yml file to allow developers to build images locally via docker -* Update the docs accordingly +Referral Link: [https://github.com/hashgraph/guardian/issues/2875](https://github.com/hashgraph/guardian/issues/2875) -Referral Link: [https://github.com/hashgraph/guardian/issues/3551](https://github.com/hashgraph/guardian/issues/3551) +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0002-grid-connected-electricity-generation-from-renewable-sources) -### GS Methodology for Emission Reductions from Safe Drinking Water Supply v.1.0 +### Conforming to Hedera DID, VC, VP, Standards -1. Creating Schema design for this methodology. -2. Development of the schema and policy. -3. Testing the policy development through Guardian UI and configurator. +Update to memo field VP/DID structure to normalize DID spec with the rest of Hedera DID method work (which will also be updated) -Referral Link: [https://github.com/hashgraph/guardian/issues/3705](https://github.com/hashgraph/guardian/issues/3705) +Referral Link : [https://github.com/hashgraph/guardian/issues/2211](https://github.com/hashgraph/guardian/issues/2211) -## ---- September 2024---- +### Development of PWRM0002 Plastic Waste Recycling Methodology, v1.1 -### Guardian analytics: insights and top-down data way points +Designing of the Schema and getting it approved. -The overall goal is to create a tool which provides non-technical high-level users (banks, auditors, analysts, accountants, etc) with insights out the box, and can serve as a way point for further data analytics, discovery and diagnostics. +Development of the policy using Schema -* Introduce an AI data analytics backend which automatically and continuously processes and analyses Guardian data across the entire ecosystem with the purpose of identifying patterns, dependencies, trends, important factors and variables, groups (cohorts) of data, etc. -* Develop an analytics UI and visualization tool which is useable by non-technical users. This UI should allow users to continuously 'zoom in' or 'shift horizontally' on the data or the analytics results to examine them on a more detailed level or for a different parameter set: a different location, industry, sector, time range, specific values etc. -* Implement functionality to visualize and search the structure (or organization) of Guardian data, which allows users to determine for example which schemas refer to attributes, in which policies they are used, and then seamlessly navigate to which data has been generated that's connected to these. -* Provide an intelligent search interface which allows users at any point, while looking at a selection of data or an analytics result, to search for a 'similar' data or analytics result, while parameterizing the search with additional criteria. E.g. 'find similar set of MRVs but from projects in West Africa and those produced between 2021 and 2023'. -* Allow users to save the configuration of their searches, UI settings/configurations and other parameters generating analytics results, etc so users can repeat and further enhance their previous analysis later - with newly available data. +Development of all the tool involved in the policy -Referral Link: [ https://github.com/hashgraph/guardian/issues/3341](https://github.com/hashgraph/guardian/issues/3341) +Referral Link : [https://github.com/hashgraph/guardian/issues/2920](https://github.com/hashgraph/guardian/issues/2920) -### Rationalize API and UI return error codes +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/pwrm0002-plastic-waste-recycling) -Let’s say I submit incorrect data to a block (as I would like to rely on the schema validation on the guardian) \ -Looking at the logs, I received an error about JSON schema validation: +## ---- April 2024---- -``` -2023-11-22 17:00:39 hedera-guardian-guardian-service-1 | 2023-11-22T17:00:39.765Z [GUARDIAN_SERVICE]: Error: Error: {"type":"JSON_SCHEMA_VALIDATION_ERROR","details":[{"instancePath":"","schemaPath":"#/required","keyword":"required","params":{"missingProperty":"field4"},"message":"must have required property 'field4'"}]} -``` +### DLT to Address Flawed Methodologies Blog -I am receiving a 500 status code back from a block submission in point where I would normally expect to receive something kin to a 422 (unprocessable entity)? +Draft and published a blog post on the topic of DLT as a solution to address poor data quality and flawed emission and carbon credit methodologies. -Referral Link: [https://github.com/hashgraph/guardian/issues/2933](https://github.com/hashgraph/guardian/issues/2933) +Referral Link : [https://github.com/hashgraph/guardian/issues/2906](https://github.com/hashgraph/guardian/issues/2906) -### Simplify default SR schema to take out optional properties +### Live project (data) migration across Policies, across Guardian instances -Remove ISIC, geography, law 'required' fields so to simplify the creation of the SRs. +Implement User Interface (UI) and tooling allowing users to execute multiple cycles of 'export a live project' from a policy and 'import a live project' into another policy. This migration process should work irrespective of the policy versions, standard registries, and Guardian instances, automatically mapping data/documents to the corresponding policy steps in an intelligent way, referring to the Project Developer in situations needing human input via a convenient UI/UX ('User Experience'): -Referral Link: [https://github.com/hashgraph/guardian/issues/3435 ](https://github.com/hashgraph/guardian/issues/3435) +* Project Developer can preview and assess the compatibility of policies and data, and the result of the migration using something analogous to the 'dry-run' mode. +* For cases where the 'new' schemas and policy steps match perfectly the 'old' valid data/documents from the 'source', the 'old' ones should be automatically accepted into the 'target' policy flow with no human intervention. +* Project Developer can review and select/guide the matching and the destination of the 'source' data/documents into the new policy flow with full visibility with regard to: + * 'source' and 'target' policy structure (side by side), with details of block parameters etc where required. + * content of the original and destination documents with field-level granularity +* Where data needs to be augmented and thus new signatures are required the corresponding Guardian users (e.g. Standard Registry) get requests to sign the data. -### On-demand state proof generation for critical Guardian operations +The migration process should be automated, and should result in the 'stopped' project/policy execution on the 'source platform' and 'resumed' from the same point in the policy flow on the 'destination' (other) platform, with full data and tokens visibility and provenance provability in the trust chain. The 'old' data and artifacts produced on the 'source' should be fully useable on the 'target', e.g. -* Introduce the ability to trigger [Hedera State Proof ](https://hedera.com/blog/state-proofs-on-hedera)generation from Guardian interface for actions/operations or the general status of the Policy. -* State proofs are to be generated and presented to users for download. Guardian will not keep any registry or store them on the system. -* Introduce UI and the backend functionality to verify Hedera State Proofs generated by Guardian, ensure the long-term compatibility of this functionality. +* used in reports +* viewable in the UI +* data referencable and useable in calculations and other policy actions (such as minting) +* operations on 'old' tokens are supported in the new policy smart contracts (retirement, exchanges, etc) -Referral Link: [https://github.com/hashgraph/guardian/issues/2846](https://github.com/hashgraph/guardian/issues/2846) +Referral Link: [https://github.com/hashgraph/guardian/issues/3176](https://github.com/hashgraph/guardian/issues/3176) -### Verra SDVM001 SD Vista Methodology for Time Savings from Improved Cookstoves +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui](https://docs.hedera.com/guardian/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui) -1. Creating Schema design for this methodology. -2. Development of the schema and policy. -3. Testing the policy development through Guardian UI and configurator. +### FireBlocks Raw Signing Integration -Referral Link: [https://github.com/hashgraph/guardian/issues/3706](https://github.com/hashgraph/guardian/issues/3706) +We need to integrate FireBlocks , a Key management tool to manage the Keys and secure Guardian. To get complete info on Fireblocks, please look at [https://www.fireblocks.com/](https://www.fireblocks.com/) -### Scope 3/PCF Referencing Demo (Methodology Breakdown) +Referral Link : [https://github.com/hashgraph/guardian/issues/1314](https://github.com/hashgraph/guardian/issues/1314) -Once the approach has been approved, we can update the GHGP policy and run the example data, publish the PCFs to the Hedera Network, and demonstrate how another guardian policy (of a supply chain partner) can reference a dynamic PCF to support scope 3 calculations. I believe Wes was interested in having this be a methodology breakdown. +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/fireblocks-raw-signing/fireblocks-signing-in-guardian-ui](https://docs.hedera.com/guardian/guardian/standard-registry/fireblocks-raw-signing/fireblocks-signing-in-guardian-ui) -Referral Link: [https://github.com/hashgraph/guardian/issues/3723](https://github.com/hashgraph/guardian/issues/3723) +### Development of ACM0001: Flaring or Use of Landfill Gas -## ---- October 2024---- +1. Designing of the Schema and getting it approved. +2. Development of the policy using Schema +3. Development of all the tools involved in the policy: + * Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality + * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion + * Tool 04- Emissions from solid waste disposal sites + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 06- Project emissions from flaring + * Tool 08- Tool to determine the mass flow of a greenhouse gas in a gaseous stream + * Tool 09- Determining the baseline efficiency of thermal or electric energy generation systems + * Tool 10- Tool to determine the remaining lifetime of equipment + * Tool 12- Project and leakage emissions from transportation of freight + * Tool 32- Positive lists of technologies -### Block configuration (mini-) wizards +Referral Link: [https://github.com/hashgraph/guardian/issues/2874](https://github.com/hashgraph/guardian/issues/2874) -Recent improvement in [#1655](https://github.com/hashgraph/guardian/issues/1655) and [#1687](https://github.com/hashgraph/guardian/issues/1687) introduced high-level wizards for Policy creation. Similar approach can be taken for configuring individual blocks - wizards can guide users via the flow and provide contextual description/documentation of UI items to avoid referring to the official documentation for user convenience: +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0001-flaring-or-use-of-landfill-gas) -* implement (mini-) wizards for block configuration -* ensure there is a brief description of each step to guide user understanding of actions -* allow users to save and exit wizards at any time +## ---- May 2024---- -Referral Link: [https://github.com/hashgraph/guardian/issues/2235](https://github.com/hashgraph/guardian/issues/2235) +## Development of Gold Standard's Methodology for Methane Emission Reduction by Adjusted Water Management Practice in Rice Cultivation -### API facilities to retrieve unique references (IDs) of results for API-triggered operations +Designing of the Schema and getting it approved. -* Design a generic approach to the 'traceability' of API calls such that for each API call a chain of events and actions within Guardian policy and especially to outside systems can be established via the unique IDs culminating in: -* Hedera transactions -* Hedera topics messages -* Hedera contract calls -* Artifacts published on IPFS -* Introduce a corresponding UI where users can visually observe the same information -* Consider packaging this into Interactions Resilience Module (see related [Hedera interactions resilience module #2905](https://github.com/hashgraph/guardian/issues/2905)) +Development of the policy using Schema -Referral Link: [https://github.com/hashgraph/guardian/issues/3139](https://github.com/hashgraph/guardian/issues/3139) +Development of all the tool involved in the policy -### ACR Methodology for Quantifying, Monitoring, Reporting, and Verifying Greenhouse Gas Emissions Reductions and Removals from Landfill Gas Destruction and Beneficial Use Projects +Referral Link : [https://github.com/hashgraph/guardian/issues/2921](https://github.com/hashgraph/guardian/issues/2921) -1. Creating Schema design for this methodology. -2. Development of the schema and policy. -3. Testing the policy development through Guardian UI and configurator. +Documentation Link: [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/methane-emission-reduction-by-adjusted-water-management-practice-in-rice-cultivation](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/methane-emission-reduction-by-adjusted-water-management-practice-in-rice-cultivation) -Referral Link: [https://github.com/hashgraph/guardian/issues/3707](https://github.com/hashgraph/guardian/issues/3707) +### Full project data comparison as produced/captured by policies -## ---- November 2024---- +Introduce a comparison functionality where it'd be possible to 'diff' arbitrary sections or the entire trust-chains for different tokens, potentially issued by different policies such that the system would: -### Guardian analytics: bottom-up data traceability +* graphically display the differences where a user would then be able to 'scroll' through and review them in the UI +* get a numerical 'similarity score' indicating how similar the two 'chains' are -1. Design and implement specialized analytics engine which would enable Guardian to identify, trace and display relations between data in different artifacts (VCs/VPs/tokens) including events (transactions/messages) on Hedera hashgraph, with unlimited traceability depth. -2. Intelligent 'understanding' of the nature of the transformations (e.g. in formulas in calculation blocks) is out of scope of this ticket, the analytics engine can view transformations as black boxes. If the 'original' data are used as 'input' into such a black box, for this analytics reporting, it can be assumed that the 'output' data depends on that data. -3. The system should correctly identify and display references to the 'original' data such as when VC document fields reference document fields in other VCs. -4. Users should be able to perform complex data searches with the scope limited to the dependencies graph. +Referral Link : [https://github.com/hashgraph/guardian/issues/2704](https://github.com/hashgraph/guardian/issues/2704) -Referral Link: [https://github.com/hashgraph/guardian/issues/3336](https://github.com/hashgraph/guardian/issues/3336) +Documentation Link: [https://docs.hedera.com/guardian/guardian/standard-registry/project-comparison/project-comparison-using-ui](https://docs.hedera.com/guardian/guardian/standard-registry/project-comparison/project-comparison-using-ui) -### CDM AMS-III.BM Methodology for Lightweight Two and Three Wheeled Personal Transportation +### Global environmental/Guardian data search (indexer) component for Hedera and IPFS -1. Creating Schema design for this methodology. -2. Development of the schema and policy. -3. Testing the policy development through Guardian UI and configurator. +* Improve the data storage and indexing capabilities of Guardian for the data belonging to the local instance such that complex analytical queries could be run efficiently, such as 'search for data similar to this' and 'what is the possibility of this being a double entry for something submitted elsewhere'. +* Introduce a global search and indexing capability for data produce by other (all) instances such that queries above could be run on the entire body of Guardian data produced from the beginning of time (in blockchain sense). +* Extend [Block and policy discoverability/search #2281](https://github.com/hashgraph/guardian/issues/2281) for users to be able to preview the usage of the block without having to import "other SR's" policy into their Guardian instance -Referral Link: [https://github.com/hashgraph/guardian/issues/3709](https://github.com/hashgraph/guardian/issues/3709) +Referral Link : [https://github.com/hashgraph/guardian/issues/2629](https://github.com/hashgraph/guardian/issues/2629) -## ---- December 2024---- +Documentation Link: [https://docs.hedera.com/guardian/guardian/global-indexer/indexer-user-guide](https://docs.hedera.com/guardian/guardian/global-indexer/indexer-user-guide) -### Trustchain support for contract-based issuance and retirement implementation +### Revamp Guardian user/roles and permissions model -Extend/modify trustchain implementation to support new contract-based issuance and retirement functionality such that users have visibility to the entire lifecycle of the token and have access to all significant artifacts produced as a result. +* Fundamentally separate the concept of users, roles and permissions in Guardian +* Introduce granular concept of permissions which could be assigned to users, a user could then perform a specific function within the role if its assigned role 'contains' this permission. These should include (but not limited to): + * Policy edit/submit for review + * Policy view + * Policy approval & publish +* Introduce a "user admin" role, which allows: + * defining new roles from permissions + * assigning of roles to users +* Create a permissioning system which verifies actor role before any action has been taken throughout Guardian +* Package in suitable most-common role set into Guardian so it can be operated immediately 'out of the box' without the need for additional configuration +* Create a concept of 'delegation' where a user with a particular role/permission can explicitly 'delegate' this role/permission to another user +* Introduce the functionality to produce a report (page, download) which lists all users and their roles/permissions mapping in the system -Referral Link: [https://github.com/hashgraph/guardian/issues/2243](https://github.com/hashgraph/guardian/issues/2243) +Referral Link : [https://github.com/hashgraph/guardian/issues/2844](https://github.com/hashgraph/guardian/issues/2844) -### GS Methodology for Collection of Sargassum and Other Macroalgae to Avoid Emissions from Decomposition and to Use for Beneficial Products +Documentation Link: [https://docs.hedera.com/guardian/guardian/standard-registry/roles-and-permissions/roles-and-permissions-user-guide](https://docs.hedera.com/guardian/guardian/standard-registry/roles-and-permissions/roles-and-permissions-user-guide) -1. Creating Schema design for this methodology. -2. Development of the schema and policy. -3. Testing the policy development through Guardian UI and configurator. +## ---- June 2024---- -Referral Link: [https://github.com/hashgraph/guardian/issues/3710](https://github.com/hashgraph/guardian/issues/3710) +### Hedera interactions resilience module -### Reviewing and Verifying Atma policy +Create a Guardian 'transaction execution' service which would assure orderly transaction execution and their status tracking, and provide intelligent retry and failure recovery functionality such that required transactions would be guaranteed to be asynchronously executed once, and only once, and in the right order. -Some interesting next steps could be to address the final data gaps; engage with PACT to review the policy and schema, provide feedback, and identify new use cases and features; engage with a third-party auditor to review or potentially verify the policy; and eventually have actual downstream supply chain partners referencing the PCF. +Referral Link : [https://github.com/hashgraph/guardian/issues/2905](https://github.com/hashgraph/guardian/issues/2905) -Referral Link: [https://github.com/hashgraph/guardian/issues/3729](https://github.com/hashgraph/guardian/issues/3729) +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/asynchronous-tasks-status](https://docs.hedera.com/guardian-dev-1/guardian/standard-registry/asynchronous-tasks-status) -## ---- January 2025---- +### Further evolution of policy comparison (a.k.a 'mass diff') -### Emissions Reduction/Removals (ERRs) Calculation Pre-Calculator in Guardian +Relying on the work done in the course of [#1793](https://github.com/hashgraph/guardian/issues/1793) (i.e. creating data structures (hashes) to enable more efficient comparison), allow for mass-comparison of policies such that a user should be able to search for local policies 'similar' to 'different' to some other policy based on some similarity threshold. This is related (but different) to [#2281](https://github.com/hashgraph/guardian/issues/2281) as it focuses on 'easy diff' vs 'easy search'. -Based on input data a estimated ERRs should be able to be queried in project development. +Referral Link : [https://github.com/hashgraph/guardian/issues/2706](https://github.com/hashgraph/guardian/issues/2706) -Referral Link: [https://github.com/hashgraph/guardian/issues/3619](https://github.com/hashgraph/guardian/issues/3619) +Documentation Link : [https://docs.hedera.com/guardian/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui](https://docs.hedera.com/guardian-dev-1/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui) -### Formula Driven Definitions & Schema Tree Enhancement +### Correction of all the Methodologies with new DID Spec -A clear label (and an ability to define a formula) for a business user to build high level definitions and link them to underlying schemas, tools, and patterns closer aligned with VCM formulaic definitions +1. We need to implement and correct all the methodologies added with new DID specification. +2. Deploy all the methodologies on testnet and create IPFS timestamps. +3. Test the methodologies with dummy and real data. -Referral Link: [https://github.com/hashgraph/guardian/issues/3408](https://github.com/hashgraph/guardian/issues/3408) +Referral Link: [https://github.com/hashgraph/guardian/issues/3296](https://github.com/hashgraph/guardian/issues/3296) -### Dry-run policy execution 'savepoints' - restart policy dry-run from the list of 'saved' places +### Development of ACM0018: Electricity Generation from Biomass in Power-Only Plants -* Introduce a new functionality for users to 'save' dry-run execution status at arbitrary points by clicking 'save state' button. -* The system should support the creation of multiple save points for the same execution workflow -* Next time the (draft) policy is executed in the dry-run mode users should be given a choice whether to restart from the beginning or continue execution from any of the 'save points'. -* Starting execution from a 'save point' invalidates and removes all the other save points that logically followed it -* It should be possible to delete some or all save points manually +1. Designing of the Schema and getting it approved. +2. Development of the policy using Schema +3. Development of all the tools involved in the policy + * Tool 02- Combined tool to identify the baseline scenario and demonstrate additionality + * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion + * Tool 04- Emissions from solid waste disposal sites + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 09- Determining the baseline efficiency of thermal or electric energy generation systems + * Tool 10- Tool to determine the remaining lifetime of equipment + * Tool 12- Project and leakage emissions from transportation of freight + * Tool 16- Project and leakage emissions from biomass -Referral Link: [https://github.com/hashgraph/guardian/issues/2838](https://github.com/hashgraph/guardian/issues/2838) +Referral Link : [https://github.com/hashgraph/guardian/issues/2879](https://github.com/hashgraph/guardian/issues/2879) -### Standardize UI on Angular Material, remove/replace PrimeNG +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-acm0018-electricity-generation-from-biomass-in-power-only-plants) -* Standardize Guardian UI to be Material-based -* Remove/Replace all PrimeNG with Material without changing the look feel +### Development of AMS-I.F.: Renewable Electricity Generation for Captive Use and Mini-Grid -Referral Link: [https://github.com/hashgraph/guardian/issues/3141](https://github.com/hashgraph/guardian/issues/3141) +1. Designing of the Schema and getting it approved. +2. Development of the policy using Schema +3. Development of all the tools involved in the policy: + * Tool 01- Tool for the demonstration and assessment of additionality + * Tool 03- Tool to calculate project or leakage CO2 emissions from fossil fuel combustion + * Tool 04- Emissions from solid waste disposal sites + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 06- Project emissions from flaring + * Tool 12- Project and leakage emissions from transportation of freight + * Tool 13- Project and leakage emissions from composting + * Tool 14- Project and leakage emissions from anaerobic digesters + * Tool 16- Project and leakage emissions from biomass + * Tool 33- Default values for common parameters -### Verra Methodology for Enhanced Fleet Vehicle and Combustion Engine Efficiency (Under Final Review) +Referral Link: [https://github.com/hashgraph/guardian/issues/2882](https://github.com/hashgraph/guardian/issues/2882) -1. Creating Schema design for this methodology. -2. Development of the schema and policy. -3. Testing the policy development through Guardian UI and configurator. +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.f.-renewable-electricity-generation-for-captive-use-and-mini-grid](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.f.-renewable-electricity-generation-for-captive-use-and-mini-grid) -Referral Link: [https://github.com/hashgraph/guardian/issues/3711](https://github.com/hashgraph/guardian/issues/3711) +### Development of AMS-I.A. -### Enhancing Research on Indexer and Analytics Use Cases +1. Designing of the Schema and getting it approved. +2. Development of the policy using Schema +3. Development of all the tools involved in the policy: + * Tool 05- Baseline, project and/or leakage emissions from electricity consumption and monitoring of electricity generation + * Tool 16- Project and leakage emissions from biomass + * Tool 21- Demonstration of additionality of small-scale project activities  + * Tool 33- Default values for common parameters -Identify and map out potential uses cases for the indexer and what type of analytics if could be used for. +Referral Link: [https://github.com/hashgraph/guardian/issues/2884](https://github.com/hashgraph/guardian/issues/2884) -Referral Link: [https://github.com/hashgraph/guardian/issues/3730](https://github.com/hashgraph/guardian/issues/3730) +Documentation Link : [https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user](https://docs.hedera.com/guardian/guardian/demo-guide/carbon-offsets/cdm-ams-i.a.-electricity-generation-by-the-user) +{% endtab %} +{% endtabs %} diff --git a/docs/guardian/standard-registry/asynchronous-tasks-status.md b/docs/guardian/standard-registry/asynchronous-tasks-status.md index a5c5604cfa..8d21d6eabb 100644 --- a/docs/guardian/standard-registry/asynchronous-tasks-status.md +++ b/docs/guardian/standard-registry/asynchronous-tasks-status.md @@ -2,7 +2,7 @@ Worker Tasks tab displays active user's jobs performed asynchronously by the ‘worker’. -
+
* Tasks can have the following status: * IN QUEUE - for task which are queued pending activation @@ -12,6 +12,6 @@ Worker Tasks tab displays active user's jobs performed asynchronously by the ‘ * Failed tasks (in the ERROR state) can be manually retried or deleted. * Tasks with COMPLETE status are cleared automatically 30 minutes after execution. The system assumes that tasks which have been in the PROCESSING for longer than an hour have stalled. Guardian automatically re-queues them for another attempt (with IN QUEUE state is displayed in the UI). -
+
Architecturally, all errors (if any) are passed back to the Guardian process initiated the task (e.g. ‘publish schema’), which may result in the entire execution flow being rolled back. In the case of task manual restart and its successful completion the success status is passed back to the process originally initiated the task. diff --git a/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md b/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md index f80dbc334d..959449faf2 100644 --- a/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md +++ b/docs/guardian/standard-registry/bring-your-own-dids/bring-your-own-byo-dids-ui.md @@ -17,7 +17,7 @@ Enter Hedera network account with non-0 hbar balance to be used by the system fo #### 1.2.1 Default DID -
+
When the ‘Generate new DID document’ option is selected, clicking on the Next button would result in Guardian generating a new dedicated DID to be used exclusively in Guardian based on the Hedera account ID entered at the previous step. Such DID would have the following format: @@ -34,15 +34,15 @@ Example: #### 1.2.2 Externally-controlled (custom) DID -
+
-
+
Selecting ‘Custom DID document’ option enables the dialogue text window where the externally-generated/controlled DID document can be pasted from the clip-board. The document must contain Ed25519VerificationKey2018 and Bls12381G2Key2020 verification methods to be useable by Guardian. ### 1.3 Keys -
+
For BYO DID of Standard Registries, in the cases where there are multiple verification methods Standard Registry users are required to specify which one of them is to be used in Guardian, and pass the corresponding private key into Guardian to be used for signatures. diff --git a/docs/guardian/standard-registry/live-project-data-migration/README.md b/docs/guardian/standard-registry/live-project-data-migration/README.md index 9849326d45..3990e66280 100644 --- a/docs/guardian/standard-registry/live-project-data-migration/README.md +++ b/docs/guardian/standard-registry/live-project-data-migration/README.md @@ -1,2 +1,10 @@ # 📁 Live Project Data Migration +Live project data migration allows seamless transitions of project data across different policies, versions, registries, and Guardian instances. This process involves the following key aspects: + +1. **Automated Migration**: Users can export live project data from one policy and import it into another, regardless of policy versions or instances. This automation includes intelligent mapping of data/documents to the corresponding policy steps. +2. **User Interface and Experience**: The system provides a UI that allows project developers to preview and assess the compatibility of policies and data, similar to a 'dry-run' mode. If new schemas and policy steps match the old data perfectly, the migration happens automatically without human intervention. +3. **Manual Oversight**: For more complex migrations, the UI allows developers to review and guide the matching process, offering full visibility of the source and target policy structures and document contents. +4. **Data Provenance and Integrity**: The migration process maintains data visibility and provenance within the trust chain, ensuring that old data and artifacts are usable on the new platform for reporting, calculations, and other policy actions. + +These features aim to provide a seamless, automated, and user-friendly migration experience, ensuring data integrity and continuity across different Guardian instances and policy versions​ diff --git a/docs/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui.md b/docs/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui.md index 574341ffce..2447f6585c 100644 --- a/docs/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui.md +++ b/docs/guardian/standard-registry/live-project-data-migration/live-project-data-migration-ui.md @@ -1,5 +1,10 @@ # ↔️ Live Project Data Migration UI +1. [Step By Step Process](live-project-data-migration-ui.md#id-1.-step-by-step-process) +2. [Demo Video](live-project-data-migration-ui.md#id-2.-demo-video) + +## 1. Step By Step Process + ## 1. Exporting Policy Data Data migration feature allows transfer of some or all policy artefacts and/or state into another policy (on the same of different Guardian instance) by exporting into and then importing the .data file. @@ -49,3 +54,7 @@ When state migration is selected block mapping could be used to optimize the mig For Policies with dynamic tokens mapping of token templates might be required.
+ +## 2. Demo Video + +[Youtube](https://youtu.be/stSudc82pZU?si=Nsv6RyM6I\_NpRvwE\&t=110) diff --git a/docs/guardian/standard-registry/policies/auto-suggestion/demo-using-ui.md b/docs/guardian/standard-registry/policies/auto-suggestion/demo-using-ui.md index 21453b4b83..6ef91652fa 100644 --- a/docs/guardian/standard-registry/policies/auto-suggestion/demo-using-ui.md +++ b/docs/guardian/standard-registry/policies/auto-suggestion/demo-using-ui.md @@ -6,7 +6,7 @@ 1. It allows to setup suggestion priority order of policies and modules. A user with SR role can drag and drop items to create specific prioritized sequence of policies to use for suggestions. -
+
2. Suggestion mode can be turned on by clicking on “Suggestions” button in policy/module configurator diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/README.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/README.md new file mode 100644 index 0000000000..b1027f9ef3 --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/README.md @@ -0,0 +1,2 @@ +# 📁 Auto Testing of the Policies + diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/README.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/README.md new file mode 100644 index 0000000000..b1f202dcdf --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/README.md @@ -0,0 +1,2 @@ +# ⚙️ Auto Testing Policies APIs + diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/adding-new-test-to-the-policy.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/adding-new-test-to-the-policy.md new file mode 100644 index 0000000000..f3c7ed1987 --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/adding-new-test-to-the-policy.md @@ -0,0 +1,5 @@ +# Adding new Test to the policy + +{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/{policyId}/test" method="post" %} +[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/deleting-the-specified-test.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/deleting-the-specified-test.md new file mode 100644 index 0000000000..d643f0455a --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/deleting-the-specified-test.md @@ -0,0 +1,5 @@ +# Deleting the Specified Test + +{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/{policyId}/test/{testId}" method="delete" %} +[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-details-of-the-most-recent-test-run.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-details-of-the-most-recent-test-run.md new file mode 100644 index 0000000000..1d21bd9fec --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-details-of-the-most-recent-test-run.md @@ -0,0 +1,5 @@ +# Returning details of the most recent test run + +{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/{policyId}/test/{testId}/details" method="get" %} +[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-policy-test-by-id.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-policy-test-by-id.md new file mode 100644 index 0000000000..3c8c8c3d34 --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/returning-policy-test-by-id.md @@ -0,0 +1,5 @@ +# Returning Policy Test by ID + +{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/{policyId}/test/{testId}" method="get" %} +[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/running-the-policy-test.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/running-the-policy-test.md new file mode 100644 index 0000000000..f855643faf --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/running-the-policy-test.md @@ -0,0 +1,5 @@ +# Running the Policy Test + +{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/{policyId}/test/{testId}/start" method="post" %} +[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/stopping-the-specified-test.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/stopping-the-specified-test.md new file mode 100644 index 0000000000..741a18c99c --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-policies-apis/stopping-the-specified-test.md @@ -0,0 +1,5 @@ +# Stopping the Specified Test + +{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/{policyId}/test/{testId}/stop" method="post" %} +[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% endswagger %} diff --git a/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-using-ui.md b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-using-ui.md new file mode 100644 index 0000000000..9699721471 --- /dev/null +++ b/docs/guardian/standard-registry/policies/auto-testing-of-the-policies/auto-testing-using-ui.md @@ -0,0 +1,91 @@ +# 💻 Auto Testing using UI + +## **Add test data to the Policy** + +Tests can be added to the Policy, when such a policy gets published then the added tests get embedded into the policy file. + +Such tests are imported/exported together with their respective policies. + +{% hint style="info" %} +**Note:** Tests can be run only when the policy is in the dry-run or demo status. +{% endhint %} + +### 1. Adding Tests + +Tests can be added to the policy via the corresponding menu option as shown on the screenshots below: + +
+ +![](<../../../../.gitbook/assets/1 (20).png>) + +### 2. Running Tests + +To launch a test navigate to the tests list using the ‘Test details’ menu option\ + + +
+ +\ +Select the desired test in the grid and press _**Run (or Re-Run)**_ + +![](<../../../../.gitbook/assets/3 (19).png>) + +{% hint style="info" %} +**Note:** There could be only one active (running) test per policy, multiple policies can be running tests at the same time. +{% endhint %} + +
+ +### 3. View Test Results + +Test results can be viewed in the test window + +
+ +There are potential outcomes of running policy tests + +1. **Stopped** – test was stopped by the user +2. **Success** – test was successfully executed and the results are fully matching those originally captured + +![](<../../../../.gitbook/assets/6 (19).png>) + +3. **Failure (1)** – an error has occurred during the run of the test, the execution of the test was not completed + +![](<../../../../.gitbook/assets/7 (19).png>) + +4. **Failure (2)** – test was executed, however test results (i.e. the produced artifacts) differ from those originally captured + +![](<../../../../.gitbook/assets/8 (20).png>) + +Detailed comparison of the execution results (documents) can be performed by clicking on the ‘Show more details’ button. + +![](<../../../../.gitbook/assets/9 (17).png>) + +![](<../../../../.gitbook/assets/10 (18).png>) + +### 4. Removing Tests + +Tests which are not being run can be deleted. + +![](<../../../../.gitbook/assets/11 (15).png>) + +### 5. Access from the grid + +Tests can be managed and run from the Manage Policies grid. + +
+ +This view allows to: + +* Add a test to the policies if it does not yet have any tests +* Run the most recently added test +* Re-run the most recently run test +* Monitor the status of the test being run + +## 2. Demo Mode + +To simplify the UI of policy testing (useful for novice users) a new ‘**Demo**’ mode of policy import has been introduced. In this mode all policy processing is ‘read-only’, policy editing is not possible, and no communication with external systems such as Hedera network and/or IPFS is performed. Policy execution in the **Demo** mode is similar to **dry-run**. + +To use demo mode the corresponding option should be selected on the policy import dialogue. + +
diff --git a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md index 8adbeb98a9..33013188e9 100644 --- a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md +++ b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-block-using-ui.md @@ -15,13 +15,13 @@ Blocks of similar configuration can be searched by clicking on search icon with Search result displays all the policies and its blocks, which have same flow with respect to the base block search. -
+
### 2.1 Context The search finds and displays the ranked list (most similar on top) of longest continuous matching sequences of blocks surrounding the target block (highlighted). The search considers all dimensions - next/previous, parent/child - to be of equal weight and thus ranks results by the number of blocks in the found ‘similar’ sequence. -
+
Additionally, the system compares the configuration of the blocks individually, and displays the %% of similarity to the right of each block in comparison with the corresponding blocks in the base policy. @@ -35,13 +35,13 @@ Clicking “Apply” button will transfer (or apply) the configuration of the fo **Note:** Original settings of the base policy block will be lost if ‘Apply’ action is executed. {% endhint %} -
+
### 2.3 Search Results Layout Display Search results are displayed as folded groups by Policy (policy name is displayed in the group heading). -
+
The results are sorted by (in the correct order): @@ -49,7 +49,7 @@ The results are sorted by (in the correct order): 2\. Cumulative similarity score (%%) of the blocks -
+
## 2. Demo Video diff --git a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md index 63b0c8eb0e..b0cf511537 100644 --- a/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md +++ b/docs/guardian/standard-registry/policies/block-policy-discoverability/search-policy-using-ui.md @@ -7,15 +7,15 @@ Policies can be searched by clicking on "Search policies" button. It can be searched based on their similarity to the given policy. -
+
The results are displayed in the descending order, the most similar policy is displayed at the top. It also displays similarity rate percentage. -
+
We can also have an option for full display mode of similarity result as shown: -
+
## 2. Demo Video diff --git a/docs/guardian/standard-registry/policies/policy-creation/apis-for-asynchronous-execution/importing-policy-from-a-zip-file-with-metadata.md b/docs/guardian/standard-registry/policies/policy-creation/apis-for-asynchronous-execution/importing-policy-from-a-zip-file-with-metadata.md index 2d0654f5b8..9f93247dcf 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/apis-for-asynchronous-execution/importing-policy-from-a-zip-file-with-metadata.md +++ b/docs/guardian/standard-registry/policies/policy-creation/apis-for-asynchronous-execution/importing-policy-from-a-zip-file-with-metadata.md @@ -1,5 +1,5 @@ # Importing Policy from a Zip file with Metadata -{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/push/import/file-metadata" method="post" %} -[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% swagger src="../../../../../.gitbook/assets/swagger (4).yaml" path="/policies/push/import/file-metadata" method="post" %} +[swagger (4).yaml](<../../../../../.gitbook/assets/swagger (4).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/importing-policy-from-a-zip-file-with-metadata.md b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/importing-policy-from-a-zip-file-with-metadata.md index ee2cf9c595..e614f87ed0 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/importing-policy-from-a-zip-file-with-metadata.md +++ b/docs/guardian/standard-registry/policies/policy-creation/creating-a-policy-using-apis/importing-policy-from-a-zip-file-with-metadata.md @@ -1,5 +1,5 @@ # Importing Policy from a Zip file with Metadata -{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/policies/import/file-metadata" method="post" %} -[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% swagger src="../../../../../.gitbook/assets/swagger (4).yaml" path="/policies/import/file-metadata" method="post" %} +[swagger (4).yaml](<../../../../../.gitbook/assets/swagger (4).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/policy-creation/introduction/interfacedocumentssourceblock.md b/docs/guardian/standard-registry/policies/policy-creation/introduction/interfacedocumentssourceblock.md index c2e8aa2fb8..c0556f5403 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/introduction/interfacedocumentssourceblock.md +++ b/docs/guardian/standard-registry/policies/policy-creation/introduction/interfacedocumentssourceblock.md @@ -28,20 +28,17 @@ To know more information about events, please look at [Events](events.md). ### API Parameters -{% swagger method="get" path="" baseUrl="/policies/{policyId}/blocks/{uuid}" summary="" %} -{% swagger-description %} +`GET` `/policies/{policyId}/blocks/{uuid}` -{% endswagger-description %} +#### Path Parameters -{% swagger-parameter in="path" name="policyId" type="String" required="true" %} -Policy ID -{% endswagger-parameter %} +| Name | Type | Description | +| ------------------------------------------ | ------ | ----------- | +| policyId\* | String | Policy ID | +| uuid\* | String | Block UUID | -{% swagger-parameter in="path" name="uuid" type="String" required="true" %} -Block UUID -{% endswagger-parameter %} - -{% swagger-response status="200: OK" description="Successful Operation" %} +{% tabs %} +{% tab title="200: OK Successful Operation" %} ``` { "data": [ @@ -125,27 +122,59 @@ Block UUID "group": "8e58d3eb-9af5-4705-a9b3- ..... ``` -{% endswagger-response %} -{% endswagger %} +{% endtab %} +{% endtabs %} + +`POST` `/policies/{policyId}/blocks/{uuid}` + +#### Path Parameters + +| Name | Type | Description | +| ------------------------------------------ | ------ | ----------- | +| policyId\* | String | Policy ID | +| uuid\* | String | Block UUID | + +#### Request Body + +| Name | Type | Description | +| -------------- | ------ | ------------------------ | +| orderDirection | String | Order Direction ASC,DESC | +| orderField | String | Order Field Path | + +### Path Parameters for Pagination and Filtration + +#### With Child Blocks + +InterfaceDocumentsSourceBlock can accept and pass-on query parameters to the child pagination and filtration add-ons. -{% swagger method="post" path="" baseUrl="/policies/{policyId}/blocks/{uuid}" summary="" %} -{% swagger-description %} +**Pagination** -{% endswagger-description %} +| Name | Type | +| ------------ | ------ | +| itemsPerPage | Number | +| page | Number | -{% swagger-parameter in="body" name="orderDirection" type="String" required="false" %} -Order Direction ASC,DESC -{% endswagger-parameter %} +**Filtration** -{% swagger-parameter in="body" name="orderField" type="String" required="false" %} -Order Field Path -{% endswagger-parameter %} +| Name | Type | Description | +| ----- | ------ | ----------------------------------------- | +| key | Number | ID or a tag of the filtration add-ons | +| Value | String | the filtervalue for the Filtration add-on | -{% swagger-parameter in="path" name="policyId" type="String" required="true" %} -Policy ID -{% endswagger-parameter %} +**Example:** -{% swagger-parameter in="path" name="uuid" type="String" required="true" %} -Block UUID -{% endswagger-parameter %} -{% endswagger %} +``` +/api/v1/policies//blocks/?itemsPerPage=20&page=0&Block_5=valuetofilterby +``` + +#### Without Child Blocks + +| Name | Description | +| ------------ | ----------------------------------- | +| filterByUUID | return document with specified uuid | + +**Example:** + +``` +/api/v1/policies//blocks/?itemsPerPage=20&page=0&=&filterByUUID= +``` diff --git a/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md b/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md index 6ba9763006..924bfdc6af 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md +++ b/docs/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.md @@ -108,7 +108,7 @@ To get detailed information on Signature status, we have an info icon near the t To get the final Signature Result with detailed information such as which users have Signed / Declined, we need to hover on the Status as shown below: -
+
### API Parameters diff --git a/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md b/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md index dcb4152693..ad696bf3eb 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md +++ b/docs/guardian/standard-registry/policies/policy-creation/introduction/reportblock-and-reportitemblock.md @@ -19,7 +19,7 @@ We have added new Impacts Section to display Primary/Secondary Impacts token det In the case when multiple linked mint blocks are used then the system displays all linked VPs as shown below: -
+
#### 2.1 Data Format: diff --git a/docs/guardian/standard-registry/policies/policy-creation/policy-demo.md b/docs/guardian/standard-registry/policies/policy-creation/policy-demo.md index 1a93872443..565de1a7f6 100644 --- a/docs/guardian/standard-registry/policies/policy-creation/policy-demo.md +++ b/docs/guardian/standard-registry/policies/policy-creation/policy-demo.md @@ -2,7 +2,7 @@ Once you login as a Standard Registry and finish the setup, click on Policies tab. -![](<../../../../.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) +![](<../../../../.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) We have two options to create Policy : diff --git a/docs/guardian/standard-registry/policies/policy-differentiation/README.md b/docs/guardian/standard-registry/policies/policy-differentiation/README.md index aac6f478e0..0effd4653b 100644 --- a/docs/guardian/standard-registry/policies/policy-differentiation/README.md +++ b/docs/guardian/standard-registry/policies/policy-differentiation/README.md @@ -1,3 +1,11 @@ -# 📁 Policy Differentiation +# 📁 Global Policy Search & Compare -Policy differentiation refers to the process of distinguishing and categorizing policies based on their characteristics, attributes, or purposes. It involves identifying and defining unique aspects of policies to classify and manage them effectively within the system. +Global Policy Search & Compare feature allows users to efficiently manage and analyze policies across different Guardian instances. Here are the main aspects of this feature: + +1. **Global Search**: Users can perform comprehensive searches across all policies within the system using the UI. This functionality includes searching for specific policy elements, steps, or documents based on keywords or metadata. +2. **Policy Comparison**: The comparison tool enables users to identify differences between policies. This is particularly useful when updating or migrating policies, as it helps ensure consistency and correctness. Users can see a detailed, side-by-side view of the policies being compared. +3. **API Support**: The system provides APIs for both searching and comparing policies, allowing for integration with other tools and automated workflows. This includes: + * Comparing policies to highlight differences and similarities. + * Searching policies and exporting comparison results. +4. **UI Features**: The user interface supports policy differentiation and comparison through visual aids and interactive elements, making it easier to spot and understand differences between policy versions. +5. **Export Functionality**: Users can export the results of policy comparisons for documentation or further analysis. diff --git a/docs/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui.md b/docs/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui.md index abed509cb1..8108d41dce 100644 --- a/docs/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui.md +++ b/docs/guardian/standard-registry/policies/policy-differentiation/global-search-and-comparison-ui.md @@ -139,4 +139,4 @@ Block comparison displays can be unfolded to display a detailed view of the bloc ## Demo Video -Coming Soon +[Youtube](https://youtu.be/qzUIqAa2m4E?si=ANBfV-vmJoJsMuvq\&t=155) diff --git a/docs/guardian/standard-registry/policies/policy-differentiation/policy-differentiation-apis/page.md b/docs/guardian/standard-registry/policies/policy-differentiation/policy-differentiation-apis/page.md deleted file mode 100644 index 5c4b4d58a6..0000000000 --- a/docs/guardian/standard-registry/policies/policy-differentiation/policy-differentiation-apis/page.md +++ /dev/null @@ -1,2 +0,0 @@ -# Page - diff --git a/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file-asynchronously.md b/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file-asynchronously.md index 62dd2560ca..7fe5cee4f6 100644 --- a/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file-asynchronously.md +++ b/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file-asynchronously.md @@ -1,5 +1,5 @@ # Importing Tool from a Zip file asynchronously -{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/tools/push/import/file-metadata" method="post" %} -[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% swagger src="../../../../../.gitbook/assets/swagger (4).yaml" path="/tools/push/import/file-metadata" method="post" %} +[swagger (4).yaml](<../../../../../.gitbook/assets/swagger (4).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file.md b/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file.md index fa56cddd9f..0b22c0c001 100644 --- a/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file.md +++ b/docs/guardian/standard-registry/policies/tools/tools-apis/importing-tool-from-a-zip-file.md @@ -1,5 +1,5 @@ # Importing Tool from a Zip file -{% swagger src="../../../../../.gitbook/assets/swagger.yaml" path="/tools/import/file-metadata" method="post" %} -[swagger.yaml](../../../../../.gitbook/assets/swagger.yaml) +{% swagger src="../../../../../.gitbook/assets/swagger (4).yaml" path="/tools/import/file-metadata" method="post" %} +[swagger (4).yaml](<../../../../../.gitbook/assets/swagger (4).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md b/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md index f98fa7f7fe..c34b7d673e 100644 --- a/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md +++ b/docs/guardian/standard-registry/project-comparison/project-comparison-using-ui.md @@ -9,7 +9,7 @@ Project Schemas are predefined templates used to create VC documents. These schemas are selected for a specific policy and serve as the structural basis for generating project data. -
+
In the current schema setup, specific ‘property fields’ are explicitly designated for the comparison process. These fields play a crucial role in evaluating and contrasting different projects. @@ -31,7 +31,7 @@ Within a single group, filters apply a logical 'OR' to search for relevant proje The functionality is further expanded by enabling searches based on project titles. -
+
### Result Dashboard @@ -45,7 +45,7 @@ Users can select multiple projects for a side-by-side comparison by clicking the On this page, users will find a comparative table displaying selected project fields. This visual representation allows for an easy and intuitive comparison of different projects, highlighting similarities and differences. -
+
### VP Document Comparison diff --git a/docs/guardian/standard-registry/roles-and-permissions/README.md b/docs/guardian/standard-registry/roles-and-permissions/README.md index e44942ced4..bf684a4367 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/README.md +++ b/docs/guardian/standard-registry/roles-and-permissions/README.md @@ -1,2 +1,9 @@ # 🙍 Roles & Permissions +The Guardian Project's roles and permissions system provides a structured way to manage user access and actions within the platform. Here's an overview of the key components: + +1. **Roles and Groups**: Roles define a set of permissions, and groups can be created to aggregate these roles. This allows for efficient management of permissions across different users by assigning them to specific roles or groups. +2. **Role Management**: Users with the appropriate permissions can create, update, and delete roles using the Policy Configurator UI. This includes setting specific permissions for each role. +3. **Delegation and Transfer**: Users can delegate their roles to others while retaining their own permissions. This feature is particularly useful in collaborative environments where responsibilities may shift temporarily. +4. **Policy-Based Permissions**: Permissions are often tied to specific policies within the Guardian ecosystem. This includes importing/exporting policies, executing dry runs, and managing policy steps and documents. +5. **Advanced Operations**: For users with higher-level permissions, there are capabilities to manage tokens, perform automation testing, and handle policy execution record/replay functionalities. diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-for-ordinary-users.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-for-ordinary-users.md index 303bdcc836..c6e0e7e977 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-for-ordinary-users.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-for-ordinary-users.md @@ -1,5 +1,5 @@ # Assigns policies to a user (for ordinary users) -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/users/{username}/policies/delegate" method="post" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/users/{username}/policies/delegate" method="post" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-only-sr.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-only-sr.md index 3d1c400eaf..032ce4ca6c 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-only-sr.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/assigns-policies-to-a-user-only-sr.md @@ -1,5 +1,5 @@ # Assigns Policies to a User - Only SR -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/users/{username}/policies/assign" method="post" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/users/{username}/policies/assign" method="post" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/creates-a-new-role.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/creates-a-new-role.md index 6f9c9e8dcc..f4feabe247 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/creates-a-new-role.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/creates-a-new-role.md @@ -1,5 +1,5 @@ # Creates a New Role -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/roles" method="post" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/roles" method="post" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/deletes-role.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/deletes-role.md index f47684bc26..e56d79e269 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/deletes-role.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/deletes-role.md @@ -1,5 +1,5 @@ # Deletes Role -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/roles/{id}" method="delete" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/roles/{id}" method="delete" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/retrieves-information-about-the-user-roles-permissions-assigned-policies.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/retrieves-information-about-the-user-roles-permissions-assigned-policies.md index ec85998aa6..e43fa18b26 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/retrieves-information-about-the-user-roles-permissions-assigned-policies.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/retrieves-information-about-the-user-roles-permissions-assigned-policies.md @@ -1,5 +1,5 @@ # Retrieves information about the user (roles, permissions assigned policies) -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/users/{username}" method="get" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/users/{username}" method="get" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-permissions.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-permissions.md index 636bcd2576..09c64d8af1 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-permissions.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-permissions.md @@ -1,5 +1,5 @@ # Returns list of all permissions -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions" method="get" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions" method="get" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-policies.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-policies.md index 90d2d31d42..da51f245a7 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-policies.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-policies.md @@ -1,5 +1,5 @@ # Returns list of all Policies -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/users/{username}/policies" method="get" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/users/{username}/policies" method="get" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-roles.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-roles.md index 3ecf03f48f..35cffecc3c 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-roles.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-roles.md @@ -1,5 +1,5 @@ # Returns list of all roles -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/roles" method="get" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/roles" method="get" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-users-for-whom-the-current-user-can-change-the-role.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-users-for-whom-the-current-user-can-change-the-role.md index fcbde20fc2..635c3330b2 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-users-for-whom-the-current-user-can-change-the-role.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/returns-list-of-all-users-for-whom-the-current-user-can-change-the-role.md @@ -1,5 +1,5 @@ # Returns list of all users for whom the current user can change the role -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/users" method="get" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/users" method="get" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/setting-default-role.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/setting-default-role.md index 511bd002cc..9c2fb5bbe7 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/setting-default-role.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/setting-default-role.md @@ -1,5 +1,5 @@ # Setting Default Role -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/roles/default" method="post" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/roles/default" method="post" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-role-configuration.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-role-configuration.md index 52a04f9070..3625bfe08f 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-role-configuration.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-role-configuration.md @@ -1,5 +1,5 @@ # Updates Role Configuration -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/roles/{id}" method="put" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/roles/{id}" method="put" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-for-ordinary-uses.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-for-ordinary-uses.md index 4835b842d9..496ee16639 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-for-ordinary-uses.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-for-ordinary-uses.md @@ -1,5 +1,5 @@ # Updates user roles (for ordinary uses) -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/users/{username}/delegate" method="put" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/users/{username}/delegate" method="put" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-only-sr.md b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-only-sr.md index fd0f1c08cd..037e1b755b 100644 --- a/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-only-sr.md +++ b/docs/guardian/standard-registry/roles-and-permissions/apis-related-to-roles-and-permissions/updates-user-roles-only-sr.md @@ -1,5 +1,5 @@ # Updates User Roles (only SR) -{% swagger src="../../../../.gitbook/assets/swagger (4).yaml" path="/permissions/users/{username}" method="put" %} -[swagger (4).yaml](<../../../../.gitbook/assets/swagger (4).yaml>) +{% swagger src="../../../../.gitbook/assets/swagger (4) (1).yaml" path="/permissions/users/{username}" method="put" %} +[swagger (4) (1).yaml](<../../../../.gitbook/assets/swagger (4) (1).yaml>) {% endswagger %} diff --git a/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md b/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md index 3848d28caa..d296d16e3d 100644 --- a/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md +++ b/docs/guardian/standard-registry/schemas/creating-system-schema-using-ui.md @@ -6,7 +6,7 @@ To create a new Schemas, click on the **New** button at the top right corner. After clicking on the New button, you will be asked to enter Schema details such as Schema Name, Policy Dropdown, Entity : VC/MRV/NONE, Schema Description and any other required fields. -![](<../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) +![](<../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) In addition to the basic Schema details we also have an option to add Field and Condition to each field. @@ -22,7 +22,7 @@ We can select respective property for that specific field by searching by enteri We can also customize the Field keys and Field Title by clicking on Advanced Tab. -![](<../../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) +![](<../../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>) Instead of creating a new Schema from scratch, there is also an option to import it via File or via IPFS. @@ -48,7 +48,7 @@ Sample iREC Schema timestamp is below: Once the Schema is imported, we need to select the Policy from the Policy dropdown to connect the Schema and the Policy. -
+
diff --git a/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md b/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md index 96f701240a..6bc524848e 100644 --- a/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md +++ b/docs/guardian/standard-registry/schemas/example-data/adding-example-data-using-ui.md @@ -12,8 +12,8 @@ Once you click on the above button, you will be able to fill all schema fields w
-
+
In Dry Run mode it is possible to quickly fill in the fields using the provided example values from the schema. This feature is most useful for testing/demonstrations or for experimenting and learning Guardian capabilities. -
+
diff --git a/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md b/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md index abfc8593f3..aa14c776a6 100644 --- a/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md +++ b/docs/guardian/standard-registry/schemas/schema-tree/schema-tree-ui.md @@ -12,7 +12,7 @@ We can move the image by holding and moving the mouse. Each schema and its child schemas are represented by same color in parent to child fashion. -
+
## 2. Downloading Tree diff --git a/docs/guardian/standard-registry/schemas/system-policy-schemas.md b/docs/guardian/standard-registry/schemas/system-policy-schemas.md index 403b9bfd76..65a07be247 100644 --- a/docs/guardian/standard-registry/schemas/system-policy-schemas.md +++ b/docs/guardian/standard-registry/schemas/system-policy-schemas.md @@ -17,7 +17,7 @@ To display System / Policy Schemas in the GUI, we have added a toggle in the Sch Whenever an account is created, System Schemas are generated automatically. -
+
{% hint style="info" %} Note: By default System Schemas cannot be edited/deleted. diff --git a/docs/guardian/tokens/retirement-contract/README.md b/docs/guardian/tokens/retirement-contract/README.md index 1205c15c24..4f11ccd7b6 100644 --- a/docs/guardian/tokens/retirement-contract/README.md +++ b/docs/guardian/tokens/retirement-contract/README.md @@ -6,10 +6,10 @@ The ‘retirement contracts’ are responsible for the mechanics of matching ‘ The high-level flow of the actions which configure token retirement is illustrated on the sequence diagram below: -
+
Guardian contains a full production retirement system implementation which allows the configuration of arbitrary pools of tokens (two-sided, one-sides, with arbitrary ‘exchange rates’ etc), issued by different SRs, operating on different Guardian instances, to be configured for retirement with arbitrary additional rules further controlling their lifecycle. A simplified architecture diagram of the retirement contracts implementation is shown on the diagram below. -
+
diff --git a/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md b/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md index df28bae7db..bc84509a56 100644 --- a/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md +++ b/docs/guardian/tokens/retirement-contract/creating-contract-using-ui.md @@ -2,11 +2,11 @@ 1. Guardian instance out of the box contains implementations for ‘Wiping’ and ‘Retirement’ contracts which can be deployed/enabled from the UI. -
+
2. Each SR has its own contract permissions. Since contracts are deployed on Hedera and their methods can be called independently via 3rd party systems but the status of these contracts can change without Guardian’s knowledge. SRs can action a ‘refresh’ of their permissions by clicking on the refresh sign (chargeable Hedera operation, costs < 1 hbar) -
+
### **Contract Roles:** @@ -35,25 +35,25 @@ Also you can check “without approval” to set retirement tokens as immediate operation (without approval).\ -
+
6\) _SRs_ can check/delete/refresh pools (Pools operation in retirement contract). Not enabled means that the retirement contract has no wiper permissions in the appropriate wipe contract. It will be changed to enabled automatically when _the SR_ approves a request for a wiper role from this retirement contract. If the wipe contract is not in Guardian a manual refresh is required to update the instance permissions status. -
+
7\) _SRs_ can check/approve/reject/ban requests for the wiper role in the wipe contract (Requests operation in wipe contract). -
+
8\) To execute the retirement Guardian users which hold USER role navigate to the ‘Retire’ tab and click on ‘Retire’ button, choose appropriate pool and set token count/serials -
+
-
+
9\) If a token retirement requires approval, _users_ which hold USER role can see their requests by clicking on the ‘Requests’ button. -
+
10\) Contract owners can also see these requests and approve or reject (Requests operation on retirement contract). diff --git a/docs/guardian/tokens/token-template/how-to-create-token-template.md b/docs/guardian/tokens/token-template/how-to-create-token-template.md index 619942d719..7a7837dac6 100644 --- a/docs/guardian/tokens/token-template/how-to-create-token-template.md +++ b/docs/guardian/tokens/token-template/how-to-create-token-template.md @@ -2,4 +2,4 @@ We have a new tab as Token for all Blocks. This tab is used to add token template and set value for each token option. These values will be filled by User if it is null. -
+
diff --git a/e2e-tests/cypress.config.js b/e2e-tests/cypress.config.js index 1997892c4f..c1549740de 100644 --- a/e2e-tests/cypress.config.js +++ b/e2e-tests/cypress.config.js @@ -12,7 +12,7 @@ module.exports = defineConfig({ configFile: 'reporter-config.js', }, setupNodeEvents(on, config) { - require('cypress-grep/src/plugin')(config); + require('@cypress/grep/src/plugin')(config); require('cypress-mochawesome-reporter/plugin')(on); on('task', verifyDownloadTasks); on('task', { diff --git a/e2e-tests/cypress.env.json b/e2e-tests/cypress.env.json index bdf7f28f0a..5222637640 100644 --- a/e2e-tests/cypress.env.json +++ b/e2e-tests/cypress.env.json @@ -11,5 +11,6 @@ "tool_for_compare2": "1706866036.377014003", "portApi": "4200/api/v1", "operatorId": "0.0.3567105", - "operatorKey": "3030020100300706052b8104000a04220420075cb7e3ec00a9429d4a1a17eb87814fac4cf0a073e374c770aa0df6c4e3e6e4" + "operatorKey": "3030020100300706052b8104000a04220420075cb7e3ec00a9429d4a1a17eb87814fac4cf0a073e374c770aa0df6c4e3e6e4", + "contract_for_import": "0.0.3984285" } diff --git a/e2e-tests/cypress/e2e/api-tests/accounts/getAccounts.cy.js b/e2e-tests/cypress/e2e/api-tests/accounts/getAccounts.cy.js index 9d6c871b1c..caa5b365ac 100644 --- a/e2e-tests/cypress/e2e/api-tests/accounts/getAccounts.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/accounts/getAccounts.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Accounts", { tags: '@accounts' },() => { +context("Accounts", { tags: ['accounts', 'firstPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get list of users", () => { @@ -29,7 +29,6 @@ context("Accounts", { tags: '@accounts' },() => { }); }); - it("Get list of users with incorrect auth - Negative", () => { cy.request({ method: METHOD.GET, @@ -43,7 +42,6 @@ context("Accounts", { tags: '@accounts' },() => { }); }); - it("Get list of users with empty auth - Negative", () => { cy.request({ method: METHOD.GET, @@ -57,10 +55,9 @@ context("Accounts", { tags: '@accounts' },() => { }); }); - it("Get list of users as User - Negative", () => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.AccountsLogin, body: { username: "Registrant", @@ -68,7 +65,7 @@ context("Accounts", { tags: '@accounts' },() => { } }).then((response) => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.AccessToken, body: { refreshToken: response.body.refreshToken diff --git a/e2e-tests/cypress/e2e/api-tests/accounts/getBalance.cy.js b/e2e-tests/cypress/e2e/api-tests/accounts/getBalance.cy.js index a4c6f9eb83..e7885c5b99 100644 --- a/e2e-tests/cypress/e2e/api-tests/accounts/getBalance.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/accounts/getBalance.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Accounts", { tags: '@accounts' }, () => { +context("Accounts", { tags: ['accounts', 'firstPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get Standard Registry balance", () => { cy.request({ @@ -20,7 +20,7 @@ context("Accounts", { tags: '@accounts' }, () => { it('Get User balance', () => { let username = "UserTest"; cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.AccountRegister, body: { username: username, @@ -30,7 +30,7 @@ context("Accounts", { tags: '@accounts' }, () => { } }).then(() => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.AccountsLogin, body: { username: username, @@ -38,7 +38,7 @@ context("Accounts", { tags: '@accounts' }, () => { } }).then((response) => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.AccessToken, body: { refreshToken: response.body.refreshToken @@ -46,7 +46,7 @@ context("Accounts", { tags: '@accounts' }, () => { }).then((response) => { let accessToken = "Bearer " + response.body.accessToken cy.request({ - method: 'GET', + method: METHOD.GET, url: API.ApiServer + API.StandardRegistriesAggregated, headers: { authorization: accessToken @@ -59,7 +59,7 @@ context("Accounts", { tags: '@accounts' }, () => { headers: {authorization}, }).then((response) => { cy.request({ - method: 'PUT', + method: METHOD.PUT, url: API.ApiServer + API.Profiles + username, body: { hederaAccountId: response.body.id, diff --git a/e2e-tests/cypress/e2e/api-tests/accounts/getSession.cy.js b/e2e-tests/cypress/e2e/api-tests/accounts/getSession.cy.js index 036941b1a9..761a5a3ca2 100644 --- a/e2e-tests/cypress/e2e/api-tests/accounts/getSession.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/accounts/getSession.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Accounts', { tags: '@accounts' }, () => { +context('Accounts', { tags: ['accounts', 'firstPool'] }, () => { const authorization = Cypress.env('authorization'); @@ -46,7 +46,7 @@ context('Accounts', { tags: '@accounts' }, () => { authorization: "Bearer " + response.body.accessToken } }).then((response) => { - expect(response.status).to.eq(200) + expect(response.status).to.eq(STATUS_CODE.OK) expect(response.body).to.have.property('id') expect(response.body.role).eq('USER') }) @@ -64,7 +64,7 @@ context('Accounts', { tags: '@accounts' }, () => { // }, // failOnStatusCode: false // }).then((response) => { - // expect(response.status).to.eq(401) + // expect(response.status).to.eq(STATUS_CODE.UNAUTHORIZED) // }) // }) // @@ -78,7 +78,7 @@ context('Accounts', { tags: '@accounts' }, () => { // }, // failOnStatusCode: false // }).then((response) => { - // expect(response.status).to.eq(401) + // expect(response.status).to.eq(STATUS_CODE.UNAUTHORIZED) // }) // }) // @@ -90,7 +90,7 @@ context('Accounts', { tags: '@accounts' }, () => { // }, // failOnStatusCode: false // }).then((response) => { - // expect(response.status).to.eq(401) + // expect(response.status).to.eq(STATUS_CODE.UNAUTHORIZED) // }) // }) }) diff --git a/e2e-tests/cypress/e2e/api-tests/accounts/getStandartReg.cy.js b/e2e-tests/cypress/e2e/api-tests/accounts/getStandartReg.cy.js index a3189128d7..27c4c7e27f 100644 --- a/e2e-tests/cypress/e2e/api-tests/accounts/getStandartReg.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/accounts/getStandartReg.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Accounts", { tags: '@accounts' }, () => { +context("Accounts", { tags: ['accounts', 'firstPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get list of Standard Registries", () => { @@ -11,9 +11,9 @@ context("Accounts", { tags: '@accounts' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body.at(0)).to.have.property("username"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0)).to.have.property("username"); }); }); @@ -40,9 +40,9 @@ context("Accounts", { tags: '@accounts' }, () => { authorization: "Bearer " + response.body.accessToken }, failOnStatusCode: false, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body.at(0).username).eq("StandardRegistry"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).username).eq("StandardRegistry"); }); }); }); @@ -53,8 +53,8 @@ context("Accounts", { tags: '@accounts' }, () => { method: METHOD.GET, url: API.ApiServer + API.StandartRegistries, failOnStatusCode:false, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.UNAUTHORIZED); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); }); it("Get list of Standard Registries with invalid auth token - Negative", () => { @@ -65,8 +65,8 @@ context("Accounts", { tags: '@accounts' }, () => { authorization: "Bearer wqe", }, failOnStatusCode:false, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.UNAUTHORIZED); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); }); it("Get list of Standard Registries with empty auth token - Negative", () => { @@ -77,8 +77,8 @@ context("Accounts", { tags: '@accounts' }, () => { authorization: "", }, failOnStatusCode:false, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.UNAUTHORIZED); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/accounts/postLogin.cy.js b/e2e-tests/cypress/e2e/api-tests/accounts/postLogin.cy.js index cb58966f4a..763d1fbee8 100644 --- a/e2e-tests/cypress/e2e/api-tests/accounts/postLogin.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/accounts/postLogin.cy.js @@ -2,8 +2,8 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Accounts', { tags: '@accounts' }, () => { - it('Login as Standard Registry', () => { +context('Accounts', { tags: ['accounts', 'firstPool'] }, () => { + it('Login as Standard Registry', { tags: ['smoke'] }, () => { const username = "StandardRegistry"; cy.request({ method: METHOD.POST, diff --git a/e2e-tests/cypress/e2e/api-tests/accounts/postRegister.cy.js b/e2e-tests/cypress/e2e/api-tests/accounts/postRegister.cy.js index 238e4fecfd..ff855bd24c 100644 --- a/e2e-tests/cypress/e2e/api-tests/accounts/postRegister.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/accounts/postRegister.cy.js @@ -1,10 +1,9 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; - -context("Accounts", { tags: "@accounts" }, () => { - it("Register and login as new user", () => { - const name = Math.floor(Math.random() * 999) + "test001"; +context("Accounts", { tags: ['accounts', 'firstPool'] }, () => { + it("Register and login as new user", { tags: ['smoke', 'firstPool'] }, () => { + const name = Math.floor(Math.random() * 999) + "PostRegTest"; cy.request({ method: METHOD.POST, url: API.ApiServer + API.AccountRegister, @@ -77,7 +76,6 @@ context("Accounts", { tags: "@accounts" }, () => { }); }); - it('Register with invalid type of username - Negative', () => { cy.request({ method: METHOD.POST, @@ -137,7 +135,6 @@ context("Accounts", { tags: "@accounts" }, () => { }); }); - it('Register with extra data - Negative', () => { const name = Math.floor(Math.random() * 999) + "test001"; cy.request({ diff --git a/e2e-tests/cypress/e2e/api-tests/analytics/compareModules.cy.js b/e2e-tests/cypress/e2e/api-tests/analytics/compareModules.cy.js index ecdd97dbc5..228d950c99 100644 --- a/e2e-tests/cypress/e2e/api-tests/analytics/compareModules.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/analytics/compareModules.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Analytics", { tags: '@analytics' }, () => { +context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); let moduleId1, moduleId2 before(() => { @@ -38,7 +38,7 @@ context("Analytics", { tags: '@analytics' }, () => { }); }) - it("Compare modules", () => { + it("Compare modules", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.POST, url: API.ApiServer + API.ModuleCompare, diff --git a/e2e-tests/cypress/e2e/api-tests/analytics/comparePolicies.cy.js b/e2e-tests/cypress/e2e/api-tests/analytics/comparePolicies.cy.js index a69f8580e4..cf0a697891 100644 --- a/e2e-tests/cypress/e2e/api-tests/analytics/comparePolicies.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/analytics/comparePolicies.cy.js @@ -1,8 +1,9 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Analytics", { tags: '@analytics' },() => { +context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); + let policyId1, policyId2 before(() => { cy.request({ method: METHOD.POST, @@ -16,9 +17,10 @@ context("Analytics", { tags: '@analytics' },() => { headers: { authorization, }, - timeout: 180000 + timeout: 360000 }) .then((response) => { + policyId1 = response.body.at(-1).id; expect(response.status).to.eq(STATUS_CODE.SUCCESS); cy.request({ method: METHOD.POST, @@ -32,44 +34,34 @@ context("Analytics", { tags: '@analytics' },() => { headers: { authorization, }, - timeout: 180000 + timeout: 360000 }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.SUCCESS); - }) + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId2 = response.body.at(-1).id; + }) }) }) - it("Compare policies", () => { - let policyId1, policyId2 + it("Compare policies", { tags: ['smoke'] }, () => { cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Policies, + method: METHOD.POST, + url: API.ApiServer + API.PolicyCompare, + body: { + policyId1: policyId1, + policyId2: policyId2, + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 + }, headers: { authorization, } }).then((response) => { - policyId1 = response.body.at(1)._id - policyId2 = response.body.at(0)._id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.PolicyCompare, - body: { - policyId1: policyId1, - policyId2: policyId2, - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" - }, - headers: { - authorization, - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - expect(response.body.left.id).to.eq(policyId1); - expect(response.body.right.id).to.eq(policyId2); - expect(response.body.total).not.null; - }) + expect(response.status).to.eq(STATUS_CODE.OK); + expect(response.body.left.id).to.eq(policyId1); + expect(response.body.right.id).to.eq(policyId2); + expect(response.body.total).not.null; }) }); @@ -80,10 +72,10 @@ context("Analytics", { tags: '@analytics' },() => { body: { policyId1: "6419853a31fe4fd0e741b3a9", policyId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { }, @@ -94,20 +86,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare policies with empty auth - Negative", () => { - const auth = "" cy.request({ method: METHOD.POST, url: API.ApiServer + API.PolicyCompare, body: { policyId1: "6419853a31fe4fd0e741b3a9", policyId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "", }, failOnStatusCode: false }).then((response) => { @@ -116,20 +107,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare policies with invalid auth - Negative", () => { - const auth = "Bearer wqe" cy.request({ method: METHOD.POST, url: API.ApiServer + API.PolicyCompare, body: { policyId1: "6419853a31fe4fd0e741b3a9", policyId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "Bearer wqe", }, failOnStatusCode: false }).then((response) => { @@ -138,34 +128,23 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare policies(Export)", () => { - let policyId1, policyId2 cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Policies, + method: METHOD.POST, + url: API.ApiServer + API.PolicyCompare + API.ExportCSV, + body: { + policyId1: policyId1, + policyId2: policyId2, + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 + }, headers: { authorization, } }).then((response) => { - policyId1 = response.body.at(1)._id - policyId2 = response.body.at(0)._id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.PolicyCompare + API.ExportCSV, - body: { - policyId1: policyId1, - policyId2: policyId2, - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" - }, - headers: { - authorization, - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - expect(response.body).to.include("data:text/csv"); - }) + expect(response.status).to.eq(STATUS_CODE.OK); + expect(response.body).to.include("data:text/csv"); }) }); @@ -176,10 +155,10 @@ context("Analytics", { tags: '@analytics' },() => { body: { policyId1: "6419853a31fe4fd0e741b3a9", policyId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { }, @@ -190,20 +169,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare policies(Export) with empty auth - Negative", () => { - const auth = "" cy.request({ method: METHOD.POST, url: API.ApiServer + API.PolicyCompare + API.ExportCSV, body: { policyId1: "6419853a31fe4fd0e741b3a9", policyId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "", }, failOnStatusCode: false }).then((response) => { @@ -212,20 +190,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare policies(Export) with invalid auth - Negative", () => { - const auth = "Bearer wqe" cy.request({ method: METHOD.POST, url: API.ApiServer + API.PolicyCompare + API.ExportCSV, body: { policyId1: "6419853a31fe4fd0e741b3a9", policyId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "Bearer wqe", }, failOnStatusCode: false }).then((response) => { diff --git a/e2e-tests/cypress/e2e/api-tests/analytics/compareSchemas.cy.js b/e2e-tests/cypress/e2e/api-tests/analytics/compareSchemas.cy.js index d284bef148..284506b55a 100644 --- a/e2e-tests/cypress/e2e/api-tests/analytics/compareSchemas.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/analytics/compareSchemas.cy.js @@ -1,8 +1,9 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Analytics", { tags: '@analytics' },() => { +context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); + let schemaId1, schemaId2 before(() => { cy.request({ method: METHOD.POST, @@ -13,12 +14,8 @@ context("Analytics", { tags: '@analytics' },() => { headers: { authorization, }, - timeout: 180000 + timeout: 360000 }) - }) - - it("Compare schemas", () => { - let schemaId1, schemaId2 cy.request({ method: METHOD.GET, url: API.ApiServer + API.PolicySchemas, @@ -28,28 +25,31 @@ context("Analytics", { tags: '@analytics' },() => { }).then((response) => { schemaId1 = response.body.at(1)._id schemaId2 = response.body.at(0)._id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.SchemaCompare, - body: { - schemaId1: schemaId1, - schemaId2: schemaId2, - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" - }, - headers: { - authorization, - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - expect(response.body.left.id).to.eq(schemaId1); - expect(response.body.right.id).to.eq(schemaId2); - expect(response.body.total).not.null; - }) }) - }); + }) + + it("Compare schemas", { tags: ['smoke'] }, () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.SchemaCompare, + body: { + schemaId1: schemaId1, + schemaId2: schemaId2, + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 + }, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + expect(response.body.left.id).to.eq(schemaId1); + expect(response.body.right.id).to.eq(schemaId2); + expect(response.body.total).not.null; + }) + }) it("Compare schemas without auth - Negative", () => { @@ -59,10 +59,10 @@ context("Analytics", { tags: '@analytics' },() => { body: { schemaId1: "6419853a31fe4fd0e741b3a9", schemaId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { }, @@ -73,20 +73,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare schemas with empty auth - Negative", () => { - const auth = "" cy.request({ method: METHOD.POST, url: API.ApiServer + API.SchemaCompare, body: { schemaId1: "6419853a31fe4fd0e741b3a9", schemaId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "", }, failOnStatusCode: false }).then((response) => { @@ -95,20 +94,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare schemas with invalid auth - Negative", () => { - const auth = "Bearer wqe" cy.request({ method: METHOD.POST, url: API.ApiServer + API.SchemaCompare, body: { schemaId1: "6419853a31fe4fd0e741b3a9", schemaId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "Bearer wqe", }, failOnStatusCode: false }).then((response) => { @@ -117,34 +115,23 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare schemas(Export)", () => { - let schemaId1, schemaId2 cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.PolicySchemas, + method: METHOD.POST, + url: API.ApiServer + API.SchemaCompare + API.ExportCSV, + body: { + schemaId1: schemaId1, + schemaId2: schemaId2, + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 + }, headers: { authorization, } }).then((response) => { - schemaId1 = response.body.at(1)._id - schemaId2 = response.body.at(0)._id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.SchemaCompare + API.ExportCSV, - body: { - schemaId1: schemaId1, - schemaId2: schemaId2, - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" - }, - headers: { - authorization, - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - expect(response.body).to.include("data:text/csv"); - }) + expect(response.status).to.eq(STATUS_CODE.OK); + expect(response.body).to.include("data:text/csv"); }) }); @@ -156,10 +143,10 @@ context("Analytics", { tags: '@analytics' },() => { body: { schemaId1: "6419853a31fe4fd0e741b3a9", schemaId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { }, @@ -170,20 +157,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare schemas(Export) with empty auth - Negative", () => { - const auth = "" cy.request({ method: METHOD.POST, url: API.ApiServer + API.SchemaCompare + API.ExportCSV, body: { schemaId1: "6419853a31fe4fd0e741b3a9", schemaId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "", }, failOnStatusCode: false }).then((response) => { @@ -192,24 +178,23 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare schemas(Export) with invalid auth - Negative", () => { - const auth = "Bearer wqe" cy.request({ method: METHOD.POST, url: API.ApiServer + API.SchemaCompare + API.ExportCSV, body: { schemaId1: "6419853a31fe4fd0e741b3a9", schemaId2: "641983a931fe4fd0e741b399", - eventsLvl: "1", - propLvl: "2", - childrenLvl: "2", - idLvl: "0" + eventsLvl: 1, + propLvl: 2, + childrenLvl: 2, + idLvl: 0 }, headers: { - authorization: auth, + authorization: "Bearer wqe", }, failOnStatusCode: false }).then((response) => { expect(response.status).to.eq(STATUS_CODE.UNAUTHORIZED); }) }); -}); +}) \ No newline at end of file diff --git a/e2e-tests/cypress/e2e/api-tests/analytics/compareTools.cy.js b/e2e-tests/cypress/e2e/api-tests/analytics/compareTools.cy.js index 4f0083bd31..49bf2b91d3 100644 --- a/e2e-tests/cypress/e2e/api-tests/analytics/compareTools.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/analytics/compareTools.cy.js @@ -1,8 +1,9 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Analytics", { tags: '@analytics' },() => { +context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); + let toolId1, toolId2 before(() => { cy.request({ method: METHOD.POST, @@ -17,6 +18,7 @@ context("Analytics", { tags: '@analytics' },() => { }) .then((response) => { expect(response.status).to.eq(STATUS_CODE.SUCCESS); + toolId1 = response.body.id; cy.request({ method: METHOD.POST, url: API.ApiServer + API.ToolsImportMsg, @@ -29,37 +31,27 @@ context("Analytics", { tags: '@analytics' },() => { timeout: 180000 }).then((response) => { expect(response.status).to.eq(STATUS_CODE.SUCCESS); + toolId2 = response.body.id; }) }) }) - it("Compare tools", () => { - let toolId1, toolId2 + it("Compare tools", { tags: ['smoke'] }, () => { cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Tools, + method: METHOD.POST, + url: API.ApiServer + API.ToolCompare, + body: { + toolId1: toolId1, + toolId2: toolId2 + }, headers: { authorization, } }).then((response) => { - toolId1 = response.body.at(1)._id - toolId2 = response.body.at(0)._id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.ToolCompare, - body: { - toolId1: toolId1, - toolId2: toolId2 - }, - headers: { - authorization, - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - expect(response.body.left.id).to.eq(toolId1); - expect(response.body.right.id).to.eq(toolId2); - expect(response.body.total).not.null; - }) + expect(response.status).to.eq(STATUS_CODE.OK); + expect(response.body.left.id).to.eq(toolId1); + expect(response.body.right.id).to.eq(toolId2); + expect(response.body.total).not.null; }) }); @@ -80,7 +72,6 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare tools with empty auth - Negative", () => { - const auth = "" cy.request({ method: METHOD.POST, url: API.ApiServer + API.ToolCompare, @@ -89,7 +80,7 @@ context("Analytics", { tags: '@analytics' },() => { toolId2: "641983a931fe4fd0e741b399" }, headers: { - authorization: auth, + authorization: "", }, failOnStatusCode: false }).then((response) => { @@ -98,7 +89,6 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare tools with invalid auth - Negative", () => { - const auth = "Bearer wqe" cy.request({ method: METHOD.POST, url: API.ApiServer + API.ToolCompare, @@ -107,7 +97,7 @@ context("Analytics", { tags: '@analytics' },() => { toolId2: "641983a931fe4fd0e741b399" }, headers: { - authorization: auth, + authorization: "Bearer wqe", }, failOnStatusCode: false }).then((response) => { @@ -116,30 +106,19 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare tools(Export)", () => { - let toolId1, toolId2 cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Tools, + method: METHOD.POST, + url: API.ApiServer + API.ToolCompare + API.ExportCSV, + body: { + toolId1: toolId1, + toolId2: toolId2 + }, headers: { authorization, } }).then((response) => { - toolId1 = response.body.at(1)._id - toolId2 = response.body.at(0)._id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.ToolCompare + API.ExportCSV, - body: { - toolId1: toolId1, - toolId2: toolId2 - }, - headers: { - authorization, - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - expect(response.body).to.include("data:text/csv"); - }) + expect(response.status).to.eq(STATUS_CODE.OK); + expect(response.body).to.include("data:text/csv"); }) }); @@ -160,7 +139,6 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare tools(Export) with empty auth - Negative", () => { - const auth = "" cy.request({ method: METHOD.POST, url: API.ApiServer + API.ToolCompare + API.ExportCSV, @@ -169,7 +147,7 @@ context("Analytics", { tags: '@analytics' },() => { toolId2: "641983a931fe4fd0e741b399" }, headers: { - authorization: auth, + authorization: "", }, failOnStatusCode: false }).then((response) => { @@ -178,7 +156,6 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Compare tools(Export) with invalid auth - Negative", () => { - const auth = "Bearer wqe" cy.request({ method: METHOD.POST, url: API.ApiServer + API.ToolCompare + API.ExportCSV, @@ -187,7 +164,7 @@ context("Analytics", { tags: '@analytics' },() => { toolId2: "641983a931fe4fd0e741b399" }, headers: { - authorization: auth, + authorization: "Bearer wqe", }, failOnStatusCode: false }).then((response) => { diff --git a/e2e-tests/cypress/e2e/api-tests/analytics/search.cy.js b/e2e-tests/cypress/e2e/api-tests/analytics/search.cy.js index 3b1b98977f..41ce57d625 100644 --- a/e2e-tests/cypress/e2e/api-tests/analytics/search.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/analytics/search.cy.js @@ -1,11 +1,11 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Analytics", { tags: '@analytics' },() => { +context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); + let policyId it("Search policy", () => { - let policyId cy.request({ method: METHOD.GET, url: API.ApiServer + API.Policies, @@ -32,39 +32,30 @@ context("Analytics", { tags: '@analytics' },() => { }); it("Search blocks", () => { - let policyId, config, blockId + let config, blockId cy.request({ method: METHOD.GET, - url: API.ApiServer + API.Policies, + url: API.ApiServer + API.Policies + policyId, headers: { authorization, } }).then((response) => { - policyId = response.body.at(0)._id + config = response.body.config + blockId = response.body.config.children.at(0).id cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Policies + policyId, + method: METHOD.POST, + url: API.ApiServer + API.BlockSearch, + body: { + id: blockId, + config: config, + }, headers: { authorization, } }).then((response) => { - config = response.body.config - blockId = response.body.config.children.at(0).id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.BlockSearch, - body: { - config: config, - id: blockId - }, - headers: { - authorization, - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - cy.log(response) - //expect(response.body.at(0).chains.at(0).target).exist; - }) + expect(response.status).to.eq(STATUS_CODE.OK); + cy.log(response) + //expect(response.body.at(0).chains.at(0).target).exist; }) }) }); diff --git a/e2e-tests/cypress/e2e/api-tests/artifacts/deleteArtifact.cy.js b/e2e-tests/cypress/e2e/api-tests/artifacts/deleteArtifact.cy.js index 40a8ddb411..7a3c4f1579 100644 --- a/e2e-tests/cypress/e2e/api-tests/artifacts/deleteArtifact.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/artifacts/deleteArtifact.cy.js @@ -1,7 +1,8 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Artifacts", { tags: "@artifacts" }, () => { +context("Artifacts", { tags: ['artifacts', 'secondPool'] }, () => { + const authorization = Cypress.env("authorization"); let artifactId; @@ -19,29 +20,29 @@ context("Artifacts", { tags: "@artifacts" }, () => { timeout: 300000, }).then((response) => { expect(response.status).eql(STATUS_CODE.SUCCESS); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Artifacts, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + artifactId = response.body.at(0).id; + }) }); - }) + }) }); - it("Delete artifact", () => { + it("Delete artifact", { tags: ['smoke'] }, () => { cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Artifacts, + url: API.ApiServer + API.Artifacts + artifactId, + method: METHOD.DELETE, headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - artifactId = response.body.at(0).id; - cy.request({ - url: API.ApiServer + API.Artifacts + artifactId, - method: METHOD.DELETE, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.OK); - }); + expect(response.status).eql(STATUS_CODE.OK); }); }); @@ -118,7 +119,7 @@ context("Artifacts", { tags: "@artifacts" }, () => { cy.request({ url: API.ApiServer + API.Artifacts + artifactId, method: METHOD.DELETE, - failOnStatusCode:false, + failOnStatusCode: false, }).then((response) => { expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); @@ -131,7 +132,7 @@ context("Artifacts", { tags: "@artifacts" }, () => { headers: { authorization: "Bearer wqe", }, - failOnStatusCode:false, + failOnStatusCode: false, }).then((response) => { expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); @@ -144,7 +145,7 @@ context("Artifacts", { tags: "@artifacts" }, () => { headers: { authorization: "", }, - failOnStatusCode:false, + failOnStatusCode: false, }).then((response) => { expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); diff --git a/e2e-tests/cypress/e2e/api-tests/artifacts/getArtifacts.cy.js b/e2e-tests/cypress/e2e/api-tests/artifacts/getArtifacts.cy.js index 214cdba5a5..d8f9f146d3 100644 --- a/e2e-tests/cypress/e2e/api-tests/artifacts/getArtifacts.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/artifacts/getArtifacts.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Artifacts", { tags: '@artifacts' },() => { +context("Artifacts", { tags: ['artifacts', 'secondPool'] },() => { const authorization = Cypress.env("authorization"); before(() => { @@ -22,7 +22,7 @@ context("Artifacts", { tags: '@artifacts' },() => { }) }) - it("Get list of artifacts", () => { + it("Get list of artifacts", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.Artifacts, diff --git a/e2e-tests/cypress/e2e/api-tests/artifacts/postArtifact.cy.js b/e2e-tests/cypress/e2e/api-tests/artifacts/postArtifact.cy.js index 2e5f6adee3..c5256d50b9 100644 --- a/e2e-tests/cypress/e2e/api-tests/artifacts/postArtifact.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/artifacts/postArtifact.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Artifacts", { tags: "@artifacts" }, () => { +context("Artifacts", { tags: ['artifacts', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); let policyId @@ -23,7 +23,7 @@ context("Artifacts", { tags: "@artifacts" }, () => { }) }); - it("Upload artifact", () => { + it("Upload artifact", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.Policies, @@ -32,7 +32,7 @@ context("Artifacts", { tags: "@artifacts" }, () => { }, }).then((response) => { expect(response.status).to.eq(STATUS_CODE.OK); - policyId = response.body.at(0).id; + policyId = response.body.at(-1).id; cy.fixture("artifactsImport.policy", 'binary') .then((file) => Cypress.Blob.binaryStringToBlob(file)) .then((blob) => { @@ -53,99 +53,99 @@ context("Artifacts", { tags: "@artifacts" }, () => { }); }); - it("Upload artifact without auth token - Negative", () => { - cy.request({ - url: API.ApiServer + API.Artifacts + policyId, - method: METHOD.POST, - failOnStatusCode:false, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); - }); - }); + // it("Upload artifact without auth token - Negative", () => { + // cy.request({ + // url: API.ApiServer + API.Artifacts + policyId, + // method: METHOD.POST, + // failOnStatusCode:false, + // }).then((response) => { + // expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + // }); + // }); - it("Upload artifact with invalid auth token - Negative", () => { - cy.request({ - url: API.ApiServer + API.Artifacts + policyId, - method: METHOD.POST, - headers: { - authorization: "Bearer wqe", - }, - failOnStatusCode:false, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); - }); - }); + // it("Upload artifact with invalid auth token - Negative", () => { + // cy.request({ + // url: API.ApiServer + API.Artifacts + policyId, + // method: METHOD.POST, + // headers: { + // authorization: "Bearer wqe", + // }, + // failOnStatusCode:false, + // }).then((response) => { + // expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + // }); + // }); - it("Upload artifact with empty auth token - Negative", () => { - cy.request({ - url: API.ApiServer + API.Artifacts + policyId, - method: METHOD.POST, - headers: { - authorization: "", - }, - failOnStatusCode:false, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); - }); - }); + // it("Upload artifact with empty auth token - Negative", () => { + // cy.request({ + // url: API.ApiServer + API.Artifacts + policyId, + // method: METHOD.POST, + // headers: { + // authorization: "", + // }, + // failOnStatusCode:false, + // }).then((response) => { + // expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + // }); + // }); - it("Upload artifact without file - Negative", () => { - cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Policies, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - policyId = response.body.at(-1).id; - cy.request({ - url: API.ApiServer + API.Artifacts + policyId, - method: METHOD.POST, - headers: { - Authorization: authorization, - 'content-type': 'multipart/form-data' - }, - failOnStatusCode:false, - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.BAD_REQUEST); - // expect(response.status).to.eq(STATUS_CODE.UNPROCESSABLE); - // expect(response.body.message).to.eq("There are no files to upload"); - }); - }) - }) + // it("Upload artifact without file - Negative", () => { + // cy.request({ + // method: METHOD.GET, + // url: API.ApiServer + API.Policies, + // headers: { + // authorization, + // }, + // }).then((response) => { + // expect(response.status).to.eq(STATUS_CODE.OK); + // policyId = response.body.at(-1).id; + // cy.request({ + // url: API.ApiServer + API.Artifacts + policyId, + // method: METHOD.POST, + // headers: { + // Authorization: authorization, + // 'content-type': 'multipart/form-data' + // }, + // failOnStatusCode:false, + // }).then((response) => { + // expect(response.status).to.eq(STATUS_CODE.BAD_REQUEST); + // // expect(response.status).to.eq(STATUS_CODE.UNPROCESSABLE); + // // expect(response.body.message).to.eq("There are no files to upload"); + // }); + // }) + // }) - it("Upload artifact with invalid policy id - Negative", () => { - cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Policies, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - policyId = "-----"; - cy.fixture("remoteWorkGHGPolicy.policy", 'binary') - .then((file) => Cypress.Blob.binaryStringToBlob(file)) - .then((blob) => { - var formdata = new FormData(); - formdata.append("artifacts", blob, "remoteWorkGHGPolicy.policy"); - cy.request({ - url: API.ApiServer + API.Artifacts + policyId, - method: METHOD.POST, - headers: { - Authorization: authorization, - 'content-type': 'multipart/form-data' - }, - body: formdata, - failOnStatusCode:false, - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.ERROR); - // expect(response.status).to.eq(STATUS_CODE.UNPROCESSABLE); - // expect(response.body.message).to.eq("There is no appropriate policy or policy is not in DRAFT status"); - }); - }) - }); - }); + // it("Upload artifact with invalid policy id - Negative", () => { + // cy.request({ + // method: METHOD.GET, + // url: API.ApiServer + API.Policies, + // headers: { + // authorization, + // }, + // }).then((response) => { + // expect(response.status).to.eq(STATUS_CODE.OK); + // policyId = "-----"; + // cy.fixture("remoteWorkGHGPolicy.policy", 'binary') + // .then((file) => Cypress.Blob.binaryStringToBlob(file)) + // .then((blob) => { + // var formdata = new FormData(); + // formdata.append("artifacts", blob, "remoteWorkGHGPolicy.policy"); + // cy.request({ + // url: API.ApiServer + API.Artifacts + policyId, + // method: METHOD.POST, + // headers: { + // Authorization: authorization, + // 'content-type': 'multipart/form-data' + // }, + // body: formdata, + // failOnStatusCode:false, + // }).then((response) => { + // expect(response.status).to.eq(STATUS_CODE.ERROR); + // // expect(response.status).to.eq(STATUS_CODE.UNPROCESSABLE); + // // expect(response.body.message).to.eq("There is no appropriate policy or policy is not in DRAFT status"); + // }); + // }) + // }); + // }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/clearAndRejectRequests.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/clearAndRejectRequests.cy.js new file mode 100644 index 0000000000..7f7c61a3ca --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/clearAndRejectRequests.cy.js @@ -0,0 +1,1026 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + + const authorization = Cypress.env("authorization"); + const optionKey = "option"; + let username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + let contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + let contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + let wContractId, rContractId, tokenId, policyId, hederaId, rConractUuid, wConractUuid; + let waitForApproveApplicationBlockId, deviceGridBlockId, issueRequestGridBlockId, approveRegistrantBtnBlockId; + + const whileWipeRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileWipeRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileWipeRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileRetireRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileRetireRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileRetireRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.uiMetaData?.title) + whileApplicationCreating(dataToCompare, request, attempts) + else { + let data = response.body.uiMetaData.title + if (data !== dataToCompare) + whileApplicationCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.fields) + whileApplicationApproving(dataToCompare, request, attempts) + else { + let data = response.body.fields[0]?.title + if (data !== dataToCompare) + whileApplicationApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileBalanceVerifying = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + let balance + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body) + whileBalanceVerifying(dataToCompare, request, attempts) + else { + for (let i = 0; i < response.body.length; i++) { + if (response.body[i].tokenId === tokenId) + balance = response.body[i].balance + } + if (balance !== dataToCompare) + whileBalanceVerifying(dataToCompare, request, attempts) + } + }) + } + } + + describe("Reject", () => { + + before("Create contracts, policy and register new user", () => { + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wConractUuid = response.body.id; + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { authorization }, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint token", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Set pool", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileRetireRequestCreating(wContractId, requestForRetireRequestCreationProgress, 0) + }) + + let wipeRequestId + + it("Reject wipe contract requests without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Reject, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }); + + it("Reject wipe contract requests with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Reject, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Reject wipe contract requests with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Reject, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Reject wipe contract requests", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Reject, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0)).to.not.exist; + }) + }) + + }) + + + describe("Clear", () => { + + before("Set first pool", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 2 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileRetireRequestCreating(wContractId, requestForRetireRequestCreationProgress, 0) + }) + + before("Set second pool", () => { + + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR + "Sec", + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + let rConractUuid2 = response.body.id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid2 + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 3 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + }); + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileRetireRequestCreating(wContractId, requestForRetireRequestCreationProgress, 0) + }) + + it("Clear wipe contract requests without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + wContractId + "/" + API.Requests, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Clear wipe contract requests with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + wContractId + "/" + API.Requests, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Clear wipe contract requests with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + wContractId + "/" + API.Requests, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Clear wipe contract requests", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0)).to.not.exist; + expect(response.body.at(1)).to.not.exist; + }) + }) + }) + +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/clearPools.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/clearPools.cy.js new file mode 100644 index 0000000000..efcbf4e113 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/clearPools.cy.js @@ -0,0 +1,879 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + + const authorization = Cypress.env("authorization"); + const optionKey = "option"; + let username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + let contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + let contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + let wContractId, rContractId, tokenId, policyId, hederaId, rConractUuid, wConractUuid; + let waitForApproveApplicationBlockId, deviceGridBlockId, issueRequestGridBlockId, approveRegistrantBtnBlockId; + + const whileWipeRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileWipeRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileWipeRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileRetireRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileRetireRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileRetireRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.uiMetaData?.title) + whileApplicationCreating(dataToCompare, request, attempts) + else { + let data = response.body.uiMetaData.title + if (data !== dataToCompare) + whileApplicationCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.fields) + whileApplicationApproving(dataToCompare, request, attempts) + else { + let data = response.body.fields[0]?.title + if (data !== dataToCompare) + whileApplicationApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileBalanceVerifying = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + let balance + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body) + whileBalanceVerifying(dataToCompare, request, attempts) + else { + for (let i = 0; i < response.body.length; i++) { + if (response.body[i].tokenId === tokenId) + balance = response.body[i].balance + } + if (balance !== dataToCompare) + whileBalanceVerifying(dataToCompare, request, attempts) + } + }) + } + } + + + before("Create contracts, policy and register new user", () => { + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wConractUuid = response.body.id; + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { authorization }, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint token", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Set pools", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 2 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileRetireRequestCreating(wContractId, requestForRetireRequestCreationProgress, 0) + }) + + it("Clear retire contract pools without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Clear retire contract pools with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Clear retire contract pools with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Clear retire contract pools", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireContract + API.PoolContract, + headers: { + authorization, + }, + qs: { + contractId: rConractUuid + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql([]); + }) + }) + +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/createApproveAndRejectRetireRequests.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/createApproveAndRejectRetireRequests.cy.js new file mode 100644 index 0000000000..95a5eb9b50 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/createApproveAndRejectRetireRequests.cy.js @@ -0,0 +1,1256 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const optionKey = "option"; + let username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + let contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + let contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + let wContractId, rContractId, tokenId, policyId, hederaId, rConractUuid; + let waitForApproveApplicationBlockId, deviceGridBlockId, issueRequestGridBlockId, approveRegistrantBtnBlockId; + let retireRequestId + + const whileWipeRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileWipeRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileWipeRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileRetireRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileRetireRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileRetireRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.uiMetaData?.title) + whileApplicationCreating(dataToCompare, request, attempts) + else { + let data = response.body.uiMetaData.title + if (data !== dataToCompare) + whileApplicationCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.fields) + whileApplicationApproving(dataToCompare, request, attempts) + else { + let data = response.body.fields[0]?.title + if (data !== dataToCompare) + whileApplicationApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileBalanceVerifying = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + let balance + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body) + whileBalanceVerifying(dataToCompare, request, attempts) + else { + for (let i = 0; i < response.body.length; i++) { + if (response.body[i].tokenId === tokenId) + balance = response.body[i].balance + } + if (balance !== dataToCompare) + whileBalanceVerifying(dataToCompare, request, attempts) + } + }) + } + } + + before("Create contracts, policy and register new user", () => { + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { authorization }, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint token", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + before("Appove wipe request", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + }); + + describe("Create and cancel retire request", () => { + + it("Create retire request", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + let poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [{ + token: tokenId, + count: 1, + serials: [1] + }] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId) + expect(response.body.at(0).tokens.at(0).count).eql(1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + + it("Cancel retire request without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + retireRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + wContractId + "/" + API.Requests, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }); + + it("Cancel retire request with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + wContractId + "/" + API.Requests, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Cancel retire request with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + wContractId + "/" + API.Requests, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Cancel retire request", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireRequests + retireRequestId + "/" + API.Cancel, + headers: { + authorization: accessToken + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + }) + + describe("Create and unset retire request", () => { + + before("Create retire request", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + let poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [{ + token: tokenId, + count: 1, + serials: [1] + }] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId) + expect(response.body.at(0).tokens.at(0).count).eql(1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + + it("Unset retire request without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + retireRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireRequests + retireRequestId, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }); + + it("Unset retire request with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireRequests + retireRequestId, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Unset retire request with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireRequests + retireRequestId, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Unset retire request", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireRequests + retireRequestId, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + + describe("Create and approve retire request", () => { + + before("Create retire request", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + let poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [{ + token: tokenId, + count: 1, + serials: [1] + }] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId) + expect(response.body.at(0).tokens.at(0).count).eql(1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + + it("Approve retire request without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + retireRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireRequests + retireRequestId + "/" + API.Approve, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }); + + it("Approve retire request with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireRequests + retireRequestId + "/" + API.Approve, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Approve retire request with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireRequests + retireRequestId + "/" + API.Approve, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Approve retire request", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireRequests + retireRequestId + "/" + API.Approve, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + }) +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/enableAndDisableWipeRequests.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/enableAndDisableWipeRequests.cy.js new file mode 100644 index 0000000000..3084e39d80 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/enableAndDisableWipeRequests.cy.js @@ -0,0 +1,1123 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const optionKey = "option"; + let username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + let contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + let contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + let wContractId, rContractId, tokenId, policyId, hederaId, rConractUuid, wConractUuid; + let waitForApproveApplicationBlockId, deviceGridBlockId, issueRequestGridBlockId, approveRegistrantBtnBlockId; + + const whileWipeRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileWipeRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileWipeRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileRetireRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileRetireRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileRetireRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.uiMetaData?.title) + whileApplicationCreating(dataToCompare, request, attempts) + else { + let data = response.body.uiMetaData.title + if (data !== dataToCompare) + whileApplicationCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.fields) + whileApplicationApproving(dataToCompare, request, attempts) + else { + let data = response.body.fields[0]?.title + if (data !== dataToCompare) + whileApplicationApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileBalanceVerifying = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + let balance + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body) + whileBalanceVerifying(dataToCompare, request, attempts) + else { + for (let i = 0; i < response.body.length; i++) { + if (response.body[i].tokenId === tokenId) + balance = response.body[i].balance + } + if (balance !== dataToCompare) + whileBalanceVerifying(dataToCompare, request, attempts) + } + }) + } + } + + before("Create contracts, policy and register new user", () => { + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wConractUuid = response.body.id; + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { authorization }, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint token", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + it("Disable wipe contract requests", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Disable, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + cy.wait(120000) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql([]); + }) + }) + + it("Disable wipe contract requests without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Disable, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Disable wipe contract requests with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Disable, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Disable wipe contract requests with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Disable, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Unset retire contract pool without auth token - Negative", () => { + let poolId; + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + poolId = response.body.at(0).id; + }).then(() => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetirePools + poolId, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }) + }); + + it("Unset retire contract pool with invalid auth token - Negative", () => { + let poolId; + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + poolId = response.body.at(0).id; + }).then(() => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetirePools + poolId, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }) + }); + + it("Unset retire contract pool with empty auth token - Negative", () => { + let poolId; + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + poolId = response.body.at(0).id; + }).then(() => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetirePools + poolId, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }) + }); + + it("Unset retire contract pool", () => { + let poolId; + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + poolId = response.body.at(0).id; + }).then(() => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetirePools + poolId, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + }) + }) + + it("Enable wipe contract requests", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Enable, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileRetireRequestCreating(wContractId, requestForRetireRequestCreationProgress, 0) + }) + + it("Enable wipe contract requests without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Enable, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Enable wipe contract requests with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Enable, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Enable wipe contract requests with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + wConractUuid + "/" + API.Requests + API.Enable, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + let wipeRequestId + it("Approve wipe contract requests", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0)).to.have.property("id"); + }) + }) + }) + }) + + it("Approve wipe contract requests without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Approve wipe contract requests with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Approve wipe contract requests with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/getContracts.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/getContracts.cy.js index c17aee901c..6ffe815c8a 100644 --- a/e2e-tests/cypress/e2e/api-tests/contracts/getContracts.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/contracts/getContracts.cy.js @@ -1,12 +1,13 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Contracts", { tags: '@contracts' },() => { +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { + const contractNameR = Math.floor(Math.random() * 999) + "RCon4RequestsTests"; const contractNameW = Math.floor(Math.random() * 999) + "WCon4RequestsTests"; - let policyid + cy.request({ method: METHOD.POST, url: API.ApiServer + API.ListOfContracts, @@ -17,8 +18,8 @@ context("Contracts", { tags: '@contracts' },() => { "description": contractNameR, "type": "RETIRE", }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); }); cy.request({ method: METHOD.POST, @@ -30,44 +31,53 @@ context("Contracts", { tags: '@contracts' },() => { "description": contractNameW, "type": "WIPE", }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); }); + }) + + it("Get list of retire contracts", () => { cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.PolicisImportMsg, - body: { - "messageId": Cypress.env('policy_for_compare1')//iRec 4 - }, + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts, headers: { authorization, }, - timeout: 180000 - }) - .then((response) => { - expect(response.status).to.eq(STATUS_CODE.SUCCESS); - policyid = response.body.at(-1).id; - }) - }) + qs: { + type: "RETIRE" + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(-1)).to.have.property("_id"); + expect(response.body.at(-1)).to.have.property("contractId"); + expect(response.body.at(-1)).to.have.property("type"); + expect(response.body.at(-1).type).eql("RETIRE"); + expect(response.body.at(-1)).to.have.property("description"); + expect(response.body.at(-1)).to.have.property("owner"); + }); + }); - it("Get list of contracts", () => { + it("Get list of wipe contracts", () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.ListOfContracts, headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body.at(-1)).to.have.property("_id"); - expect(resp.body.at(-1)).to.have.property("contractId"); - expect(resp.body.at(-1)).to.have.property("type"); - expect(resp.body.at(-1)).to.have.property("description"); - expect(resp.body.at(-1)).to.have.property("owner"); + qs: { + type: "WIPE" + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(-1)).to.have.property("_id"); + expect(response.body.at(-1)).to.have.property("contractId"); + expect(response.body.at(-1)).to.have.property("type"); + expect(response.body.at(-1).type).eql("WIPE"); + expect(response.body.at(-1)).to.have.property("description"); + expect(response.body.at(-1)).to.have.property("owner"); }); }); - it("Get list of contracts without auth token - Negative", () => { cy.request({ method: METHOD.GET, @@ -103,4 +113,36 @@ context("Contracts", { tags: '@contracts' },() => { expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); }); + + it("Get list of contracts as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + //expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/getPermissions.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/getPermissions.cy.js new file mode 100644 index 0000000000..b2ae23d19f --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/getPermissions.cy.js @@ -0,0 +1,298 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + let contractIdR, contractIdW; + let contractIdHedW; + let contractIdRVerra; + const username = "Verra" + before(() => { + const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPerms"; + const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPerms"; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + contractIdR = response.body.id; + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + contractIdW = response.body.id; + contractIdHedW = response.body.contractId; + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { + authorization + }, + }).then((response) => { + let hederaAccountId = response.body.id + let hederaAccountKey = response.body.key + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaAccountId, + hederaAccountKey: hederaAccountKey + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + headers: { + authorization: accessToken + }, + body: { + "contractId": contractIdHedW, + "description": contractNameW + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + contractIdRVerra = response.body.id + contractIdHedW = response.body.contractId + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaAccountId, + headers: { + authorization + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + }) + }) + }) + }) + + it("Get smart-contract(retire) permissions", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdR + "/" + API.ContractPermissions, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("3"); + }); + }); + + it("Get smart-contract(retire) permissions without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdR + "/" + API.ContractPermissions, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get smart-contract(retire) permissions with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdR + "/" + API.ContractPermissions, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get smart-contract(retire) permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdR + "/" + API.ContractPermissions, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get smart-contract(retire) permissions as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdR + "/" + API.ContractPermissions, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Get smart-contract(wipe) permissions", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdW + "/" + API.ContractPermissions, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("15"); + }); + }); + + it("Get smart-contract(wipe) permissions by Verra", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdRVerra + "/" + API.ContractPermissions, + headers: { + authorization: accessToken + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("8"); + }); + }) + }); + }) + + it("Get smart-contract(wipe) permissions without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdW + "/" + API.ContractPermissions, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get smart-contract(wipe) permissions with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdW + "/" + API.ContractPermissions, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get smart-contract(wipe) permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdW + "/" + API.ContractPermissions, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get smart-contract(wipe) permissions as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdW + "/" + API.ContractPermissions, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); +}); \ No newline at end of file diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/getPools.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/getPools.cy.js new file mode 100644 index 0000000000..f1357c2bd8 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/getPools.cy.js @@ -0,0 +1,177 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPoolsTests"; + const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPoolsTests"; + const tokenName = Math.floor(Math.random() * 999) + "TokenName"; + let rConractId, tokenId; + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + let rConractUuid = response.body.id; + rConractId = response.body.contractId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + let wConractId = response.body.contractId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + body: { + draftToken: false, + tokenName: tokenName, + tokenSymbol: "tn", + tokenType: "fungible", + decimals: "2", + initialSupply: "0", + enableAdmin: true, + changeSupply: true, + enableFreeze: false, + enableKYC: false, + enableWipe: true, + wipeContractId: wConractId, + tokenId: null + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + }); + }); + }) + }); + }) + + it("Returns all retire pools", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0)).to.have.property("_id"); + expect(response.body.at(0).contractId).eql(rConractId); + expect(response.body.at(0).tokenIds.at(-1)).eql(tokenId); + expect(response.body.at(0).tokens.at(-1).token).eql(tokenId); + }); + }); + + it("Returns all retire pools without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns all retire pools with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns all retire pools with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns all retire pools as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + //expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/getRequests.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/getRequests.cy.js index 2cf9b8bb62..44b2fb3b09 100644 --- a/e2e-tests/cypress/e2e/api-tests/contracts/getRequests.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/contracts/getRequests.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Contracts", { tags: '@contracts' },() => { +context("Contracts", { tags: ['contracts', 'firstPool'] },() => { const authorization = Cypress.env("authorization"); const username = Math.floor(Math.random() * 999) + "User"; const contractNameR = Math.floor(Math.random() * 999) + "RCon4RequestsTests"; @@ -26,7 +26,23 @@ context("Contracts", { tags: '@contracts' },() => { } } - let whileApplicationCreating = (dataToCompare, request, attempts) => { + const whileRetireRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileRetireRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileRetireRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationCreating = (dataToCompare, request, attempts) => { if (attempts < 100) { attempts++ cy.wait(3000) @@ -42,7 +58,7 @@ context("Contracts", { tags: '@contracts' },() => { } } - let whileApplicationApproving = (dataToCompare, request, attempts) => { + const whileApplicationApproving = (dataToCompare, request, attempts) => { if (attempts < 100) { attempts++ cy.wait(3000) @@ -58,7 +74,7 @@ context("Contracts", { tags: '@contracts' },() => { } } - let whileDeviceCreating = (dataToCompare, request, attempts) => { + const whileDeviceCreating = (dataToCompare, request, attempts) => { if (attempts < 100) { attempts++ cy.wait(3000) @@ -74,7 +90,7 @@ context("Contracts", { tags: '@contracts' },() => { } } - let whileDeviceApproving = (dataToCompare, request, attempts) => { + const whileDeviceApproving = (dataToCompare, request, attempts) => { if (attempts < 100) { attempts++ cy.wait(3000) @@ -90,7 +106,7 @@ context("Contracts", { tags: '@contracts' },() => { } } - let whileIssueRequestCreating = (dataToCompare, request, attempts) => { + const whileIssueRequestCreating = (dataToCompare, request, attempts) => { if (attempts < 100) { attempts++ cy.wait(3000) @@ -106,7 +122,7 @@ context("Contracts", { tags: '@contracts' },() => { } } - let whileIssueRequestApproving = (dataToCompare, request, attempts) => { + const whileIssueRequestApproving = (dataToCompare, request, attempts) => { if (attempts < 100) { attempts++ cy.wait(3000) @@ -115,10 +131,6 @@ context("Contracts", { tags: '@contracts' },() => { whileIssueRequestApproving(dataToCompare, request, attempts) else { let data = response.body.data[0]?.[optionKey]?.status - - cy.log(response) - cy.log(data) - cy.log(dataToCompare) if (data !== dataToCompare) whileIssueRequestApproving(dataToCompare, request, attempts) } @@ -126,8 +138,8 @@ context("Contracts", { tags: '@contracts' },() => { } } - let whileBalanceVerifying = (dataToCompare, request, attempts) => { - if (attempts < 100) { + const whileBalanceVerifying = (dataToCompare, request, attempts) => { + if (attempts < 10) { attempts++ let balance cy.wait(3000) @@ -146,39 +158,41 @@ context("Contracts", { tags: '@contracts' },() => { } } - before("Create contracts, policy and register new user", () => { - //Create retire contract and save id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.ListOfContracts, - headers: { - authorization, - }, - body: { - "description": contractNameR, - "type": "RETIRE", - }, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.SUCCESS); - rContractId = response.body.contractId; - rConractUuid = response.body.id; - }); + describe("Flow for one NFT token and get requests", () => { + //Flow with one NFT token + before("Create contracts, policy and register new user", () => { + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); - //Create wipe contract and save id - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.ListOfContracts, - headers: { - authorization, - }, - body: { - "description": contractNameW, - "type": "WIPE", - }, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.SUCCESS); - wContractId = response.body.contractId; - }); + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wContractId = response.body.contractId; + }); //Import policy and save id cy.request({ @@ -190,635 +204,5411 @@ context("Contracts", { tags: '@contracts' },() => { headers: { authorization, }, - timeout: 360000 + timeout: 180000 }) .then((response) => { expect(response.status).to.eq(STATUS_CODE.SUCCESS); - policyId = response.body.at(0).id; + policyId = response.body.at(-1).id; }) - //Get token(Irec token) draft id to update it - cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.ListOfTokens, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.OK); - tokenId = response.body.at(0).tokenId; - }).then(() => { - //Put wipe contract to token + //Get token(Irec token) draft id to update it cy.request({ - method: METHOD.PUT, - url: API.ApiServer + API.ListOfTokens + API.Async, + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, headers: { authorization, }, - body: { - tokenId: tokenId, - wipeContractId: wContractId, - draftToken: true - } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) }) - }).then(() => { - //Publish policy + + //Register new user cy.request({ - method: 'PUT', - url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, body: { - policyVersion: "1.2.5" - }, - headers: { - authorization - }, - timeout: 600000 + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }) - .then((response) => { - expect(response.status).to.eq(STATUS_CODE.OK); - }) - }) - - //Register new user - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.AccountRegister, - body: { - username: username, - password: "test", - password_confirmation: "test", - role: "USER", - } - }).then((response) => { - expect(response.status).to.eq(STATUS_CODE.SUCCESS); - }) - //Login and get PT - cy.request({ - method: "POST", - url: API.ApiServer + "accounts/login", - body: { - username: username, - password: "test" - } - }).then((response) => { - //Get AT + //Login and get PT cy.request({ - method: "POST", - url: API.ApiServer + "accounts/access-token", + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { - refreshToken: response.body.refreshToken + username: username, + password: "test" } }).then((response) => { - let accessToken = "Bearer " + response.body.accessToken - //Get SR did + //Get AT cy.request({ - method: 'GET', - url: API.ApiServer + 'accounts/standard-registries/aggregated', - headers: { - authorization: accessToken + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken } }).then((response) => { - let SRDid = response.body[0].did - //Get generated hedera creds + let accessToken = "Bearer " + response.body.accessToken + //Get SR did cy.request({ method: METHOD.GET, - url: API.ApiServer + API.RandomKey, - headers: {authorization}, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } }).then((response) => { - hederaId = response.body.id - let hederaAccountKey = response.body.key - //Update profile + let SRDid = response.body[0].did + //Get generated hedera creds cy.request({ - method: 'PUT', - url: API.ApiServer + 'profiles/' + username, - body: { - hederaAccountId: hederaId, - hederaAccountKey: hederaAccountKey, - parent: SRDid - }, - headers: { - authorization: accessToken - }, - timeout: 180000 + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: {authorization}, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) }) }) }) }) }) - }) - before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" - } - }).then((response) => { + before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { - refreshToken: response.body.refreshToken + username: username, + password: "test" } }).then((response) => { - let accessToken = "Bearer " + response.body.accessToken - cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, - headers: { - authorization: accessToken - } - }).then((response) => { - waitForApproveApplicationBlockId = response.body.id - }) - cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, - headers: { - authorization: accessToken - } - }).then((response) => { - deviceGridBlockId = response.body.id - }) - cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, - headers: { - authorization: accessToken - } - }).then((response) => { - issueRequestGridBlockId = response.body.id - }) cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, - headers: { - authorization + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken } }).then((response) => { - approveRegistrantBtnBlockId = response.body.id - }) - cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.ListOfTokens, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.OK); - tokenId = response.body.at(0).tokenId; + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) }) }) }) - }) - before("Mint token", () => { - //Choose role - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" - } - }).then((response) => { + before("Mint token", () => { + //Choose role cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { - refreshToken: response.body.refreshToken + username: username, + password: "test" } }).then((response) => { - let accessToken = "Bearer " + response.body.accessToken cy.request({ - method: "POST", - url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, - headers: { - authorization: accessToken - }, + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, body: { - role: "Registrant" + refreshToken: response.body.refreshToken } - }) + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) - cy.wait(10000) + cy.wait(10000) - //Create app and wait while it in progress - cy.request({ - method: "POST", - url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, - headers: { - authorization: accessToken - }, - body: { - document: { - field1: {}, - field2: {}, - field3: {} + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken }, - ref: null - } - }) + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) - let requestForApplicationCreationProgress = { - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, - headers: { - authorization: accessToken + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } } - } - whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) }) - }) - //Get applications data and prepare body for approve - let applicationData - cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, - headers: { - authorization - } - }).then((response) => { - applicationData = response.body.data[0]; - applicationData.option.status = "Approved" - let appDataBody = JSON.stringify({ - document: applicationData, - tag: "Button_0" - }) - //Approve app + //Get applications data and prepare body for approve + let applicationData cy.request({ - method: "POST", - url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, headers: { - authorization, - "content-type": "application/json" - }, - body: appDataBody + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) }) - }) - //Wait while approve in progress - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" - } - }).then((response) => { + //Wait while approve in progress cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { - refreshToken: response.body.refreshToken + username: username, + password: "test" } }).then((response) => { - accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken - let requestForApplicationApproveProgress = { - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, - headers: { - authorization: accessToken + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } } - } - whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) }) - }) - //Create device and wait while it in progress - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" - } - }).then((response) => { + //Create device and wait while it in progress cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { - refreshToken: response.body.refreshToken + username: username, + password: "test" } }).then((response) => { - let accessToken = "Bearer " + response.body.accessToken cy.request({ - method: "POST", - url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, - headers: { - authorization: accessToken - }, + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, body: { - document: { - field3: {}, - field4: {}, - field5: {} - }, - ref: null + refreshToken: response.body.refreshToken } - }) + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) - let requestForDeviceCreationProgress = { - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, - headers: { - authorization: accessToken + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } } - } - whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) }) - }) - //Get devices data and prepare body for approve - let deviceBody - cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, - headers: { - authorization - } - }).then((response) => { - deviceBody = response.body; - let data = deviceBody.data[deviceBody.data.length - 1] - data[optionKey].status = "Approved" - let appDataBody = JSON.stringify({ - document: data, - tag: "Button_0" - }) - //Approve device + //Get devices data and prepare body for approve + let deviceBody cy.request({ - method: "POST", - url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, headers: { - authorization, - "content-type": "application/json" - }, - body: appDataBody + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) }) - }) - //Wait while approve in progress - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" - } - }).then((response) => { + //Wait while approve in progress cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { - refreshToken: response.body.refreshToken + username: username, + password: "test" } }).then((response) => { - accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken - let requestForDeviceApproveProgress = { - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, - headers: { - authorization: accessToken + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } } - } - whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) }) - }) - //Get issue data and prepare body for create - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" - } - }).then((response) => { + //Get issue data and prepare body for create cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { - refreshToken: response.body.refreshToken + username: username, + password: "test" } }).then((response) => { - let accessToken = "Bearer " + response.body.accessToken cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, - headers: { - authorization: accessToken + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken } }).then((response) => { - let obj = response.body - let device_issue_row = obj.data[obj.data.length - 1] - - //Create issue and wait while it in progress + let accessToken = "Bearer " + response.body.accessToken cy.request({ - method: "POST", - url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, headers: { - authorization: accessToken, - "content-type": "application/json" - }, - body: { - document: { - field2: {}, - field3: {}, - field6: "2024-03-01", - field7: 1, - field8: "2024-03-02", - field17: username, - field18: hederaId + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" }, - ref: device_issue_row + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken - let requestForIssueCreationProgress = { - method: "GET", + let requestForIssueApproveProgress = { + method: METHOD.GET, url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, headers: { authorization: accessToken } } - whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) }) }) - }) - //Get issue data and prepare body for approve - let issueRow - cy.request({ - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, - headers: { - authorization - } - }).then((response) => { - issueRow = response.body.data - issueRow = issueRow[issueRow.length - 1] - issueRow[optionKey].status = "Approved" - issueRow = JSON.stringify({ - document: issueRow, - tag: "Button_0" + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + whileBalanceVerifying("10", requestForBalance, 0) + }) + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + whileBalanceVerifying("10", requestForBalance, 0) + }) + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + whileBalanceVerifying("10", requestForBalance, 0) + }) }) - //Approve issue + }) + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress cy.request({ - method: "POST", - url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, headers: { authorization, - "content-type": "application/json" }, - body: issueRow + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); }) - }) - //Wait while approve in progress - let accessToken - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } } - }).then((response) => { + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + it("Get wipe request", { tags: ['smoke'] }, () => { cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, - body: { - refreshToken: response.body.refreshToken + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId } }).then((response) => { - accessToken = "Bearer " + response.body.accessToken + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(wContractId) + }); + }); - let requestForIssueApproveProgress = { - method: "GET", - url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + it("Get retire request", { tags: ['smoke'] }, () => { + let wipeRequestId, poolId + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, headers: { - authorization: accessToken + authorization, } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" } - - whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [{ + token: tokenId, + count: 1, + serials: [1] + }] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) }) - }) - //Wait while balance updating - cy.request({ - method: "POST", - url: API.ApiServer + API.AccountsLogin, - body: { - username: username, - password: "test" + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } } - }).then((response) => { + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + cy.request({ - method: "POST", - url: API.ApiServer + API.AccessToken, - body: { - refreshToken: response.body.refreshToken + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId } }).then((response) => { - accessToken = "Bearer " + response.body.accessToken + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId) + expect(response.body.at(0).tokens.at(0).count).eql(1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + }) - let requestForBalance = { - method: "GET", - url: API.ApiServer + API.ListOfTokens, - headers: { - authorization: accessToken - } - } + describe("Flow for two NFT tokens and get requests", () => { + + before("Create contracts, policies, register new user and associate token with him", () => { + username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wContractId = response.body.contractId; + }); - whileBalanceVerifying("1", requestForBalance) + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 }) - }) - }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) - before("Set pool", () => { - //Set pool to retire contract and wait while it in progress - cy.request({ - method: "POST", - url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, - headers: { - authorization, - }, - body: { - tokens: [ - { - token: tokenId, - count: 1 + //Get token(Irec 4 token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true } - ], - immediately: false - } - }).then((response) => { - expect(response.status).eql(STATUS_CODE.OK); - }) - - let requestForWipeRequestCreationProgress = { - method: METHOD.GET, - url: API.ApiServer + API.WipeRequests, - headers: { - authorization, - }, - qs: { - contractId: wContractId - } - } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) - whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) - }) + //Import second policy to have one more token and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId2 = response.body.at(-1).id; + }) - it("Get wipe request", () => { - cy.wait(1000) - cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.WipeRequests, - headers: { - authorization, - }, - qs: { - contractId: wContractId + //Get token(Irec 5 token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId2 = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId2, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: {authorization}, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and tokens id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(1).tokenId; + tokenId2 = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint tokens", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Mint second tokens", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + waitForApproveApplicationBlockId2, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + issueRequestGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + issueRequestGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + }, + { + token: tokenId2, + count: 2 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + it("Get wipe request for two tokens", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(wContractId) + expect(response.body.at(0).user).eql(rContractId) + }); + }); + + it("Get retire request two tokens", () => { + let wipeRequestId, poolId + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [ + { + token: tokenId, + count: 1, + serials: [1] + }, + { + token: tokenId2, + count: 2, + serials: [1, 2] + } + ] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId || tokenId2) + expect(response.body.at(0).tokens.at(0).count).eql(1 || 2) + expect(response.body.at(0).tokens.at(1).token).eql(tokenId2 || tokenId) + expect(response.body.at(0).tokens.at(1).count).eql(2 || 1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + + }) + + describe("Flow for one FT token and get requests", () => { + + //Flow with one FT token + before("Create contracts, policy and register new user", () => { + username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token and change token type + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + tokenType: "fungible", + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: {authorization}, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint token", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + it("Get wipe request", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(wContractId) + }); + }); + + it("Get retire request", () => { + let wipeRequestId, poolId + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [{ + token: tokenId, + count: 1, + serials: [1] + }] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId) + expect(response.body.at(0).tokens.at(0).count).eql(1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + + }) + + describe("Flow for two FT tokens and get requests", () => { + + before("Create contracts, policies, register new user and associate token with him", () => { + username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec 4 token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenType: "fungible", + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Import second policy to have one more token and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId2 = response.body.at(-1).id; + }) + + //Get token(Irec 5 token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId2 = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenType: "fungible", + tokenId: tokenId2, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: {authorization}, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and tokens id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(1).tokenId; + tokenId2 = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint tokens", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Mint second tokens", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + waitForApproveApplicationBlockId2, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + issueRequestGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + issueRequestGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + }, + { + token: tokenId2, + count: 2 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + it("Get wipe request for two tokens", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(wContractId) + expect(response.body.at(0).user).eql(rContractId) + }); + }); + + it("Get retire request two tokens", () => { + let wipeRequestId, poolId + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [ + { + token: tokenId, + count: 1, + serials: [1] + }, + { + token: tokenId2, + count: 2, + serials: [1, 2] + } + ] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId || tokenId2) + expect(response.body.at(0).tokens.at(0).count).eql(1 || 2) + expect(response.body.at(0).tokens.at(1).token).eql(tokenId2 || tokenId) + expect(response.body.at(0).tokens.at(1).count).eql(2 || 1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + + }) + + describe("Flow for NFT and FT tokens and get requests", () => { + + before("Create contracts, policies, register new user and associate token with him", () => { + username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + contractNameR = Math.floor(Math.random() * 99999) + "RCon4RequestsTests"; + contractNameW = Math.floor(Math.random() * 99999) + "WCon4RequestsTests"; + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec 4 token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenType: "fungible", + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Import second policy to have one more token and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId2 = response.body.at(-1).id; + }) + + //Get token(Irec 5 token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId2 = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId2, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: {authorization}, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and tokens id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId2 = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(1).tokenId; + tokenId2 = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint tokens", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Mint second tokens", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + waitForApproveApplicationBlockId2, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + deviceGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + issueRequestGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId2 + "/" + API.Blocks + issueRequestGridBlockId2, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + }, + { + token: tokenId2, + count: 2 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + it("Get wipe request for two tokens", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(wContractId) + expect(response.body.at(0).user).eql(rContractId) + }); + }); + + it("Get retire request two tokens", () => { + let wipeRequestId, poolId + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [ + { + token: tokenId, + count: 1, + serials: [1] + }, + { + token: tokenId2, + count: 2, + serials: [1, 2] + } + ] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } } - }).then((response) => { - expect(response.status).eql(STATUS_CODE.OK); - expect(response.body.at(0).contractId).eql(wContractId) + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId || tokenId2) + expect(response.body.at(0).tokens.at(0).count).eql(1 || 2) + expect(response.body.at(0).tokens.at(1).token).eql(tokenId2 || tokenId) + expect(response.body.at(0).tokens.at(1).count).eql(2 || 1) + expect(response.body.at(0).user).eql(hederaId) + }); + }); + + }) + + describe("Flow for getting all requests and negative scenarios", () => { + + it("Get all wipe contracts requests", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + + it("Get all wipe contracts requests without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get all wipe contracts requests with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get all wipe contracts requests with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get all retire contracts requests", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + + it("Get all retire contracts requests without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get all retire contracts requests with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get all retire contracts requests with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get wipe request without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + qs: { + contractId: wContractId + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get wipe request with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization: "Bearer wqe", + }, + qs: { + contractId: wContractId + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get wipe request with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization: "", + }, + qs: { + contractId: wContractId + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get retire request without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + qs: { + contractId: rContractId + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get retire request with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization: "Bearer wqe", + }, + qs: { + contractId: rContractId + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); }); - }); - - // it("Get all wipe contracts requests", () => { - // cy.request({ - // method: METHOD.GET, - // url: API.ApiServer + API.WipeRequests, - // headers: { - // authorization, - // }, - // }).then((resp) => { - // expect(resp.status).eql(STATUS_CODE.OK); - // }); - // }); - // - // it("Get all retire contracts requests", () => { - // cy.request({ - // method: METHOD.GET, - // url: API.ApiServer + API.RetireRequests, - // headers: { - // authorization, - // }, - // }).then((resp) => { - // expect(resp.status).eql(STATUS_CODE.OK); - // }); - // }); + + it("Get retire request with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization: "", + }, + qs: { + contractId: rContractId + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }) }); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/getRetireVCS.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/getRetireVCS.cy.js new file mode 100644 index 0000000000..aa8c68c4cb --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/getRetireVCS.cy.js @@ -0,0 +1,58 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + + const authorization = Cypress.env("authorization"); + + it("Returns all retire vcs", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireContract, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0)).to.have.property("_id"); + expect(response.body.at(0)).to.have.property("owner"); + expect(response.body.at(0)).to.have.property("type"); + }); + }); + + it("Returns all retire vcs without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireContract, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns all retire vcs with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireContract, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns all retire vcs with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireContract, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/importContract.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/importContract.cy.js new file mode 100644 index 0000000000..bf2e5e7123 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/importContract.cy.js @@ -0,0 +1,113 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const importedContractName = Math.floor(Math.random() * 999) + "Con4Import"; + + it("Import smart-contract", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + headers: { + authorization, + }, + body: { + "contractId": Cypress.env("contract_for_import"), + "description": importedContractName + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.contractId).eq(Cypress.env("contract_for_import")); + expect(response.body.description).eq(importedContractName); + expect(response.body.type).eq("WIPE"); + expect(response.body).to.have.property("id"); + expect(response.body).to.have.property("owner"); + }); + }); + + it("Import smart-contract without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + body: { + "contractId": Cypress.env("contract_for_import"), + "description": importedContractName + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Import smart-contract with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + headers: { + authorization: "Bearer wqe", + }, + body: { + "contractId": Cypress.env("contract_for_import"), + "description": importedContractName + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Import smart-contract with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + headers: { + authorization: "", + }, + body: { + "contractId": Cypress.env("contract_for_import"), + "description": importedContractName + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Import smart-contract as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + headers: { + authorization: accessToken + }, + body: { + "contractId": Cypress.env("contract_for_import"), + "description": importedContractName + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + //expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/postContract.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/postContract.cy.js index 605698b9ae..619f0d38fc 100644 --- a/e2e-tests/cypress/e2e/api-tests/contracts/postContract.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/contracts/postContract.cy.js @@ -1,11 +1,13 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Contracts", { tags: '@contracts' },() => { +context("Contracts", { tags: ['contracts', 'firstPool'] },() => { const authorization = Cypress.env("authorization"); + const contractNameR = Math.floor(Math.random() * 999) + "APIContractR"; + const contractNameW = Math.floor(Math.random() * 999) + "APIContractW"; + const contractNameNeg = Math.floor(Math.random() * 999) + "APIContractNeg"; it("Create retire contract", () => { - const contractName = Math.floor(Math.random() * 999) + "APIContract"; cy.request({ method: METHOD.POST, url: API.ApiServer + API.ListOfContracts, @@ -13,16 +15,205 @@ context("Contracts", { tags: '@contracts' },() => { authorization, }, body: { - "description": contractName, + "description": contractNameR, "type": "RETIRE", }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - expect(resp.body).to.have.property("_id"); - expect(resp.body).to.have.property("description", contractName); - expect(resp.body).to.have.property("contractId"); - expect(resp.body).to.have.property("owner"); - expect(resp.body).to.have.property("type", "RETIRE"); + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + expect(response.body).to.have.property("_id"); + expect(response.body).to.have.property("description", contractNameR); + expect(response.body).to.have.property("contractId"); + expect(response.body).to.have.property("owner"); + expect(response.body).to.have.property("type", "RETIRE"); + }); + }); + + it("Create retire contract without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + failOnStatusCode: false, + body: { + "description": contractNameNeg, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create retire contract with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization: "Bearer wqe", + }, + body: { + "description": contractNameNeg, + "type": "RETIRE", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create retire contract with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization: "", + }, + body: { + "description": contractNameNeg, + "type": "RETIRE", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create retire contract as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization: accessToken + }, + body: { + "description": contractNameNeg, + "type": "RETIRE", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Create wipe contract", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + expect(response.body).to.have.property("_id"); + expect(response.body).to.have.property("description", contractNameW); + expect(response.body).to.have.property("contractId"); + expect(response.body).to.have.property("owner"); + expect(response.body).to.have.property("type", "WIPE"); + }); + }); + + it("Create wipe contract without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + failOnStatusCode: false, + body: { + "description": contractNameNeg, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create wipe contract with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization: "Bearer wqe", + }, + body: { + "description": contractNameNeg, + "type": "WIPE", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create wipe contract with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization: "", + }, + body: { + "description": contractNameNeg, + "type": "WIPE", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create wipe contract as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization: accessToken + }, + body: { + "description": contractNameNeg, + "type": "WIPE", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/postPair.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/postPair.cy.js deleted file mode 100644 index 2485b69571..0000000000 --- a/e2e-tests/cypress/e2e/api-tests/contracts/postPair.cy.js +++ /dev/null @@ -1,88 +0,0 @@ -import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; -import API from "../../../support/ApiUrls"; - -context("Contracts", { tags: '@contracts' },() => { - // const authorization = Cypress.env("authorization"); - // let contractId; - // let basicTokenId; - // let oppositeTokenId; - // it("get contract id for pair", () => { - // cy.request({ - // method: METHOD.GET, - // url: API.ApiServer + API.ListOfContracts, - // headers: { - // authorization, - // } - // }).then((resp) => { - // expect(resp.status).eql(STATUS_CODE.OK); - // expect(resp.status).eql(STATUS_CODE.OK); - // contractId = resp.body.at(-1).contractId; - // }); - // }); - // it("get tokens ids for pair", () => { - // cy.request({ - // method: "POST", - // url: API.ApiServer + API.ListOfTokens, - // headers: { authorization }, - // body: { - // "changeSupply": true, - // "decimals": "string", - // "enableAdmin": true, - // "enableFreeze": true, - // "enableKYC": true, - // "enableWipe": true, - // "initialSupply": "string", - // "tokenName": "test" + Math.floor(Math.random() * 999), - // "tokenSymbol": "string", - // "tokenType": "string" - // }, - // }); - // cy.request({ - // method: "POST", - // url: API.ApiServer + API.ListOfTokens, - // headers: { authorization }, - // body: { - // "changeSupply": true, - // "decimals": "string", - // "enableAdmin": true, - // "enableFreeze": true, - // "enableKYC": true, - // "enableWipe": true, - // "initialSupply": "string", - // "tokenName": "test" + Math.floor(Math.random() * 999), - // "tokenSymbol": "string", - // "tokenType": "string" - // }, - // }); - // cy.request({ - // method: METHOD.GET, - // url: API.ApiServer + API.ListOfTokens, - // headers: { - // authorization, - // }, - // }).then((resp) => { - // expect(resp.status).eql(STATUS_CODE.OK); - // basicTokenId = resp.body.at(-1).tokenId; - // oppositeTokenId = resp.body.at(-2).tokenId; - // console.log(basicTokenId, oppositeTokenId) - // }); - // }); - // it("create pair", () => { - // cy.request({ - // method: METHOD.POST, - // url: API.ApiServer + API.ListOfContracts + contractId + "/pair", - // headers: { - // authorization, - // }, - // body: { - // "baseTokenId": basicTokenId, - // "oppositeTokenId": oppositeTokenId, - // "baseTokenCount": 1, - // "oppositeTokenCount": 2 - // }, - // }).then((resp) => { - // expect(resp.status).eql(STATUS_CODE.OK); - // expect(resp.body).to.eq(true); - // }); - // }); -}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/postUser.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/postUser.cy.js deleted file mode 100644 index eeb1d5dd19..0000000000 --- a/e2e-tests/cypress/e2e/api-tests/contracts/postUser.cy.js +++ /dev/null @@ -1,64 +0,0 @@ -// import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; -// import API from "../../../support/ApiUrls"; -// -// context("Contracts", { tags: '@contracts' },() => { -// const authorization = Cypress.env("authorization"); -// let contractId; -// let userId; -// -// it("get contract id for user addition", () => { -// cy.request({ -// method: METHOD.GET, -// url: API.ApiServer + API.ListOfContracts, -// headers: { -// authorization, -// } -// }).then((resp) => { -// expect(resp.status).eql(STATUS_CODE.OK); -// expect(resp.status).eql(STATUS_CODE.OK); -// contractId = resp.body.at(-1).contractId; -// }); -// }); -// -// it("get user id for user addition", () => { -// cy.request({ -// method: METHOD.POST, -// url: API.ApiServer + API.AccountsLogin, -// body: { -// username: 'Registrant', -// password: 'test' -// }, -// }).then((resp) => { -// expect(resp.status).eql(STATUS_CODE.OK); -// cy.wrap(resp.body.accessToken).as("accessToken"); -// cy.get("@accessToken").then((accessToken) =>{ -// cy.request({ -// method: METHOD.GET, -// url: API.ApiServer + API.Profiles + "Registrant", -// headers: { -// "authorization": "bearer " + accessToken, -// }, -// }).then((resp) => { -// expect(resp.status).eql(STATUS_CODE.OK); -// userId = resp.body.hederaAccountId; -// }); -// }); -// }); -// }); -// -// it("user addition", () => { -// cy.request({ -// method: METHOD.POST, -// url: API.ApiServer + API.ListOfContracts + contractId + "/user", -// headers: { -// authorization, -// }, -// body: { -// "userId": userId -// }, -// }).then((resp) => { -// expect(resp.status).eql(STATUS_CODE.OK); -// expect(resp.body).to.eq(true); -// }); -// }); -// }); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/removeContracts.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/removeContracts.cy.js new file mode 100644 index 0000000000..a2ba036511 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/removeContracts.cy.js @@ -0,0 +1,254 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + let contractIdR, contractIdW + before(() => { + const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPerms"; + const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPerms"; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + contractIdR = response.body.id; + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + contractIdW = response.body.id; + }); + }) + + it("Remove smart-contract(retire)", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdR, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + qs: { + type: "RETIRE" + } + }).then((response) => { + (response.body).forEach(element => { + console.log(element.id) + expect(element.id !== contractIdR) + }); + }); + }); + }); + + it("Remove removed smart-contract(retire) - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdR, + headers: { + authorization, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + }); + }); + + it("Remove smart-contract(retire) without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdR, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove smart-contract(retire) with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdR, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove smart-contract(retire) permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdR, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove smart-contract(retire) permissions as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdR, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Remove smart-contract(wipe)", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdW, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + + it("Remove removed smart-contract(wipe) - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdW, + headers: { + authorization, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + qs: { + type: "WIPE" + } + }).then((response) => { + (response.body).forEach(element => { + console.log(element.id) + expect(element.id !== contractIdW) + }); + }); + }); + }); + + it("Remove smart-contract(wipe) without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdW, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove smart-contract(wipe) with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdW, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove smart-contract(wipe) with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdW, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove smart-contract(wipe) as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfContracts + contractIdW, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/retireTokens.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/retireTokens.cy.js new file mode 100644 index 0000000000..f6d90ab654 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/retireTokens.cy.js @@ -0,0 +1,1175 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const optionKey = "option"; + let username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPoolsTests"; + const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPoolsTests"; + let wContractId, rContractId, tokenId, policyId, hederaId, rConractUuid, retireRequestId, poolId; + let waitForApproveApplicationBlockId, deviceGridBlockId, issueRequestGridBlockId, approveRegistrantBtnBlockId; + + const whileWipeRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileWipeRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileWipeRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileRetireRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileRetireRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileRetireRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.uiMetaData?.title) + whileApplicationCreating(dataToCompare, request, attempts) + else { + let data = response.body.uiMetaData.title + if (data !== dataToCompare) + whileApplicationCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileApplicationApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.fields) + whileApplicationApproving(dataToCompare, request, attempts) + else { + let data = response.body.fields[0]?.title + if (data !== dataToCompare) + whileApplicationApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileDeviceApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestCreating(dataToCompare, request, attempts) + } + }) + } + } + + const whileIssueRequestApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestApproving(dataToCompare, request, attempts) + } + }) + } + } + + const whileBalanceVerifying = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + let balance + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body) + whileBalanceVerifying(dataToCompare, request, attempts) + else { + for (let i = 0; i < response.body.length; i++) { + if (response.body[i].tokenId === tokenId) + balance = response.body[i].balance + } + if (balance !== dataToCompare) + whileBalanceVerifying(dataToCompare, request, attempts) + } + }) + } + } + + before("Create contracts, policy and register new user", () => { + //Create retire contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rContractId = response.body.contractId; + rConractUuid = response.body.id; + }); + + //Create wipe contract and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + wContractId = response.body.contractId; + }); + + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { authorization }, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + before("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) + }) + }) + }) + + before("Mint token", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) + + describe("Retire tokens without approve", () => { + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: true + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + before("Appove wipe request", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let wipeRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeRequests + wipeRequestId + "/" + API.Approve, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + }); + + it("Create retire request", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [{ + token: tokenId, + count: 1, + serials: [1] + }] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + }); + + it("Create retire request without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create retire request with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create retire request with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Verify balance decreased", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + body: { + refreshToken: response.body.refreshToken + }, + headers: { + authorization: accessToken, + }, + }).then((response) => { + for (let i = 0; i < response.body.length; i++) { + if (response.body.tokenId == tokenId) + expect(response.body.balance === "9") + } + }) + }) + //TBD Checking retirement end + }) + }) + }); + + describe("Retire tokens with approve", () => { + + before("Set pool", () => { + //Set pool to retire contract and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 2 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + + let requestForWipeRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.WipeRequests, + headers: { + authorization, + }, + qs: { + contractId: wContractId + } + } + + whileWipeRequestCreating(wContractId, requestForWipeRequestCreationProgress, 0) + }) + + it("Create retire request", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetirePools, + headers: { + authorization: accessToken + } + }).then((response) => { + poolId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: accessToken, + "Content-Type": "application/json" + }, + body: [{ + token: tokenId, + count: 2, + serials: [2,3] + }] + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + }) + }) + + let requestForRetireRequestCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + } + + whileRetireRequestCreating(rContractId, requestForRetireRequestCreationProgress, 0) + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0).contractId).eql(rContractId) + expect(response.body.at(0).tokens.at(0).token).eql(tokenId) + expect(response.body.at(0).tokens.at(0).count).eql(2) + expect(response.body.at(0).user).eql(hederaId) + }); + + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RetireRequests, + headers: { + authorization, + }, + qs: { + contractId: rContractId + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + retireRequestId = response.body.at(0).id; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireRequests + retireRequestId + "/" + API.Approve, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireRequests + retireRequestId + "/" + API.Approve, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }) + + }); + + it("Create retire request without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create retire request with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Create retire request with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetirePools + poolId + "/" + API.Retire, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Verify balance decreased", () => { + it("Verify balance decreased", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + body: { + refreshToken: response.body.refreshToken + }, + headers: { + authorization: accessToken, + }, + }).then((response) => { + for (let i = 0; i < response.body.length; i++) { + if (response.body.tokenId == tokenId) + expect(response.body.balance === "7") + } + }) + }) + //TBD Checking retirement end + }) + }) + }) + //TBD Approve request and checking retirement end + }) +}) \ No newline at end of file diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/setAndRemovePermissions.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/setAndRemovePermissions.cy.js new file mode 100644 index 0000000000..59e8a138b1 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/setAndRemovePermissions.cy.js @@ -0,0 +1,615 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const username = "Verra"; + let contractIdR, contractIdW, hederaIdVerra, contractUuidR, contractUuidW, contractIdWVerra, contractIdRVerra; + const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPerms"; + const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPerms"; + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + contractIdR = response.body.id; + contractUuidR = response.body.contractId; + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + contractIdW = response.body.id; + contractUuidW = response.body.contractId; + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Profiles + "Verra", + headers: { + authorization: accessToken, + } + }).then((response) => { + hederaIdVerra = response.body.hederaAccountId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + headers: { + authorization: accessToken + }, + body: { + "contractId": contractUuidW, + "description": contractNameW + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + contractIdWVerra = response.body.id + }); + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ImportContracts, + headers: { + authorization: accessToken + }, + body: { + "contractId": contractUuidR, + "description": contractNameR + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + contractIdRVerra = response.body.id + }); + }) + + }) + }) + }) + + it("Add wipe contract admin(wipe)", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Add wipe contract admin(wipe) without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract admin(wipe) with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract admin(wipe) permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract admin(retire)", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Add wipe contract admin(retire) without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract admin(retire) with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract admin(retire) permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract manager", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Add wipe contract manager without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract manager with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract manager permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract wiper", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Add wipe contract wiper without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract wiper with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add wipe contract wiper permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Verify roles(wipe)", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdWVerra + "/" + API.ContractPermissions, + headers: { + authorization: accessToken + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("14"); + }); + }) + }); + }); + + it("Verify roles(retire)", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdRVerra + "/" + API.ContractPermissions, + headers: { + authorization: accessToken + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("2"); + }); + }) + }); + }); + + it("Remove wipe contract admin(wipe)", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Remove wipe contract admin(wipe) without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.AdminRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract admin(wipe) with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract admin(wipe) permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract admin(retire)", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Remove wipe contract admin(retire) without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract admin(retire) with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract admin(retire) permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.RetireContract + contractIdR + "/" + API.AdminRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract manager", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Remove wipe contract manager without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract manager with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract manager permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.ManagerRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract wiper", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); + }); + }); + + it("Remove wipe contract wiper without auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract wiper with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Remove wipe contract wiper permissions with empty auth token - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.WipeContract + contractIdW + "/" + API.WiperRole + hederaIdVerra, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Verify roles(wipe)", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdWVerra + "/" + API.ContractPermissions, + headers: { + authorization: accessToken + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("0"); + }); + }) + }); + }); + + it("Verify roles(retire)", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfContracts + contractIdRVerra + "/" + API.ContractPermissions, + headers: { + authorization: accessToken + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("0"); + }); + }) + }); + }); +}) \ No newline at end of file diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/setPools.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/setPools.cy.js new file mode 100644 index 0000000000..f72ad10d22 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/setPools.cy.js @@ -0,0 +1,199 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPoolsTests"; + const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPoolsTests"; + const tokenName = Math.floor(Math.random() * 999) + "TokenName"; + let rConractId, tokenId, rConractUuid; + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rConractUuid = response.body.id; + rConractId = response.body.contractId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + let wConractId = response.body.contractId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + body: { + draftToken: false, + tokenName: tokenName, + tokenSymbol: "tn", + tokenType: "fungible", + decimals: "2", + initialSupply: "0", + enableAdmin: true, + changeSupply: true, + enableFreeze: false, + enableKYC: false, + enableWipe: true, + wipeContractId: wConractId, + tokenId: null + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }); + }); + }) + }); + }) + + it("Set retire contract pool", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization, + }, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + }); + + it("Set retire contract pool without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + failOnStatusCode: false, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Set retire contract pool with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Set retire contract pool with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization: "", + }, + failOnStatusCode: false, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Set retire contract pool as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.PoolContract, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + body: { + tokens: [ + { + token: tokenId, + count: 1 + } + ], + immediately: false + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/contracts/syncPools.cy.js b/e2e-tests/cypress/e2e/api-tests/contracts/syncPools.cy.js new file mode 100644 index 0000000000..048910c9cd --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/contracts/syncPools.cy.js @@ -0,0 +1,154 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Contracts", { tags: ['contracts', 'firstPool'] }, () => { + const authorization = Cypress.env("authorization"); + const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPoolsTests"; + const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPoolsTests"; + const tokenName = Math.floor(Math.random() * 999) + "TokenName"; + let rConractId, tokenId, rConractUuid; + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameR, + "type": "RETIRE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + rConractUuid = response.body.id; + rConractId = response.body.contractId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfContracts, + headers: { + authorization, + }, + body: { + "description": contractNameW, + "type": "WIPE", + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + let wConractId = response.body.contractId; + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + body: { + draftToken: false, + tokenName: tokenName, + tokenSymbol: "tn", + tokenType: "fungible", + decimals: "2", + initialSupply: "0", + enableAdmin: true, + changeSupply: true, + enableFreeze: false, + enableKYC: false, + enableWipe: true, + wipeContractId: wConractId, + tokenId: null + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }); + }); + }) + }); + }) + + it("Sync retire contract pools", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.SyncPools, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }) + }); + + it("Sync retire contract pools without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.SyncPools, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Sync retire contract pools with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.SyncPools, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Sync retire contract pools with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.SyncPools, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Sync retire contract pools as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.RetireContract + rConractUuid + "/" + API.SyncPools, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/demo/getRandomKey.cy.js b/e2e-tests/cypress/e2e/api-tests/demo/getRandomKey.cy.js index 6a2bfc3d62..f0fc1ff56d 100644 --- a/e2e-tests/cypress/e2e/api-tests/demo/getRandomKey.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/demo/getRandomKey.cy.js @@ -1,17 +1,54 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Demo", { tags: '@demo' }, () => { +context("Demo", { tags: ['demo', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); + it("Generates a new Hedera account with a random private key", () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.RandomKey, headers: {authorization }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body).to.have.property("id"); - expect(resp.body).to.have.property("key"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).to.have.property("id"); + expect(response.body).to.have.property("key"); + }); + }); + + it("Generates a new Hedera account with a random private key without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Generates a new Hedera account with a random private key with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Generates a new Hedera account with a random private key with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/demo/getRegisteredUsers.cy.js b/e2e-tests/cypress/e2e/api-tests/demo/getRegisteredUsers.cy.js new file mode 100644 index 0000000000..b169ddfebe --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/demo/getRegisteredUsers.cy.js @@ -0,0 +1,17 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Demo", { tags: ['demo', 'secondPool'] }, () => { + + it("Returns list of registered users", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RegUsers, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.at(0)).to.have.property("username"); + expect(response.body.at(0)).to.have.property("role"); + expect(response.body.at(0)).to.have.property("policyRoles"); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/external/postExternal.cy.js b/e2e-tests/cypress/e2e/api-tests/external/postExternal.cy.js index b5c3915f61..4c6ccad86c 100644 --- a/e2e-tests/cypress/e2e/api-tests/external/postExternal.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/external/postExternal.cy.js @@ -1,50 +1,50 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("External", { tags: '@external' }, () => { - const authorization = Cypress.env("authorization"); +context("External", { tags: ['external', 'thirdPool'] }, () => { + const authorization = Cypress.env("authorization"); + let policyTag, owner before(() => { + cy.request({ - method: "POST", - url: `${API.ApiServer}policies/import/message`, - body: { messageId: (Cypress.env('irec_policy'))}, //iRec3 + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { messageId: (Cypress.env('irec_policy')) }, //iRec3 headers: { authorization, }, - timeout: 180000, + timeout: 240000, }).then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }); - }); - - it("should sends data from an external source", () => { cy.request({ method: METHOD.GET, - url: API.ApiServer + "policies", + url: API.ApiServer + API.Policies, headers: { authorization, }, - }).then((resp) => { - const policyTag = resp.body[0].policyTag; - const owner = resp.body[0].owner; + }).then((response) => { + policyTag = response.body[0].policyTag; + owner = response.body[0].owner; + }) + + }); - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.External, - body: { - owner: owner, - policyTag: policyTag, - document: {}, - }, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.OK); - }); + it("Sends data from an external source", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.External, + body: { + owner: owner, + policyTag: policyTag, + document: {}, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql(true); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/ipfs/addAndGetFileIPFS.cy.js b/e2e-tests/cypress/e2e/api-tests/ipfs/addAndGetFileIPFS.cy.js new file mode 100644 index 0000000000..ce8bded7b9 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/ipfs/addAndGetFileIPFS.cy.js @@ -0,0 +1,123 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("IPFS", { tags: ['ipfs', 'secondPool'] }, () => { + const authorization = Cypress.env("authorization"); + let cid + + it("Add file to ipfs", () => { + cy.fixture("testJson.json") + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile, + body: file, + headers: { + "content-type": "binary/octet-stream", + authorization, + }, + timeout: 200000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + cy.writeFile( + "cypress/fixtures/testJsonCid", + response.body + ); + + }); + }); + }); + + it("Add file to ipfs without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add file to ipfs with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add file to ipfs with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile, + headers: { + authorization: "", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + + it("Get file from ipfs", () => { + cy.fixture("testJsonCid") + .then((cid) => { + cid = cid + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + cid, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let body = JSON.parse(response.body) + expect(body.yellow).eql("sun"); + expect(body.green).eql("grass"); + }); + }) + }); + + + it("Get file from ipfs without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + cid, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get file from ipfs with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + cid, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get file from ipfs with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + cid, + headers: { + authorization: "", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); +}); \ No newline at end of file diff --git a/e2e-tests/cypress/e2e/api-tests/ipfs/addAndGetFileIPFSDryRun.cy.js b/e2e-tests/cypress/e2e/api-tests/ipfs/addAndGetFileIPFSDryRun.cy.js new file mode 100644 index 0000000000..aadb35e631 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/ipfs/addAndGetFileIPFSDryRun.cy.js @@ -0,0 +1,146 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("IPFS", { tags: ['ipfs', 'secondPool'] }, () => { + + const authorization = Cypress.env("authorization"); + let cid, policyId; + + before("Import and dry-run policy", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { messageId: "1707125414.999819805" }, //iRec2 + headers: { + authorization, + }, + timeout: 180000, + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.id; + cy.request({ + method: METHOD.PUT, + url: + API.ApiServer + API.Policies + policyId + "/" + API.DryRun, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }); + }); + }); + + it("Add file from ipfs for dry run mode", () => { + cy.fixture("testJsonDR.json").then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile + API.DryRun + "/" + policyId, + body: file, + headers: { + "content-type": "binary/octet-stream", + authorization, + }, + timeout: 200000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + cy.writeFile( + "cypress/fixtures/testJsonDRCid", + response.body + ); + + }); + }) + }) + + it("Add file from ipfs for dry run mode without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile + API.DryRun + "/" + policyId, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add file from ipfs for dry run mode with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile + API.DryRun + "/" + policyId, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Add file from ipfs for dry run mode with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.IPFSFile + API.DryRun + "/" + policyId, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get file from ipfs for dry run mode", () => { + cy.fixture("testJsonC id") + .then((cid) => { + cid = cid + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + "/" + cid + API.DryRun, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let body = JSON.parse(response.body) + expect(body.red).eql("rose"); + expect(body.blue).eql("grass"); + }); + }) + }); + + it("Get file from ipfs for dry run mode without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + cid, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get file from ipfs for dry run mode with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + cid, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Get file from ipfs for dry run mode with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.IPFSFile + cid, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }) + }) +}) \ No newline at end of file diff --git a/e2e-tests/cypress/e2e/api-tests/ipfs/postIPFS.cy.js b/e2e-tests/cypress/e2e/api-tests/ipfs/postIPFS.cy.js deleted file mode 100644 index f933b08c06..0000000000 --- a/e2e-tests/cypress/e2e/api-tests/ipfs/postIPFS.cy.js +++ /dev/null @@ -1,57 +0,0 @@ -import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; -import API from "../../../support/ApiUrls"; - -context("IPFS", { tags: '@ipfs' }, () => { - const authorization = Cypress.env("authorization"); - - before(() => { - cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Schemas, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).eql(STATUS_CODE.OK); - let schemaId = response.body[0].id; - - cy.request({ - method: METHOD.GET, - url: API.ApiServer + API.Schemas + schemaId + "/export/file", - encoding: null, - headers: { - authorization, - }, - }).then((response) => { - expect(response.status).to.eq(200); - let schema = Cypress.Blob.arrayBufferToBinaryString( - response.body - ); - cy.writeFile( - "cypress/fixtures/exportedSchema.schema", - schema, - "binary" - ); - }); - }); - }); - - it("Add file to ipfs", () => { - cy.fixture("exportedSchema.schema", "binary") - .then((binary) => Cypress.Blob.binaryStringToBlob(binary)) - .then((file) => { - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.IPFSFile, - body: file, - headers: { - "content-type": "binary/octet-stream", - authorization, - }, - timeout: 200000 - }).then((response) => { - expect(response.status).eql(STATUS_CODE.SUCCESS); - }); - }); - }); -}); diff --git a/e2e-tests/cypress/e2e/api-tests/logs/getLogsAndAttributes.cy.js b/e2e-tests/cypress/e2e/api-tests/logs/getLogsAndAttributes.cy.js new file mode 100644 index 0000000000..2bfe0e120e --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/logs/getLogsAndAttributes.cy.js @@ -0,0 +1,131 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Logs", { tags: ['logs', 'thirdPool'] }, () => { + const authorization = Cypress.env("authorization"); + let workerName, workersNumber; + + it("Returns logs attributes", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Logs, + headers: { + authorization, + }, + }).then((response) => { + for (let i = 0; i < response.body.logs.length; i++) { + if (response.body.logs.at(i).attributes.length === 2) + workerName = response.body.logs.at(i).attributes.at(0) + } + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.logs.at(0)).to.have.property("id"); + expect(response.body.logs.at(0)).to.have.property("attributes"); + }); + }); + + + it("Returns logs attributes without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Logs, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns logs attributes with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Logs, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns logs attributes with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Logs, + headers: { + authorization: "", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns logs with name", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.LogsAttributes, + headers: { + authorization, + }, + qs: { + name: "WORKER" + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + workersNumber = response.body.length - 1; + }); + }); + + it("Returns logs with name exclude someone", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.LogsAttributes, + headers: { + authorization, + }, + qs: { + name: "WORKER", + existingAttributes: workerName + } + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(workersNumber).eql(response.body.length); + }); + }); + + it("Returns logs without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.LogsAttributes, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns logs with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.LogsAttributes, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns logs with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.LogsAttributes, + headers: { + authorization: "", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/logs/postLogs.cy.js b/e2e-tests/cypress/e2e/api-tests/logs/postLogs.cy.js deleted file mode 100644 index a51e0b1829..0000000000 --- a/e2e-tests/cypress/e2e/api-tests/logs/postLogs.cy.js +++ /dev/null @@ -1,18 +0,0 @@ -import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; -import API from "../../../support/ApiUrls"; - -context("Logs", { tags: '@logs' }, () => { - const authorization = Cypress.env("authorization"); - - it("Return logs", () => { - cy.request({ - method: METHOD.POST, - url: API.ApiServer + API.Logs, - headers: { - authorization, - }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - }); - }); -}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/deleteModule.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/deleteModule.cy.js new file mode 100644 index 0000000000..fe03a4cd4b --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/deleteModule.cy.js @@ -0,0 +1,136 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] }, () => { + const authorization = Cypress.env("authorization"); + let moduleId; + const moduleName = Math.floor(Math.random() * 999) + "APIModule"; + + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules, + headers: { + authorization, + }, + body: { + "name": moduleName, + "description": moduleName, + "menu": "show", + "config": { + "blockType": "module" + } + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleId = response.body.uuid; + }); + }); + + it("Deletes the module with the provided module ID with invalid artifact id - Negative", () => { + cy.request({ + method: METHOD.DELETE, + url: API.ApiServer + API.ListOfAllModules + "21231231321321321", + headers: { + authorization, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + expect(response.body.message).eql("Invalid module"); + }); + }); + + it("Deletes the module with the provided module ID by user - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = response.body.accessToken + cy.request({ + url: API.ApiServer + API.ListOfAllModules + moduleId, + method: METHOD.DELETE, + headers: { + authorization: "Bearer " + accessToken, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }) + }); + + it("Deletes the module with the provided module ID without auth token - Negative", () => { + cy.request({ + url: API.ApiServer + API.ListOfAllModules + moduleId, + method: METHOD.DELETE, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Deletes the module with the provided module ID with invalid auth token - Negative", () => { + cy.request({ + url: API.ApiServer + API.ListOfAllModules + moduleId, + method: METHOD.DELETE, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Deletes the module with the provided module ID with empty auth token - Negative", () => { + cy.request({ + url: API.ApiServer + API.ListOfAllModules + moduleId, + method: METHOD.DELETE, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Deletes the module with the provided module ID", { tags: ['smoke'] }, () => { + cy.request({ + url: API.ApiServer + API.ListOfAllModules + moduleId, + method: METHOD.DELETE, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + + it("Deletes already deleted module - Negative", () => { + cy.request({ + url: API.ApiServer + API.ListOfAllModules + moduleId, + method: METHOD.DELETE, + headers: { + authorization, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + expect(response.body.message).eql("Invalid module"); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/exportModuleFile.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/exportModuleFile.cy.js new file mode 100644 index 0000000000..8b36bcd8f2 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/exportModuleFile.cy.js @@ -0,0 +1,111 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] },() => { + const authorization = Cypress.env("authorization"); + const moduleName = Math.floor(Math.random() * 999) + "APIModuleExp"; + let moduleUuid; + + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules, + headers: { + authorization, + }, + body: { + "name": moduleName, + "description": moduleName, + "menu": "show", + "config": { + "blockType": "module" + } + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleUuid = response.body.uuid; + }); + }); + + it("Returns a zip file containing the published module and all associated artifacts, i.e. schemas and VCs", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportFile, + headers: { + authorization, + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).to.be.not.eql(""); + }); + }); + + it("Returns a zip file containing the published module and all associated artifacts, i.e. schemas and VCs as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportFile, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Returns a zip file containing the published module and all associated artifacts, i.e. schemas and VCs without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportFile, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns a zip file containing the published module and all associated artifacts, i.e. schemas and VCs with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportFile, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns a zip file containing the published module and all associated artifacts, i.e. schemas and VCs with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportFile, + headers: { + authorization: "", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/exportModuleIPFS.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/exportModuleIPFS.cy.js new file mode 100644 index 0000000000..81ee89d913 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/exportModuleIPFS.cy.js @@ -0,0 +1,111 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] },() => { + const authorization = Cypress.env("authorization"); + const moduleName = Math.floor(Math.random() * 999) + "APIModuleExp"; + let moduleUuid; + + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules, + headers: { + authorization, + }, + body: { + "name": moduleName, + "description": moduleName, + "menu": "show", + "config": { + "blockType": "module" + } + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleUuid = response.body.uuid; + }); + }); + + it("Returns the Hedera message ID for the specified module published onto IPFS", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportMessage, + headers: { + authorization, + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).to.be.not.eql(""); + }); + }); + + it("Returns the Hedera message ID for the specified module published onto IPFS as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportMessage, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Returns the Hedera message ID for the specified module published onto IPFS without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportMessage, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns the Hedera message ID for the specified module published onto IPFS with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportMessage, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns the Hedera message ID for the specified module published onto IPFS with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid + "/" + API.ExportMessage, + headers: { + authorization: "", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/getAllModules.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/getAllModules.cy.js index 1e0b438b09..f94b7c5cf7 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/getAllModules.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/getAllModules.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); it("Get list of modules", () => { cy.request({ @@ -10,12 +10,12 @@ context("Modules", { tags: '@modules' },() => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - if (resp.body.length != 0) { - expect(resp.body.at(-1)).to.have.property("_id"); - expect(resp.body.at(-1)).to.have.property("uuid"); - expect(resp.body.at(-1)).to.have.property("status"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + if (response.body.length != 0) { + expect(response.body.at(-1)).to.have.property("_id"); + expect(response.body.at(-1)).to.have.property("uuid"); + expect(response.body.at(-1)).to.have.property("status"); } }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/getFile.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/getFile.cy.js index d77a6b6426..0b35895517 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/getFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/getFile.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); const moduleName = Math.floor(Math.random() * 999) + "APIModule"; let moduleId; @@ -20,9 +20,9 @@ context("Modules", { tags: '@modules' },() => { "blockType": "module" } }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - moduleId = resp.body.uuid; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleId = response.body.uuid; }); }); @@ -33,9 +33,9 @@ context("Modules", { tags: '@modules' },() => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body).to.not.be.oneOf([null, ""]); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).to.not.be.oneOf([null, ""]); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/getMessage.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/getMessage.cy.js index 79467e3699..0cab59df45 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/getMessage.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/getMessage.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); const moduleName = Math.floor(Math.random() * 999) + "APIModule"; let moduleId; @@ -20,9 +20,9 @@ context("Modules", { tags: '@modules' },() => { "blockType": "module" } }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - moduleId = resp.body.uuid; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleId = response.body.uuid; }); }); @@ -33,12 +33,12 @@ context("Modules", { tags: '@modules' },() => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body).to.have.property("uuid", moduleId); - expect(resp.body).to.have.property("name", moduleName); - expect(resp.body).to.have.property("description", moduleName); - expect(resp.body).to.have.property("owner"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).to.have.property("uuid", moduleId); + expect(response.body).to.have.property("name", moduleName); + expect(response.body).to.have.property("description", moduleName); + expect(response.body).to.have.property("owner"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/getModuleConfiguration.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/getModuleConfiguration.cy.js index d7bde9147d..0a6a0debf1 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/getModuleConfiguration.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/getModuleConfiguration.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); const moduleName = Math.floor(Math.random() * 999) + "APIModule"; let moduleId; @@ -20,9 +20,9 @@ context("Modules", { tags: '@modules' },() => { "blockType": "module" } }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - moduleId = resp.body.uuid; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleId = response.body.uuid; }); }); @@ -33,12 +33,12 @@ context("Modules", { tags: '@modules' },() => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body).to.have.property("_id"); - expect(resp.body).to.have.property("name", moduleName); - expect(resp.body).to.have.property("description", moduleName); - expect(resp.body).to.have.property("status", "DRAFT"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).to.have.property("_id"); + expect(response.body).to.have.property("name", moduleName); + expect(response.body).to.have.property("description", moduleName); + expect(response.body).to.have.property("status", "DRAFT"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/logs/getAttributes.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/getModuleSchemas.cy.js similarity index 53% rename from e2e-tests/cypress/e2e/api-tests/logs/getAttributes.cy.js rename to e2e-tests/cypress/e2e/api-tests/modules/getModuleSchemas.cy.js index 6d9adfb778..6cfb99eca2 100644 --- a/e2e-tests/cypress/e2e/api-tests/logs/getAttributes.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/getModuleSchemas.cy.js @@ -1,19 +1,18 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Logs", { tags: '@logs' }, () => { +context("Modules", { tags: ['modules', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); - it("Returns logs attributes", () => { + it("Get modules schemas", () => { cy.request({ method: METHOD.GET, - url: API.ApiServer + API.LogsAttributes, + url: API.ApiServer + API.ListOfAllModules + API.Schemas, headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body).to.not.be.oneOf([null, ""]); + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/getModules.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/getModules.cy.js index bcbc65c946..4c29522809 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/getModules.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/getModules.cy.js @@ -1,21 +1,21 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); - it("Get modules menu", () => { + it("Get modules menu", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.ListOfModules, headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - if (resp.body.length != 0) { - expect(resp.body.at(-1)).to.have.property("_id"); - expect(resp.body.at(-1)).to.have.property("uuid"); - expect(resp.body.at(-1)).to.have.property("status"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + if (response.body.length != 0) { + expect(response.body.at(-1)).to.have.property("_id"); + expect(response.body.at(-1)).to.have.property("uuid"); + expect(response.body.at(-1)).to.have.property("status"); } }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/getModulesMenu.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/getModulesMenu.cy.js new file mode 100644 index 0000000000..3892d5449c --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/getModulesMenu.cy.js @@ -0,0 +1,91 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] },() => { + + const authorization = Cypress.env("authorization"); + + it("Returns modules menu", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfModulesMenu, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + if (response.body.length != 0) { + expect(response.body.at(-1)).to.have.property("_id"); + expect(response.body.at(-1)).to.have.property("uuid"); + expect(response.body.at(-1)).to.have.property("status"); + } + }); + }); + + it("Returns modules menu as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfModulesMenu, + headers: { + authorization: accessToken + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Returns modules menu without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfModulesMenu, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns modules menu with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfModulesMenu, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Returns modules menu with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfModulesMenu, + headers: { + authorization: "", + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/importModuleFile.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/importModuleFile.cy.js new file mode 100644 index 0000000000..44d35386c1 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/importModuleFile.cy.js @@ -0,0 +1,113 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] }, () => { + const authorization = Cypress.env("authorization"); + + it("Imports new module and all associated artifacts", () => { + cy.fixture("importDraftModule.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportFile, + body: file, + headers: { + "content-type": "binary/octet-stream", + authorization, + }, + timeout: 180000, + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }); + }); + }); + + it("Imports new module and all associated artifacts as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.fixture("importDraftModule.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportFile, + headers: { + "content-type": "binary/octet-stream", + authorization: accessToken + }, + body: file, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + }); + + it("Imports new module and all associated artifacts without auth token - Negative", () => { + cy.fixture("importDraftModule.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportFile, + body: file, + headers: { + "content-type": "binary/octet-stream", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }); + + it("Imports new module and all associated artifacts with invalid auth token - Negative", () => { + cy.fixture("importDraftModule.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportFile, + headers: { + "content-type": "binary/octet-stream", + authorization: "Bearer qwe", + }, + body: file, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }); + + it("Imports new module and all associated artifacts with empty auth token - Negative", () => { + cy.fixture("importDraftModule.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportFile, + headers: { + "content-type": "binary/octet-stream", + authorization: "", + }, + body: file, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/importModuleIPFS.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/importModuleIPFS.cy.js new file mode 100644 index 0000000000..51770310e8 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/importModuleIPFS.cy.js @@ -0,0 +1,137 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] },() => { + const authorization = Cypress.env("authorization"); + + it("Imports new module and all associated artifacts from IPFS into the local DB", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, + headers: { + authorization, + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + timeout: 180000 + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + expect(response.body).to.have.property("name"); + expect(response.body).to.have.property("description"); + expect(response.body).to.have.property("creator"); + expect(response.body).to.have.property("owner"); + expect(response.body.config.blockType).eql("module"); + }); + }); + + it("Imports new module and all associated artifacts from IPFS into the local DB as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, + headers: { + authorization: accessToken + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Imports new module and all associated artifacts from IPFS into the local DB without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Imports new module and all associated artifacts from IPFS into the local DB with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, + headers: { + authorization: "Bearer wqe", + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Imports new module and all associated artifacts from IPFS into the local DB with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, + headers: { + authorization: "", + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Imports new module and all associated artifacts from IPFS into the local DB with invalid message id - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, + headers: { + authorization, + }, + body: { + "messageId": Cypress.env('module_for_import') + "777121" + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + expect(response.body.message).eql("Request failed with status code 400"); + }); + }); + + it("Imports new module and all associated artifacts from IPFS into the local DB with empty message id - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, + headers: { + authorization, + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNPROCESSABLE); + expect(response.body.message).eql("Message ID in body is empty"); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleFile.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleFile.cy.js index 3e02ceb3ea..09294850dc 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleFile.cy.js @@ -1,10 +1,10 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); - it("Import module from IPFS", () => { + it("Import module from IPFS", { tags: ['smoke'] }, () => { cy.fixture("module_1682969031678.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) .then((file) => { cy.request({ @@ -17,7 +17,7 @@ context("Modules", { tags: '@modules' },() => { }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleIPFS.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleIPFS.cy.js index d4bb2c20d5..97038b0364 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleIPFS.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/postImportModuleIPFS.cy.js @@ -1,10 +1,10 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); - it("import module ipfs", () => { + it("import module ipfs", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.POST, url: API.ApiServer + API.ListOfAllModules + API.ImportMessage, @@ -15,8 +15,8 @@ context("Modules", { tags: '@modules' },() => { "messageId": Cypress.env('module_for_import') }, timeout: 180000 - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/postModule.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/postModule.cy.js index 01682b470a..6d5516d31b 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/postModule.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/postModule.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); const moduleName = Math.floor(Math.random() * 999) + "APIModule"; it("Create a new module", () => { @@ -19,12 +19,12 @@ context("Modules", { tags: '@modules' },() => { "blockType": "module" } }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - expect(resp.body).to.have.property("_id"); - expect(resp.body).to.have.property("name", moduleName); - expect(resp.body).to.have.property("description", moduleName); - expect(resp.body).to.have.property("status", "DRAFT"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + expect(response.body).to.have.property("_id"); + expect(response.body).to.have.property("name", moduleName); + expect(response.body).to.have.property("description", moduleName); + expect(response.body).to.have.property("status", "DRAFT"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleFile.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleFile.cy.js index d847081047..942ea26fbd 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleFile.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); it("Preview the module from IPFS", () => { @@ -16,8 +16,8 @@ context("Modules", { tags: '@modules' },() => { authorization, }, timeout: 180000, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleMessage.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleMessage.cy.js index d986f6cd9e..900f53bf69 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleMessage.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/postPreviewModuleMessage.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); it("Preview the module from IPFS", () => { @@ -14,10 +14,10 @@ context("Modules", { tags: '@modules' },() => { body: { "messageId": Cypress.env('module_for_import') }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body.module).to.have.property("name"); - expect(resp.body.module).to.have.property("description"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.module).to.have.property("name"); + expect(response.body.module).to.have.property("description"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/previewModuleFile.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/previewModuleFile.cy.js new file mode 100644 index 0000000000..0082193c26 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/previewModuleFile.cy.js @@ -0,0 +1,140 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] }, () => { + const authorization = Cypress.env("authorization"); + + it("Previews the module from a zip file without loading it into the local DB", () => { + cy.fixture("module_1682969031678.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportFilePreview, + headers: { + "content-type": "binary/octet-stream", + authorization, + }, + body: file, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let responseJson = JSON.parse(Cypress.Blob.arrayBufferToBinaryString(response.body)) + expect(responseJson.module).to.have.property("name"); + expect(responseJson.module).to.have.property("description"); + expect(responseJson.module).to.have.property("creator"); + expect(responseJson.module).to.have.property("owner"); + expect(responseJson.module.config.blockType).eql("module"); + }); + }) + }); + + it("Previews the module from a zip file without loading it into the local DB as User - Negative", () => { + cy.fixture("module_1682969031678.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportFilePreview, + headers: { + "content-type": "binary/octet-stream", + authorization: accessToken, + }, + body: file, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + + }) + }); + + it("Previews the module from a zip file without loading it into the local DB without auth token - Negative", () => { + cy.fixture("module_1682969031678.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportFilePreview, + body: file, + headers: { + "content-type": "binary/octet-stream", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }) + }); + + it("Previews the module from a zip file without loading it into the local DB with invalid auth token - Negative", () => { + cy.fixture("module_1682969031678.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportFilePreview, + headers: { + authorization: "Bearer wqe", + }, + body: file, + headers: { + "content-type": "binary/octet-stream", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }) + }); + + it("Previews the module from a zip file without loading it into the local DB with empty auth token - Negative", () => { + cy.fixture("module_1682969031678.module", "binary").then((binary) => Cypress.Blob.binaryStringToBlob(binary)) + .then((file) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportFilePreview, + headers: { + authorization: "", + }, + body: file, + headers: { + "content-type": "binary/octet-stream", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }) + }); + + it("Previews the module from a zip file without loading it into the local DB with empty file - Negative", () => { + let file + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportFilePreview, + headers: { + "content-type": "binary/octet-stream", + authorization, + }, + body: file, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + expect(response.body.message).eql("End of data reached (data length = 0, asked index = 4). Corrupted zip ?"); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/previewModuleIPFS.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/previewModuleIPFS.cy.js new file mode 100644 index 0000000000..5c7cbfd68e --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/previewModuleIPFS.cy.js @@ -0,0 +1,136 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] },() => { + const authorization = Cypress.env("authorization"); + + it("Previews the module from IPFS without loading it into the local DB", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportMessagePreview, + headers: { + authorization, + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body.module).to.have.property("name"); + expect(response.body.module).to.have.property("description"); + expect(response.body.module).to.have.property("creator"); + expect(response.body.module).to.have.property("owner"); + expect(response.body.module.config.blockType).eql("module"); + }); + }); + + it("Previews the module from IPFS without loading it into the local DB as User - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportMessagePreview, + headers: { + authorization: accessToken + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }); + }); + + it("Previews the module from IPFS without loading it into the local DB without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportMessagePreview, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Previews the module from IPFS without loading it into the local DB with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportMessagePreview, + headers: { + authorization: "Bearer wqe", + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Previews the module from IPFS without loading it into the local DB with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportMessagePreview, + headers: { + authorization: "", + }, + body: { + "messageId": Cypress.env('module_for_import') + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Previews the module from IPFS without loading it into the local DB with invalid message id - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportMessagePreview, + headers: { + authorization, + }, + body: { + "messageId": Cypress.env('module_for_import') + "777121" + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + expect(response.body.message).eql("Request failed with status code 400"); + }); + }); + + it("Previews the module from IPFS without loading it into the local DB with empty message id - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ModuleImportMessagePreview, + headers: { + authorization, + }, + failOnStatusCode:false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNPROCESSABLE); + expect(response.body.message).eql("Message ID in body is empty"); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/putModule.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/putModule.cy.js index 0535feaa11..45f3fd086a 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/putModule.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/putModule.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); const moduleName = Math.floor(Math.random() * 999) + "APIModuleForEdit"; let moduleId; @@ -21,9 +21,9 @@ context("Modules", { tags: '@modules' },() => { "blockType": "module" } }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - moduleId = resp.body.uuid; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleId = response.body.uuid; }); }); @@ -42,12 +42,12 @@ context("Modules", { tags: '@modules' },() => { "blockType": "module" } }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - expect(resp.body).to.have.property("_id"); - expect(resp.body).to.have.property("name", moduleName + "Test"); - expect(resp.body).to.have.property("description", moduleName + "Test2"); - expect(resp.body).to.have.property("status", "DRAFT"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + expect(response.body).to.have.property("_id"); + expect(response.body).to.have.property("name", moduleName + "Test"); + expect(response.body).to.have.property("description", moduleName + "Test2"); + expect(response.body).to.have.property("status", "DRAFT"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/putPublishModules.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/putPublishModules.cy.js index 5733469166..6c3799d0eb 100644 --- a/e2e-tests/cypress/e2e/api-tests/modules/putPublishModules.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/modules/putPublishModules.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Modules", { tags: '@modules' },() => { +context("Modules", { tags: ['modules', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); const moduleName = Math.floor(Math.random() * 999) + "APIModuleForPublish"; let moduleId; @@ -21,9 +21,9 @@ context("Modules", { tags: '@modules' },() => { "blockType": "module" } }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.SUCCESS); - moduleId = resp.body.uuid; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleId = response.body.uuid; }); }); @@ -34,8 +34,8 @@ context("Modules", { tags: '@modules' },() => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/modules/validateModule.cy.js b/e2e-tests/cypress/e2e/api-tests/modules/validateModule.cy.js new file mode 100644 index 0000000000..dbd48dfd97 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/modules/validateModule.cy.js @@ -0,0 +1,104 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Modules", { tags: ['modules', 'thirdPool'] }, () => { + const authorization = Cypress.env("authorization"); + const moduleName = Math.floor(Math.random() * 999) + "APIModule"; + let moduleUuid, moduleConfiguration; + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules, + headers: { + authorization, + }, + body: { + "name": moduleName, + "description": moduleName, + "menu": "show", + "config": { + "blockType": "module", + "tag": "Module", + "name": moduleName, + "description": moduleName, + "id": "b7bb3805-e7e4-4723-8586-2f987bb4eac8" + } + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.SUCCESS); + moduleUuid = response.body.uuid + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + moduleUuid, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + moduleConfiguration = response.body; + delete moduleConfiguration["configFileId"]; + delete moduleConfiguration["type"]; + delete moduleConfiguration["updateDate"]; + delete moduleConfiguration["_id"]; + }); + }); + }); + + it("Validates selected module", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.ListOfAllModules + API.Validate, + headers: { + authorization, + }, + body: moduleConfiguration, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + }); + }); + + it("Validates selected module without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + API.Validate, + body: { + moduleConfiguration + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Validates selected module with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + API.Validate, + headers: { + authorization: "Bearer wqe", + }, + body: { + moduleConfiguration + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Validates selected module with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfAllModules + API.Validate, + headers: { + authorization: "", + }, + body: { + moduleConfiguration + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportFile.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportFile.cy.js index 7afa8d71a8..1e4bccc467 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportFile.cy.js @@ -3,36 +3,36 @@ import API from "../../../support/ApiUrls"; -context("Policies", { tags: '@policies' },() => { +context("Policies", { tags: ['policies', 'secondPool'] },() => { const authorization = Cypress.env("authorization"); before(() => { cy.request({ - method: "POST", - url: `${API.ApiServer}policies/import/message`, + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, body: { messageId: "1707125414.999819805" }, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }); }); it("Get the Hedera message ID for the specified policy", () => { cy.request({ - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); let policyId = response.body.at(-1).id; const url = { - method: "GET", + method: METHOD.GET, url: API.ApiServer + "policies/" + @@ -44,7 +44,7 @@ context("Policies", { tags: '@policies' },() => { }, }; cy.request(url).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.not.be.oneOf([null, ""]); let policy = Cypress.Blob.arrayBufferToBinaryString( response.body diff --git a/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportMessage.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportMessage.cy.js index 8a603f4a6e..24e455ea92 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportMessage.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/GetPoliciesAndExportMessage.cy.js @@ -3,40 +3,40 @@ import API from "../../../support/ApiUrls"; -context("Policies", { tags: '@policies' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { cy.request({ - method: "POST", - url: `${API.ApiServer}policies/import/message`, + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, body: { messageId: "1707125414.999819805" }, //Verra REDD 4 headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }); }); it("export policy message", () => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, }; cy.request(urlPolicies).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(-1).id; const name = response.body.at(-1).name; const owner = response.body.at(-1).owner; const description = response.body.at(-1).description; const url = { - method: "GET", + method: METHOD.GET, url: API.ApiServer + "policies/" + @@ -47,7 +47,7 @@ context("Policies", { tags: '@policies' }, () => { }, }; cy.request(url).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.have.property("id", policyId); expect(response.body).to.have.property("name", name); expect(response.body).to.have.property( diff --git a/e2e-tests/cypress/e2e/api-tests/policies/deletePolicy.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/deletePolicy.cy.js new file mode 100644 index 0000000000..c54a2279bd --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/policies/deletePolicy.cy.js @@ -0,0 +1,101 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context("Policies", { tags: ['policies', 'secondPool'] }, () => { + const authorization = Cypress.env("authorization"); + let policyId; + + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { messageId: "1707125414.999819805" }, //iRec2 + headers: { + authorization, + }, + timeout: 180000, + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }); + }); + + it("Deletes the policy with the provided ID by user - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = response.body.accessToken + cy.request({ + url: API.ApiServer + API.Policies + API.Async + policyId, + method: METHOD.DELETE, + headers: { + authorization: "Bearer " + accessToken, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }) + }); + + it("Deletes the policy with the provided ID without auth token - Negative", () => { + cy.request({ + url: API.ApiServer + API.Policies + API.Async + policyId, + method: METHOD.DELETE, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Deletes the policy with the provided ID with invalid auth token - Negative", () => { + cy.request({ + url: API.ApiServer + API.Policies + API.Async + policyId, + method: METHOD.DELETE, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Deletes the policy with the provided ID with empty auth token - Negative", () => { + cy.request({ + url: API.ApiServer + API.Policies + API.Async + policyId, + method: METHOD.DELETE, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Deletes the policy with the provided ID", { tags: ['smoke'] }, () => { + cy.request({ + url: API.ApiServer + API.Policies + API.Async + policyId, + method: METHOD.DELETE, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ACCEPTED); + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/dryRunPolicies.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/dryRunPolicies.cy.js index 130f943a2f..f2b69694ef 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/dryRunPolicies.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/dryRunPolicies.cy.js @@ -2,12 +2,12 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Dry Run Policies", { tags: '@dry-run' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.PolicisImportMsg, body: { messageId: "1707125414.999819805" }, //iRec2 headers: { @@ -15,167 +15,161 @@ context("Dry Run Policies", { tags: '@dry-run' }, () => { }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }); }); - it("Run policy without making any persistent changes or executing transaction", () => { + it("Run policy without making any persistent changes or executing transaction", { tags: ['smoke'] }, () => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Policies, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; cy.request({ - method: "PUT", + method: METHOD.PUT, url: - API.ApiServer + - "policies/" + + API.ApiServer + API.Policies + policyId + "/dry-run", headers: { authorization, }, + timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); it("Get all virtual users", () => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Policies, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; cy.request({ - method: "GET", + method: METHOD.GET, url: - API.ApiServer + - "policies/" + + API.ApiServer + API.Policies + policyId + "/dry-run/users", headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); it("Get lists of virtual transactions", () => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Policies, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; cy.request({ - method: "GET", + method: METHOD.GET, url: - API.ApiServer + - "policies/" + + API.ApiServer + API.Policies + policyId + "/dry-run/transactions", headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); it("Get lists of virtual artifacts", () => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Policies, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; cy.request({ - method: "GET", + method: METHOD.GET, url: - API.ApiServer + - "policies/" + + API.ApiServer + API.Policies + policyId + "/dry-run/artifacts", headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); it("Get lists of virtual ipfs", () => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Policies, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; cy.request({ - method: "GET", + method: METHOD.GET, url: - API.ApiServer + - "policies/" + - policyId + - "/dry-run/ipfs", + API.ApiServer + API.Policies + + policyId + "/" + API.DryRun + API.IPFS, headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); it("Create a new virtual account and login", () => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Policies, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; cy.request({ - method: "POST", + method: METHOD.POST, url: - API.ApiServer + - "policies/" + + API.ApiServer + API.Policies + policyId + "/dry-run/user", headers: { @@ -186,7 +180,7 @@ context("Dry Run Policies", { tags: '@dry-run' }, () => { const did = response.body[0].did; cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + "policies/" + @@ -199,7 +193,7 @@ context("Dry Run Policies", { tags: '@dry-run' }, () => { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); @@ -207,28 +201,27 @@ context("Dry Run Policies", { tags: '@dry-run' }, () => { it("should restarts the execution of the policy and clear data in database", () => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Policies, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; cy.request({ - method: "POST", + method: METHOD.POST, url: - API.ApiServer + - "policies/" + + API.ApiServer + API.Policies + policyId + "/dry-run/restart", headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/getPolicies.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/getPolicies.cy.js index afd8bdde7f..69f9092192 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/getPolicies.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/getPolicies.cy.js @@ -2,7 +2,7 @@ import {METHOD, STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Policies', {tags: '@policies'}, () => { +context('Policies', { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env('authorization'); before(() => { @@ -20,9 +20,9 @@ context('Policies', {tags: '@policies'}, () => { }, timeout: 180000 }).then(response => { - expect(response.status).to.eq(201); - let firstPolicyId = response.body.at(0).id - let firstPolicyStatus = response.body.at(0).status + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + let firstPolicyId = response.body.at(-1).id + let firstPolicyStatus = response.body.at(-1).status expect(firstPolicyStatus).to.equal('DRAFT') cy.request({ method: 'PUT', @@ -32,9 +32,9 @@ context('Policies', {tags: '@policies'}, () => { timeout: 600000 }) .should((response) => { - let secondPolicyId = response.body.policies.at(0).id - let policyStatus = response.body.policies.at(0).status - expect(response.status).to.eq(200) + let secondPolicyId = response.body.policies.at(-1).id + let policyStatus = response.body.policies.at(-1).status + expect(response.status).to.eq(STATUS_CODE.OK) expect(firstPolicyId).to.equal(secondPolicyId) expect(policyStatus).to.equal('PUBLISH') }) @@ -52,7 +52,7 @@ context('Policies', {tags: '@policies'}, () => { cy.request(urlPolicies) .then((response) => { - expect(response.status).to.eq(200) + expect(response.status).to.eq(STATUS_CODE.OK) let createDate = response.body.at(-1).createDate let policyId = response.body.at(-1).id let policyUuid = response.body.at(-1).uuid diff --git a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocks.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocks.cy.js index c1a54e290c..d6b05e60e1 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocks.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocks.cy.js @@ -1,9 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; - - -context("Policies", { tags: '@policies' },() => { +context("Policies", { tags: ['policies', 'secondPool'] },() => { const authorization = Cypress.env("authorization"); before(() => { @@ -39,8 +37,8 @@ context("Policies", { tags: '@policies' },() => { it("Get data from the root policy block", () => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, @@ -48,11 +46,11 @@ context("Policies", { tags: '@policies' },() => { }; cy.request(urlPolicies).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; const url = { - method: "GET", + method: METHOD.GET, url: API.ApiServer + "policies/" + @@ -64,7 +62,7 @@ context("Policies", { tags: '@policies' },() => { timeout: 180000 }; cy.request(url).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.not.be.oneOf([null, ""]); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksData.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksData.cy.js index 1275ab9891..0fd11ba6c3 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksData.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksData.cy.js @@ -3,7 +3,7 @@ import API from "../../../support/ApiUrls"; -context("Policies",{ tags: '@policies' }, () => { +context("Policies",{ tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { @@ -39,8 +39,8 @@ context("Policies",{ tags: '@policies' }, () => { it("Get block data", () => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, @@ -53,7 +53,7 @@ context("Policies",{ tags: '@policies' }, () => { cy.request; const url = { - method: "GET", + method: METHOD.GET, url: API.ApiServer + "policies/" + @@ -66,7 +66,7 @@ context("Policies",{ tags: '@policies' }, () => { timeout: 180000 }; cy.request(url).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksTag.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksTag.cy.js index 43e26330f5..56088cbd38 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksTag.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesBlocksTag.cy.js @@ -2,7 +2,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Policies", { tags: '@policies' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { @@ -38,8 +38,8 @@ context("Policies", { tags: '@policies' }, () => { it("Get block data by tag", () => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, @@ -51,7 +51,7 @@ context("Policies", { tags: '@policies' }, () => { const tag = response.body.at(0).policyTag; const url = { - method: "GET", + method: METHOD.GET, url: API.ApiServer + "policies/" + @@ -64,7 +64,7 @@ context("Policies", { tags: '@policies' }, () => { timeout: 180000 }; cy.request(url).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesGroups.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesGroups.cy.js index d4fdc955d1..0dc86fc348 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesGroups.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/getPoliciesGroups.cy.js @@ -1,27 +1,25 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; - - -context("Policies", { tags: '@policies' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get a list of groups the user is a member of", () => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, }; cy.request(urlPolicies).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(-1).id; const urlPoliciesId = { - method: "GET", + method: METHOD.GET, url: API.ApiServer + "policies/" + @@ -33,7 +31,7 @@ context("Policies", { tags: '@policies' }, () => { timeout: 180000 }; cy.request(urlPoliciesId).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/getPolicyConfiguration.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/getPolicyConfiguration.cy.js new file mode 100644 index 0000000000..63a008f8b1 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/policies/getPolicyConfiguration.cy.js @@ -0,0 +1,71 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + +context('Policies', { tags: ['policies', 'secondPool'] }, () => { + const authorization = Cypress.env('authorization'); + let policyId; + + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { messageId: (Cypress.env('irec_policy')) }, + headers: { + authorization, + }, + timeout: 180000 + }).then((response) => { + policyId = response.body.at(0).id; + }) + }) + + it('Retrieves policy configuration for the specified policy ID', () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization, + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + expect(response.body.description).to.eq("iRec Description"); + expect(response.body.status).to.eq("DRAFT"); + }) + }) + + it("Retrieves policy configuration for the specified policy ID without auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Retrieves policy configuration for the specified policy ID with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Retrieves policy configuration for the specified policy ID with empty auth token - Negative", () => { + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); +}) diff --git a/e2e-tests/cypress/e2e/api-tests/policies/getPolicyId.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/getPolicyId.cy.js index 8b5779fe9d..667d5f81ce 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/getPolicyId.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/getPolicyId.cy.js @@ -2,21 +2,21 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Policies', { tags: '@policies' }, () => { +context('Policies', { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env('authorization'); it('Get policy configuration for the specified policy ID', () => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, }; cy.request(urlPolicies).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(0).id; @@ -28,7 +28,7 @@ context('Policies', { tags: '@policies' }, () => { }}; cy.request(urlPoliciesId) .then((response) => { - expect(response.status).to.eq(200) + expect(response.status).to.eq(STATUS_CODE.OK) expect(response.body.id).to.equal(policyId) let children = response.body.config.children diff --git a/e2e-tests/cypress/e2e/api-tests/policies/mintTokens.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/mintTokens.cy.js new file mode 100644 index 0000000000..f01dc6a77f --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/policies/mintTokens.cy.js @@ -0,0 +1,578 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; +import * as Checks from "../../../support/checkingMethods"; + +context("Policies", { tags: ['policies', 'secondPool'] }, () => { + const authorization = Cypress.env("authorization"); + const optionKey = "option"; + let username = Math.floor(Math.random() * 99999) + "UserContReqTests"; + let wContractId, tokenId, policyId, hederaId + let waitForApproveApplicationBlockId, deviceGridBlockId, issueRequestGridBlockId, approveRegistrantBtnBlockId; + + before("Create policy and register new user", () => { + //Import policy and save id + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { + "messageId": Cypress.env('policy_for_compare1')//iRec 4 + }, + headers: { + authorization, + }, + timeout: 180000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }) + + //Get token(Irec token) draft id to update it + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }).then(() => { + //Put wipe contract to token + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.ListOfTokens + API.Async, + headers: { + authorization, + }, + body: { + tokenId: tokenId, + wipeContractId: wContractId, + draftToken: true + } + }) + }).then(() => { + //Publish policy + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "/" + API.Publish, + body: { + policyVersion: "1.2.5" + }, + headers: { + authorization + }, + timeout: 600000 + }) + .then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }) + }) + + //Register new user + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountRegister, + body: { + username: username, + password: "test", + password_confirmation: "test", + role: "USER", + } + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + //Login and get PT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + //Get AT + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + //Get SR did + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.StandardRegistriesAggregated, + headers: { + authorization: accessToken + } + }).then((response) => { + let SRDid = response.body[0].did + //Get generated hedera creds + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.RandomKey, + headers: { authorization }, + }).then((response) => { + hederaId = response.body.id + let hederaAccountKey = response.body.key + //Update profile + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Profiles + username, + body: { + hederaAccountId: hederaId, + hederaAccountKey: hederaAccountKey, + parent: SRDid + }, + headers: { + authorization: accessToken + }, + timeout: 180000 + }) + }) + }) + }) + }) + }) + + it("Get blocks for waiting(approve app, device grid, issue grid) and token id", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.WaitForApproveApplication, + headers: { + authorization: accessToken + } + }).then((response) => { + waitForApproveApplicationBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.DeviceGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + deviceGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.IssueRequestGrid, + headers: { + authorization: accessToken + } + }).then((response) => { + issueRequestGridBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveRegistrantBtn, + headers: { + authorization + } + }).then((response) => { + approveRegistrantBtnBlockId = response.body.id + }) + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + tokenId = response.body.at(0).tokenId; + }) + }) + }) + }) + + it("Mint token", () => { + //Choose role + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ChooseRegistrantRole, + headers: { + authorization: accessToken + }, + body: { + role: "Registrant" + } + }) + + cy.wait(10000) + + //Create app and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateApplication, + headers: { + authorization: accessToken + }, + body: { + document: { + field1: {}, + field2: {}, + field3: {} + }, + ref: null + } + }) + + let requestForApplicationCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + waitForApproveApplicationBlockId, + headers: { + authorization: accessToken + } + } + + Checks.whileApplicationCreating("Submitted for Approval", requestForApplicationCreationProgress, 0) + }) + }) + + //Get applications data and prepare body for approve + let applicationData + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetApplications, + headers: { + authorization + } + }).then((response) => { + applicationData = response.body.data[0]; + applicationData.option.status = "Approved" + let appDataBody = JSON.stringify({ + document: applicationData, + tag: "Button_0" + }) + //Approve app + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveApplication, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForApplicationApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + Checks.whileApplicationApproving("Device Name", requestForApplicationApproveProgress, 0) + }) + }) + + //Create device and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateDevice, + headers: { + authorization: accessToken + }, + body: { + document: { + field3: {}, + field4: {}, + field5: {} + }, + ref: null + } + }) + + let requestForDeviceCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + Checks.whileDeviceCreating("Waiting for approval", requestForDeviceCreationProgress, 0) + }) + }) + + //Get devices data and prepare body for approve + let deviceBody + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDevices, + headers: { + authorization + } + }).then((response) => { + deviceBody = response.body; + let data = deviceBody.data[deviceBody.data.length - 1] + data[optionKey].status = "Approved" + let appDataBody = JSON.stringify({ + document: data, + tag: "Button_0" + }) + //Approve device + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveDevice, + headers: { + authorization, + "content-type": "application/json" + }, + body: appDataBody + }) + }) + + //Wait while approve in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForDeviceApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + deviceGridBlockId, + headers: { + authorization: accessToken + } + } + + Checks.whileDeviceApproving("Approved", requestForDeviceApproveProgress, 0) + }) + }) + + //Get issue data and prepare body for create + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = "Bearer " + response.body.accessToken + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetDeviceIssue, + headers: { + authorization: accessToken + } + }).then((response) => { + let obj = response.body + let device_issue_row = obj.data[obj.data.length - 1] + + //Create issue and wait while it in progress + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.CreateIssue, + headers: { + authorization: accessToken, + "content-type": "application/json" + }, + body: { + document: { + field2: {}, + field3: {}, + field6: "2024-03-01", + field7: 10, + field8: "2024-03-02", + field17: username, + field18: hederaId + }, + ref: device_issue_row + } + }) + + let requestForIssueCreationProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + Checks.whileIssueRequestCreating("Waiting for approval", requestForIssueCreationProgress, 0) + }) + }) + }) + + //Get issue data and prepare body for approve + let issueRow + cy.request({ + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.GetIssues, + headers: { + authorization + } + }).then((response) => { + issueRow = response.body.data + issueRow = issueRow[issueRow.length - 1] + issueRow[optionKey].status = "Approved" + issueRow = JSON.stringify({ + document: issueRow, + tag: "Button_0" + }) + //Approve issue + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies + policyId + "/" + API.ApproveIssueRequestsBtn, + headers: { + authorization, + "content-type": "application/json" + }, + body: issueRow + }) + }) + + //Wait while approve in progress + let accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForIssueApproveProgress = { + method: METHOD.GET, + url: API.ApiServer + API.Policies + policyId + "/" + API.Blocks + issueRequestGridBlockId, + headers: { + authorization: accessToken + } + } + + Checks.whileIssueRequestApproving("Approved", requestForIssueApproveProgress, 0) + }) + }) + + //Wait while balance updating + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: username, + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + accessToken = "Bearer " + response.body.accessToken + + let requestForBalance = { + method: METHOD.GET, + url: API.ApiServer + API.ListOfTokens, + headers: { + authorization: accessToken + } + } + + Checks.whileBalanceVerifying("10", requestForBalance, 0) + }) + }) + }) +}); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesAndValidate.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesAndValidate.cy.js index f1b0d82a6b..337a4af61d 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesAndValidate.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesAndValidate.cy.js @@ -2,7 +2,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context(" Policies", { tags: '@policies' }, () => { +context(" Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); @@ -27,9 +27,9 @@ context(" Policies", { tags: '@policies' }, () => { timeout: 600000 }) .then((response) => { - let secondPolicyId = response.body.policies.at(0).id - let policyStatus = response.body.policies.at(0).status - expect(response.status).to.eq(200) + let secondPolicyId = response.body.policies.at(-1).id + let policyStatus = response.body.policies.at(-1).status + expect(response.status).to.eq(STATUS_CODE.OK) expect(response.body).to.not.be.oneOf([null, ""]) expect(firstPolicyId).to.equal(secondPolicyId) expect(policyStatus).to.equal('PUBLISH') @@ -39,11 +39,11 @@ context(" Policies", { tags: '@policies' }, () => { it("Validate the policy", () => { cy.request({ - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization } }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(-1).id; cy.request({ method: 'GET', @@ -59,7 +59,7 @@ context(" Policies", { tags: '@policies' }, () => { const topicId = response.body.topicId; cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + "policies/validate", headers: { authorization }, body: @@ -72,7 +72,7 @@ context(" Policies", { tags: '@policies' }, () => { topicId } }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }) }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesBlocksData.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesBlocksData.cy.js index b07cbb9ee7..23317ee41f 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesBlocksData.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesBlocksData.cy.js @@ -2,40 +2,40 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Policies", { tags: '@policies' },() => { +context("Policies", { tags: ['policies', 'secondPool'] },() => { const authorization = Cypress.env("authorization"); before(() => { cy.request({ - method: "POST", - url: `${API.ApiServer}policies/import/message`, + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, body: { messageId: (Cypress.env('irec_policy')) }, headers: { authorization, }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }); }); it("Send data to the specified block", () => { cy.request({ - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(-1).id; const blockId = response.body.at(-1).uuid; cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + "policies/" + @@ -48,7 +48,7 @@ context("Policies", { tags: '@policies' },() => { body: {}, timeout:180000 }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesGroup.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesGroup.cy.js index 74c24cba8c..0cb76540fd 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesGroup.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesGroup.cy.js @@ -2,7 +2,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Policies', { tags: '@policies' },() => { +context('Policies', { tags: ['policies', 'secondPool'] },() => { const authorization = Cypress.env('authorization'); it('Make the group active', () => { diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportFile.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportFile.cy.js index 5ab02ad813..a815e81135 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportFile.cy.js @@ -2,12 +2,12 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Policies', { tags: '@policies' }, () => { +context('Policies', { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env('authorization'); - it('Imports new policy and all associated artifacts from file', () => { + it('Imports new policy and all associated artifacts from file', { tags: ['smoke'] }, () => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.PolicisImportMsg, body: {messageId: (Cypress.env('policy_with_artifacts')), metadata: { @@ -19,7 +19,7 @@ context('Policies', { tags: '@policies' }, () => { timeout: 300000 }) .then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }) }) }) diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMessage.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMessage.cy.js index 62dbb8444a..83b895d607 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMessage.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMessage.cy.js @@ -3,7 +3,7 @@ import API from "../../../support/ApiUrls"; -context('Policy - Import',{ tags: '@policies' }, () => { +context('Policies', { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env('authorization'); it('Imports new policy and all associated artifacts from IPFS', () => { @@ -17,7 +17,7 @@ context('Policy - Import',{ tags: '@policies' }, () => { timeout: 180000 }) .then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); }) }) diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMsgPreview.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMsgPreview.cy.js index 747cbf5e8f..1c0a40d212 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMsgPreview.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPoliciesImportMsgPreview.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Policies", { tags: '@policies' },() => { +context("Policies", { tags: ['policies', 'secondPool'] },() => { const authorization = Cypress.env("authorization"); it("Preview the policy from IPFS", () => { diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPolicy.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPolicy.cy.js new file mode 100644 index 0000000000..93d2de7873 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPolicy.cy.js @@ -0,0 +1,110 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + + +context('Policies', { tags: ['policies', 'secondPool'] }, () => { + + const authorization = Cypress.env('authorization'); + const nameTag = Math.floor(Math.random() * 999) + "test666"; + const policyName = Math.floor(Math.random() * 999) + "PolicyName"; + + it('Creates a new policy', () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies, + headers: { + authorization + }, + body:{ + name: policyName, + policyTag: nameTag, + }, + timeout: 180000 + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + }) + }) + + it("Creates a new policy without auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies, + failOnStatusCode: false, + body:{ + name: policyName, + policyTag: nameTag, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Creates a new policy with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + body:{ + name: policyName, + policyTag: nameTag, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Creates a new policy with empty auth token - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies, + headers: { + authorization: "", + }, + failOnStatusCode: false, + body:{ + name: policyName, + policyTag: nameTag, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Creates a new policy by user - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = response.body.accessToken + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.Policies, + headers: { + authorization: "Bearer " + accessToken, + }, + failOnStatusCode: false, + body:{ + name: policyName, + policyTag: nameTag, + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }) + }); +}) diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPushPolicies.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPushPolicies.cy.js index 5d79a166cd..3340790a5b 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPushPolicies.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPushPolicies.cy.js @@ -1,15 +1,13 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; - - -context("Policies", { tags: '@policies' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); it("Create a new policy", () => { const nameTag = Math.floor(Math.random() * 999) + "test666"; const urlPolicies = { - method: "POST", + method: METHOD.POST, url: API.ApiServer + "policies/push", body: { name: nameTag, diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportFile.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportFile.cy.js index 6d4610b284..e940c607c2 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportFile.cy.js @@ -2,24 +2,24 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Policies", { tags: '@policies' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, }; cy.request(urlPolicies).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); const policyId = response.body.at(-1).id; const url = { - method: "GET", + method: METHOD.GET, url: API.ApiServer + "policies/" + @@ -48,7 +48,7 @@ context("Policies", { tags: '@policies' }, () => { .then((binary) => Cypress.Blob.binaryStringToBlob(binary)) .then((file) => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + 'policies/push/import/file', body: file, headers: { diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsg.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsg.cy.js index 5be4e7ffcb..ac119796c0 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsg.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsg.cy.js @@ -2,13 +2,13 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Policy - Import", { tags: '@policies' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); it("Push import new policy and all associated artifacts from IPFS", () => { cy.request({ - method: "POST", - url: `${API.ApiServer}policies/push/import/message`, + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsgPush, body: { "messageId":"1707125414.999819805" }, headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsgPreview.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsgPreview.cy.js index a5d0d3dcf9..4865b7545e 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsgPreview.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/postPushPoliciesImportMsgPreview.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@policies' },() => { +context("Schemas", { tags: ['policies', 'secondPool'] },() => { const authorization = Cypress.env("authorization"); it("Push preview the policy from IPFS", () => { diff --git a/e2e-tests/cypress/e2e/api-tests/policies/putPoliciesId.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/putPoliciesId.cy.js index 116b1b6193..5a82cd0149 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/putPoliciesId.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/putPoliciesId.cy.js @@ -2,24 +2,24 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Policies", { tags: '@policies' }, () => { +context("Policies", { tags: ['policies', 'secondPool'] }, () => { const authorization = Cypress.env("authorization"); it("Update policy configuration for the specified policy ID", () => { const urlPolicies = { - method: "GET", - url: API.ApiServer + "policies", + method: METHOD.GET, + url: API.ApiServer + API.Policies, headers: { authorization, }, }; cy.request(urlPolicies).then((response) => { - expect(response.status).to.eq(200); - const policyId = response.body.at(0).id; + expect(response.status).to.eq(STATUS_CODE.OK); + const policyId = response.body.at(-1).id; const urlPoliciesId = { - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + "policies/" + policyId, headers: { authorization, @@ -48,7 +48,7 @@ context("Policies", { tags: '@policies' }, () => { }, }; cy.request(urlPoliciesId).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/putPolicy.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/putPolicy.cy.js new file mode 100644 index 0000000000..821fc696c7 --- /dev/null +++ b/e2e-tests/cypress/e2e/api-tests/policies/putPolicy.cy.js @@ -0,0 +1,145 @@ +import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; +import API from "../../../support/ApiUrls"; + + +context("Policies", { tags: ['policies', 'secondPool'] }, () => { + const authorization = Cypress.env("authorization"); + const policyName = Math.floor(Math.random() * 999) + "PolicyName"; + let policyId; + + before(() => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.PolicisImportMsg, + body: { messageId: "1707125414.999819805" }, //iRec2 + headers: { + authorization, + }, + timeout: 180000, + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.SUCCESS); + policyId = response.body.at(-1).id; + }); + }); + + it("Updates policy configuration for the specified policy ID", () => { + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization, + }, + body: { + id: policyId, + name: policyName, + config: {}, + }, + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.OK); + }); + }); + + it("Updates policy configuration for the specified policy ID by user - Negative", () => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, + body: { + username: "Registrant", + password: "test" + } + }).then((response) => { + cy.request({ + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, + body: { + refreshToken: response.body.refreshToken + } + }).then((response) => { + let accessToken = response.body.accessToken + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization: "Bearer " + accessToken, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.FORBIDDEN); + }); + }); + }) + }); + + it("Updates policy configuration for the specified policy ID without auth token - Negative", () => { + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Updates policy configuration for the specified policy ID with invalid auth token - Negative", () => { + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization: "Bearer wqe", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Updates policy configuration for the specified policy ID with empty auth token - Negative", () => { + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization: "", + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.UNAUTHORIZED); + }); + }); + + it("Updates policy configuration for the specified policy ID with invalid policy id - Negative", () => { + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId + "abrakadabra", + headers: { + authorization, + }, + body: { + id: policyId, + name: policyName, + config: {}, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.NOT_FOUND); + expect(response.body.message).eql("Policy does not exist.") + }); + }); + + it("Updates policy configuration for the specified policy ID with invalid policy configuration - Negative", () => { + cy.request({ + method: METHOD.PUT, + url: API.ApiServer + API.Policies + policyId, + headers: { + authorization, + }, + body: { + id: policyId, + name: policyName, + }, + failOnStatusCode: false, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ERROR); + expect(response.body.message).eql("You must pass a non-undefined value to the property config of entity Policy.") + }); + }); +}); diff --git a/e2e-tests/cypress/e2e/api-tests/policies/putPushPoliciesPublish.cy.js b/e2e-tests/cypress/e2e/api-tests/policies/putPushPoliciesPublish.cy.js index 5246e52db4..738997f1b6 100644 --- a/e2e-tests/cypress/e2e/api-tests/policies/putPushPoliciesPublish.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/policies/putPushPoliciesPublish.cy.js @@ -2,7 +2,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Policy - Import', { tags: '@policies' },() => { +context('Policies', { tags: ['policies', 'secondPool'] },() => { const authorization = Cypress.env('authorization'); it('Push publish the policy with the specified (internal) policy ID', () => { diff --git a/e2e-tests/cypress/e2e/api-tests/profiles/getBalance.cy.js b/e2e-tests/cypress/e2e/api-tests/profiles/getBalance.cy.js index dd5636238a..8c7888e5da 100644 --- a/e2e-tests/cypress/e2e/api-tests/profiles/getBalance.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/profiles/getBalance.cy.js @@ -2,7 +2,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Profiles', { tags: '@profiles' },() => { +context('Profiles', { tags: ['profiles', 'thirdPool'] },() => { const authorization = Cypress.env('authorization'); it('Get Hedera account balance', () => { @@ -15,7 +15,7 @@ context('Profiles', { tags: '@profiles' },() => { }; cy.request(options) .should((response) => { - expect(response.status).to.eq(200) + expect(response.status).to.eq(STATUS_CODE.OK) }) }) }) diff --git a/e2e-tests/cypress/e2e/api-tests/profiles/getProfilesRootUser.cy.js b/e2e-tests/cypress/e2e/api-tests/profiles/getProfilesRootUser.cy.js index b843e78a7f..43384a96b7 100644 --- a/e2e-tests/cypress/e2e/api-tests/profiles/getProfilesRootUser.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/profiles/getProfilesRootUser.cy.js @@ -2,7 +2,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Profiles', { tags: '@profiles' },() => { +context('Profiles', { tags: ['profiles', 'thirdPool'] },() => { const authorization = Cypress.env('authorization'); it('Get user account information', () => { @@ -14,7 +14,7 @@ context('Profiles', { tags: '@profiles' },() => { }}; cy.request(options) .should((response) => { - expect(response.status).to.eq(200) + expect(response.status).to.eq(STATUS_CODE.OK) expect(response.body).to.have.property('confirmed') expect(response.body).to.have.property('failed') expect(response.body).to.have.property('username', Cypress.env('root_user')) diff --git a/e2e-tests/cypress/e2e/api-tests/profiles/setCredsAndLinkToSRByInstaller.cy.js b/e2e-tests/cypress/e2e/api-tests/profiles/setCredsAndLinkToSRByInstaller.cy.js index 97f136a51e..41e08a0e24 100644 --- a/e2e-tests/cypress/e2e/api-tests/profiles/setCredsAndLinkToSRByInstaller.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/profiles/setCredsAndLinkToSRByInstaller.cy.js @@ -2,22 +2,22 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Profiles', { tags: '@profiles' },() => { +context('Profiles', { tags: ['profiles', 'thirdPool'] },() => { const authorization = Cypress.env('authorization'); it('Set Hedera credentials for the Installer', () => { let username = "Installer"; cy.request({ - method: "POST", - url: API.ApiServer + "accounts/login", + method: METHOD.POST, + url: API.ApiServer + API.AccountsLogin, body: { username: username, password: "test" } }).then((response) => { cy.request({ - method: "POST", - url: API.ApiServer + "accounts/access-token", + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, body: { refreshToken: response.body.refreshToken } diff --git a/e2e-tests/cypress/e2e/api-tests/profiles/standardRegistrySetHederaCreds.cy.js b/e2e-tests/cypress/e2e/api-tests/profiles/standardRegistrySetHederaCreds.cy.js index 7e7e85ddd9..310ae3eaea 100644 --- a/e2e-tests/cypress/e2e/api-tests/profiles/standardRegistrySetHederaCreds.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/profiles/standardRegistrySetHederaCreds.cy.js @@ -3,7 +3,7 @@ import API from "../../../support/ApiUrls"; import {checkForRemovedStyleOptions} from "cypress/mount-utils"; -context('Profiles', { tags: '@profiles' },() => { +context('Profiles', { tags: ['profiles', 'thirdPool'] },() => { it('Get Standard Registry account information', () => { //Getting accessToken for StandardRegistry diff --git a/e2e-tests/cypress/e2e/api-tests/profiles/userCreateAndSetHederaCreds.cy.js b/e2e-tests/cypress/e2e/api-tests/profiles/userCreateAndSetHederaCreds.cy.js index c2fca985f6..6ccc15abde 100644 --- a/e2e-tests/cypress/e2e/api-tests/profiles/userCreateAndSetHederaCreds.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/profiles/userCreateAndSetHederaCreds.cy.js @@ -2,7 +2,7 @@ import {METHOD, STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Profiles', {tags: '@profiles'}, () => { +context('Profiles', { tags: ['profiles', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); let did diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaFile.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaFile.cy.js index 060b114357..f078a6385f 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaFile.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schema", { tags: '@schemas' }, () => { +context("Schema", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Export schema file", () => { @@ -23,7 +23,7 @@ context("Schema", { tags: '@schemas' }, () => { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.not.be.oneOf([null, ""]); let schema = Cypress.Blob.arrayBufferToBinaryString( response.body diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaMsg.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaMsg.cy.js index e8832e40b4..24989639af 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaMsg.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getExportSchemaMsg.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schema",{ tags: '@schemas' }, () => { +context("Schema",{ tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Export schema message", () => { @@ -27,7 +27,7 @@ context("Schema",{ tags: '@schemas' }, () => { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getPushSchemaTopicId.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getPushSchemaTopicId.cy.js index b935d81ed7..a810098301 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getPushSchemaTopicId.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getPushSchemaTopicId.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' },() => { +context("Schemas", { tags: ['schema', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); it("Push create new schema", () => { @@ -11,8 +11,8 @@ context("Schemas", { tags: '@schemas' },() => { headers: { authorization, }, - }).then((resp) => { - const topicUid = resp.body[0].topicId; + }).then((response) => { + const topicUid = response.body[0].topicId; cy.request({ method: METHOD.POST, url: @@ -23,8 +23,8 @@ context("Schemas", { tags: '@schemas' },() => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).to.eq(STATUS_CODE.ACCEPTED); + }).then((response) => { + expect(response.status).to.eq(STATUS_CODE.ACCEPTED); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaEntity.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaEntity.cy.js index 2754bd09fd..96f64c4fe8 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaEntity.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaEntity.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Find the schema using the schema type", () => { @@ -23,8 +23,8 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaTopicId.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaTopicId.cy.js index e65c7b8c24..5f5e72dc7a 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaTopicId.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaTopicId.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get all schemas by topicId", () => { @@ -11,18 +11,18 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - const topicUid = resp.body[0].topicId; + }).then((response) => { + const topicUid = response.body[0].topicId; cy.request({ method: METHOD.GET, url: API.ApiServer + API.Schemas + topicUid, headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body[0]).to.have.property("id"); - expect(resp.body[0]).to.have.property("topicId", topicUid); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body[0]).to.have.property("id"); + expect(response.body[0]).to.have.property("topicId", topicUid); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaType.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaType.cy.js index 3024975847..54e46c8f46 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaType.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemaType.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get the schema using the json document type", () => { @@ -9,8 +9,8 @@ context("Schemas", { tags: '@schemas' }, () => { method: METHOD.GET, url: API.ApiServer + API.SchemasType, headers: { authorization, type: "array" }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemas.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemas.cy.js index d71ac7d0dc..e219700a2f 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getSchemas.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getSchemas.cy.js @@ -1,20 +1,20 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' },() => { +context("Schemas", { tags: ['schema', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); - it("Get all schemas", () => { + it("Get all schemas", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.Schemas, headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body[0]).to.have.property("id"); - expect(resp.body[0]).to.have.property("topicId"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body[0]).to.have.property("id"); + expect(response.body[0]).to.have.property("topicId"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getSimpleSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getSimpleSchema.cy.js index 7f79d2c669..a745663c6c 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getSimpleSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getSimpleSchema.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas",{ tags: '@schemas' }, () => { +context("Schemas",{ tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get schema by schema ID", () => { @@ -23,7 +23,7 @@ context("Schemas",{ tags: '@schemas' }, () => { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/getSystemSchemaByUser.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/getSystemSchemaByUser.cy.js index 2e089c0b93..8c1dde12ac 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/getSystemSchemaByUser.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/getSystemSchemaByUser.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get all system schemas by username", () => { @@ -14,9 +14,9 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body[0]).to.have.property("uuid"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body[0]).to.have.property("uuid"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/postImportFile.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/postImportFile.cy.js index 64428efa51..30aeff0d0e 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/postImportFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/postImportFile.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { @@ -26,7 +26,7 @@ context("Schemas", { tags: '@schemas' }, () => { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.not.be.oneOf([null, ""]); let schema = Cypress.Blob.arrayBufferToBinaryString( response.body @@ -41,15 +41,15 @@ context("Schemas", { tags: '@schemas' }, () => { }); }); - it("Import new schema from a file", () => { + it("Import new schema from a file", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.Schemas, headers: { authorization, }, - }).then((resp) => { - const topicUid = resp.body[0].topicId; + }).then((response) => { + const topicUid = response.body[0].topicId; cy.fixture("exportedSchema.schema", "binary") .then((binary) => Cypress.Blob.binaryStringToBlob(binary)) diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/postImportFilePreview.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/postImportFilePreview.cy.js index 72f54ae311..648b49ecfd 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/postImportFilePreview.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/postImportFilePreview.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { @@ -27,7 +27,7 @@ context("Schemas", { tags: '@schemas' }, () => { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.not.be.oneOf([null, ""]); let schema = Cypress.Blob.arrayBufferToBinaryString( response.body diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsg.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsg.cy.js index 699063e280..56d950aea5 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsg.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsg.cy.js @@ -1,18 +1,18 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas",{ tags: '@schemas' }, () => { +context("Schemas",{ tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); - it("Import new schema from IPFS", () => { + it("Import new schema from IPFS", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.Schemas, headers: { authorization, }, - }).then((resp) => { - const topicUid = resp.body[0].topicId; + }).then((response) => { + const topicUid = response.body[0].topicId; cy.request({ method: METHOD.POST, url: diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsgPreview.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsgPreview.cy.js index 17cea89777..c56a5013da 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsgPreview.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/postImportMsgPreview.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportFile.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportFile.cy.js index 4af554b614..7c2af393ab 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportFile.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportFile.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas",{ tags: '@schemas' }, () => { +context("Schemas",{ tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); before(() => { @@ -26,7 +26,7 @@ context("Schemas",{ tags: '@schemas' }, () => { authorization, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.not.be.oneOf([null, ""]); let schema = Cypress.Blob.arrayBufferToBinaryString( response.body @@ -47,8 +47,8 @@ context("Schemas",{ tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - const topicUid = resp.body[0].topicId; + }).then((response) => { + const topicUid = response.body[0].topicId; cy.fixture("exportedSchema.schema", "binary") .then((binary) => Cypress.Blob.binaryStringToBlob(binary)) diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsg.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsg.cy.js index 844ec652a9..71f11c8701 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsg.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsg.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas",{ tags: '@schemas' }, () => { +context("Schemas",{ tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Push import new schema from IPFS", () => { @@ -11,8 +11,8 @@ context("Schemas",{ tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - const topicUid = resp.body[0].topicId; + }).then((response) => { + const topicUid = response.body[0].topicId; cy.request({ method: METHOD.POST, url: diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsgPreview.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsgPreview.cy.js index 12d85cfb76..101a388da7 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsgPreview.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/postPushImportMsgPreview.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas",{ tags: '@schemas' }, () => { +context("Schemas",{ tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Push preview the schema from IPFS", () => { diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/putActiveSystemSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/putActiveSystemSchema.cy.js index 0b14860d48..03f00fe539 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/putActiveSystemSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/putActiveSystemSchema.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const username = "StandartRegistry"; const schemaUUID = ("0000b23a-b1ea-408f-a573"+ Math.floor(Math.random() * 999999) + "a2060a") @@ -9,7 +9,7 @@ context("Schemas", { tags: '@schemas' }, () => { it("Make the created scheme active", () => { //Create new schema cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.SchemasSystem + username, headers: { authorization }, body: { @@ -31,16 +31,16 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body[0]).to.have.property("uuid"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body[0]).to.have.property("uuid"); - let schemaId = resp.body.at(0).id; + let schemaId = response.body.at(0).id; const versionNum = "1." + Math.floor(Math.random() * 999); cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.SchemasSystem + diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/putPushSchemaPublish.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/putPushSchemaPublish.cy.js index 8ae555b56e..dfbfac2012 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/putPushSchemaPublish.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/putPushSchemaPublish.cy.js @@ -1,7 +1,7 @@ import {METHOD, STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", {tags: '@schemas'}, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const schemaUUID = ("0000b23a-b1ea-408f-a573" + Math.floor(Math.random() * 999999) + "a2060a"); let topicUid; @@ -13,92 +13,85 @@ context("Schemas", {tags: '@schemas'}, () => { headers: { authorization, }, - }).then((resp) => { - topicUid = resp.body[0].topicId; + }).then((response) => { + topicUid = response.body[0].topicId; //Create new schema cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Schemas + topicUid, headers: {authorization}, body: { - uuid: schemaUUID, - name: "test", - description: "new", - entity: "VC", - status: "DRAFT", - readonly: false, - document: { - "$id": "#${schemaUUID}", - "$comment": "{ \"@id\": \"schema:${schemaUUID}#${schemaUUID}\", \"term\": \"${schemaUUID}\" }", - "title": "wqe", - "description": "", - "type": "object", - "properties": { + uuid: schemaUUID, + name: "q", + entity: "VC", + status: "DRAFT", + readonly: false, + document: { + "$id": "#" + schemaUUID + "", + "$comment": "{ \"@id\": \"schema:" + schemaUUID + "#" + schemaUUID + "\", \"term\": \"" + schemaUUID + "\" }", + "title": "q", + "type": "object", + "properties": { "@context": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "readOnly": true }, "type": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "readOnly": true }, "id": { - "type": "string", - "readOnly": true + "type": "string", + "readOnly": true }, "policyId": { - "title": "policyId", - "description": "policyId", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" + "title": "policyId", + "description": "policyId", + "readOnly": true, + "type": "string", + "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" }, "ref": { - "title": "ref", - "description": "ref", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" + "title": "ref", + "description": "ref", + "readOnly": true, + "type": "string", + "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" } - }, - "required": [ + }, + "required": [ "@context", "type", "policyId" - ], - "additionalProperties": false, - "$defs": {} - }, - context: null, - topicId: topicUid, - contextURL: "schema:${schemaUUID}", - fields: [], - conditions: [], - active: false, - system: false, - category: "POLICY", - errors: [], - }, + ], + "additionalProperties": false, + "$defs": {} + }, + topicId: topicUid, + active: false, + system: false, + category: "POLICY", + }, }).then((response) => { expect(response.status).eql(STATUS_CODE.SUCCESS); }); @@ -108,13 +101,13 @@ context("Schemas", {tags: '@schemas'}, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - const schemaId = resp.body.at(0).id; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + const schemaId = response.body.at(0).id; const versionNum = ("1." + Math.floor(Math.random() * 999)) //Publish schema cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.Schemas + "push/" + schemaId + "/publish", headers: {authorization}, body: { diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/putSchemaPublish.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/putSchemaPublish.cy.js index 49931005af..f657d366c5 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/putSchemaPublish.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/putSchemaPublish.cy.js @@ -1,9 +1,9 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); - const schemaUUID = ("0000b23a-b1ea-408f-a573"+ Math.floor(Math.random() * 999999) + "a2060a") + const schemaUUID = ("0000b23a-b1ea-408f-a573" + Math.floor(Math.random() * 999999) + "a2060a") before(() => { cy.request({ @@ -12,99 +12,90 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - const topicUid = resp.body.at(0).topicId; + }).then((response) => { + const topicUid = response.body.at(-1).topicId; //Create new schema cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Schemas + topicUid, headers: { authorization }, body: { uuid: schemaUUID, - name: "test", - description: "new", + name: "q", entity: "VC", status: "DRAFT", readonly: false, document: { - "$id": "#${schemaUUID}", - "$comment": "{ \"@id\": \"schema:${schemaUUID}#${schemaUUID}\", \"term\": \"${schemaUUID}\" }", - "title": "wqe", - "description": "", - "type": "object", - "properties": { - "@context": { - "oneOf": [ - { - "type": "string" + "$id": "#" + schemaUUID + "", + "$comment": "{ \"@id\": \"schema:" + schemaUUID + "#" + schemaUUID + "\", \"term\": \"" + schemaUUID + "\" }", + "title": "q", + "type": "object", + "properties": { + "@context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "readOnly": true }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "type": { - "oneOf": [ - { - "type": "string" + "type": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "readOnly": true + }, + "id": { + "type": "string", + "readOnly": true + }, + "policyId": { + "title": "policyId", + "description": "policyId", + "readOnly": true, + "type": "string", + "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" }, - { - "type": "array", - "items": { - "type": "string" - } + "ref": { + "title": "ref", + "description": "ref", + "readOnly": true, + "type": "string", + "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" } - ], - "readOnly": true }, - "id": { - "type": "string", - "readOnly": true - }, - "policyId": { - "title": "policyId", - "description": "policyId", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" - }, - "ref": { - "title": "ref", - "description": "ref", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" - } - }, - "required": [ - "@context", - "type", - "policyId" - ], - "additionalProperties": false, - "$defs": {} + "required": [ + "@context", + "type", + "policyId" + ], + "additionalProperties": false, + "$defs": {} }, - context: null, topicId: topicUid, - contextURL: "schema:${schemaUUID}", - fields: [], - conditions: [], active: false, system: false, category: "POLICY", - errors: [], - }, - }).then((response) => { - + }, }); }); - }); + }) - it("Publish the schema with the provided (internal) schema ID", () => { + it("Publish the schema with the provided (internal) schema ID", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.Schemas, @@ -118,7 +109,7 @@ context("Schemas", { tags: '@schemas' }, () => { const versionNum = "1." + Math.floor(Math.random() * 999); //Publish schema cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.Schemas + diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSchema.cy.js index 3149303de1..4ad7c93151 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSchema.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const schemaUUID = ("0000b23a-b1ea-408f-a573" + Math.floor(Math.random() * 999999) + "a2060a"); let topicUid; @@ -13,11 +13,11 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - topicUid = resp.body.at(-1).topicId; + }).then((response) => { + topicUid = response.body.at(-1).topicId; //Create new schema cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Schemas + topicUid, headers: {authorization}, body: { @@ -27,78 +27,23 @@ context("Schemas", { tags: '@schemas' }, () => { entity: "VC", status: "DRAFT", readonly: false, - document: { - "$id": "#${schemaUUID}", - "$comment": "{ \"@id\": \"schema:${schemaUUID}#${schemaUUID}\", \"term\": \"${schemaUUID}\" }", - "title": "wqe", - "description": "", - "type": "object", - "properties": { - "@context": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "type": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "id": { - "type": "string", - "readOnly": true - }, - "policyId": { - "title": "policyId", - "description": "policyId", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" + name: "test", + entity: "NONE", + document: + { + $id: schemaUUID, + $comment:'{\"term\\": \"${schemaUUID}\\", \"@id\\": \"https://localhost/schema#${schemaUUID}\\"}', + title:"test", + description:" test", + type:"object", + properties:{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + type:{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + id:{"type":"string","readOnly":true}, + field0:{"title":"test field","description":"test field","readOnly":false,"$comment":'{\\"term\\": \\"field0\\", \\"@id\\": \\"https://www.schema.org/text\\"}',"type":"string"}}, + required:["@context","type"], + additionalProperties:false }, - "ref": { - "title": "ref", - "description": "ref", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" - } - }, - "required": [ - "@context", - "type", - "policyId" - ], - "additionalProperties": false, - "$defs": {} }, - context: null, - topicId: topicUid, - contextURL: "schema:${schemaUUID}", - fields: [], - conditions: [], - active: false, - system: false, - category: "POLICY", - errors: [], - }, }).then((response) => { expect(response.status).eql(STATUS_CODE.SUCCESS); }); @@ -112,13 +57,13 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - const schemaId = resp.body.at(0).id; - const schemaUUId = resp.body.at(0).uuid; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + const schemaId = response.body.at(0).id; + const schemaUUId = response.body.at(0).uuid; cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.Schemas, headers: { authorization, schemaID: schemaId }, body: { @@ -201,8 +146,8 @@ context("Schemas", { tags: '@schemas' }, () => { category: "POLICY", errors: [], }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSystemSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSystemSchema.cy.js index 715c4cde64..aef6fb145d 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSystemSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/putUpdateSystemSchema.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Updates the system schema with the provided schema ID", () => { @@ -11,13 +11,13 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - const schemaId = resp.body.at(-1).id; - const schemaUUId = resp.body.at(-1).uuid; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + const schemaId = response.body.at(-1).id; + const schemaUUId = response.body.at(-1).uuid; cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.SchemasSystem + schemaId, headers: { authorization }, body: { @@ -26,81 +26,11 @@ context("Schemas", { tags: '@schemas' }, () => { name: "test", description: "new", entity: "USER", - status: "DRAFT", - readonly: false, - document: { - "$id": "#${schemaUUID}", - "$comment": "{ \"@id\": \"schema:${schemaUUID}#${schemaUUID}\", \"term\": \"${schemaUUID}\" }", - "title": "wqe", - "description": "", - "type": "object", - "properties": { - "@context": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "type": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "id": { - "type": "string", - "readOnly": true - }, - "policyId": { - "title": "policyId", - "description": "policyId", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" - }, - "ref": { - "title": "ref", - "description": "ref", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" - } - }, - "required": [ - "@context", - "type", - "policyId" - ], - "additionalProperties": false, - "$defs": {} - }, - context: null, - contextURL: "schema:${schemaUUID}", - fields: [], - conditions: [], - active: false, - system: false, - category: "POLICY", - errors: [], - }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + document: + '{"$id":"#${schemaUUID}","$comment":"{\\"term\\": \\"${schemaUUID}\\", \\"@id\\": \\"https://localhost/schema#${schemaUUID}\\"}","title":"test","description":" test","type":"object","properties":{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"id":{"type":"string","readOnly":true},"field0":{"title":"test field","description":"test field","readOnly":false,"$comment":"{\\"term\\": \\"field0\\", \\"@id\\": \\"https://www.schema.org/text\\"}","type":"string"}},"required":["@context","type"],"additionalProperties":false}', + }, + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/schemaManage.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/schemaManage.cy.js index 4c9f4efe61..a6e73e46f8 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/schemaManage.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/schemaManage.cy.js @@ -1,7 +1,7 @@ import {METHOD, STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", {tags: '@schemas'}, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const schemaUUID = ("0000b23a-b1ea-408f-a573" + Math.floor(Math.random() * 999999) + "a2060a"); let topicUid; @@ -13,11 +13,11 @@ context("Schemas", {tags: '@schemas'}, () => { headers: { authorization, }, - }).then((resp) => { - topicUid = resp.body.at(-1).topicId; + }).then((response) => { + topicUid = response.body.at(-1).topicId; //Create new schema cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Schemas + topicUid, headers: {authorization}, body: { @@ -27,85 +27,30 @@ context("Schemas", {tags: '@schemas'}, () => { entity: "VC", status: "DRAFT", readonly: false, - document: { - "$id": "#${schemaUUID}", - "$comment": "{ \"@id\": \"schema:${schemaUUID}#${schemaUUID}\", \"term\": \"${schemaUUID}\" }", - "title": "wqe", - "description": "", - "type": "object", - "properties": { - "@context": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "type": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "id": { - "type": "string", - "readOnly": true - }, - "policyId": { - "title": "policyId", - "description": "policyId", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" + name: "test", + entity: "NONE", + document: + { + $id: schemaUUID, + $comment:'{\"term\\": \"${schemaUUID}\\", \"@id\\": \"https://localhost/schema#${schemaUUID}\\"}', + title:"test", + description:" test", + type:"object", + properties:{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + type:{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + id:{"type":"string","readOnly":true}, + field0:{"title":"test field","description":"test field","readOnly":false,"$comment":'{\\"term\\": \\"field0\\", \\"@id\\": \\"https://www.schema.org/text\\"}',"type":"string"}}, + required:["@context","type"], + additionalProperties:false }, - "ref": { - "title": "ref", - "description": "ref", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" - } - }, - "required": [ - "@context", - "type", - "policyId" - ], - "additionalProperties": false, - "$defs": {} - }, - context: null, - topicId: topicUid, - contextURL: "schema:${schemaUUID}", - fields: [], - conditions: [], - active: false, - system: false, - category: "POLICY", - errors: [], - }, + }, }).then((response) => { expect(response.status).eql(STATUS_CODE.SUCCESS); }); }); }); - it("Delete the schema with the provided schema ID", () => { + it("Delete the schema with the provided schema ID", { tags: ['smoke'] }, () => { cy.request({ method: METHOD.GET, url: API.ApiServer + API.Schemas + topicUid, @@ -118,7 +63,7 @@ context("Schemas", {tags: '@schemas'}, () => { //Delete schema cy.request({ - method: "DELETE", + method: METHOD.DELETE, url: API.ApiServer + API.Schemas + schemaId, headers: { authorization }, }).then((response) => { diff --git a/e2e-tests/cypress/e2e/api-tests/schemas/systemSchemaManage.cy.js b/e2e-tests/cypress/e2e/api-tests/schemas/systemSchemaManage.cy.js index 8797236d6b..e011a4f6c8 100644 --- a/e2e-tests/cypress/e2e/api-tests/schemas/systemSchemaManage.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/schemas/systemSchemaManage.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Schemas", { tags: '@schemas' }, () => { +context("Schemas", { tags: ['schema', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const schemaUUID = "1111b23a-b1ea-408f-a573-6d8bd1a2060a"; const username = "StandartRegistry"; @@ -9,7 +9,7 @@ context("Schemas", { tags: '@schemas' }, () => { it("Delete the system schema with the provided schema ID", () => { //Create new schema cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.SchemasSystem + username, headers: {authorization}, body: { @@ -19,77 +19,23 @@ context("Schemas", { tags: '@schemas' }, () => { entity: "USER", status: "DRAFT", readonly: false, - document: { - "$id": "#${schemaUUID}", - "$comment": "{ \"@id\": \"schema:${schemaUUID}#${schemaUUID}\", \"term\": \"${schemaUUID}\" }", - "title": "wqe", - "description": "", - "type": "object", - "properties": { - "@context": { - "oneOf": [ + name: "test", + entity: "USER", + document: { - "type": "string" + $id: schemaUUID, + $comment:'{\"term\\": \"${schemaUUID}\\", \"@id\\": \"https://localhost/schema#${schemaUUID}\\"}', + title:"test", + description:" test", + type:"object", + properties:{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + type:{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + id:{"type":"string","readOnly":true}, + field0:{"title":"test field","description":"test field","readOnly":false,"$comment":'{\\"term\\": \\"field0\\", \\"@id\\": \\"https://www.schema.org/text\\"}',"type":"string"}}, + required:["@context","type"], + additionalProperties:false }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true }, - "type": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "id": { - "type": "string", - "readOnly": true - }, - "policyId": { - "title": "policyId", - "description": "policyId", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" - }, - "ref": { - "title": "ref", - "description": "ref", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" - } - }, - "required": [ - "@context", - "type", - "policyId" - ], - "additionalProperties": false, - "$defs": {} - }, - context: null, - contextURL: "schema:${schemaUUID}", - fields: [], - conditions: [], - active: false, - system: false, - category: "POLICY", - errors: [], - }, }).then((response) => { expect(response.status).eql(STATUS_CODE.SUCCESS); @@ -99,103 +45,48 @@ context("Schemas", { tags: '@schemas' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body[0]).to.have.property("uuid"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body[0]).to.have.property("uuid"); - let schemaUd = resp.body.at(0).uuid; + let schemaUd = response.body.at(0).uuid; expect(schemaUd).to.equal(schemaUUID); - let schemaId = resp.body.at(0).id; + let schemaId = response.body.at(0).id; cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.SchemasSystem + schemaId, headers: {authorization}, body: { - id: schemaId, - uuid: schemaUd, - name: "test", - description: "new", - entity: "USER", - status: "DRAFT", - readonly: false, - document: { - "$id": "#${schemaUUID}", - "$comment": "{ \"@id\": \"schema:${schemaUUID}#${schemaUUID}\", \"term\": \"${schemaUUID}\" }", - "title": "wqe", - "description": "", - "type": "object", - "properties": { - "@context": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "type": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "readOnly": true - }, - "id": { - "type": "string", - "readOnly": true - }, - "policyId": { - "title": "policyId", - "description": "policyId", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"policyId\",\"@id\":\"https://www.schema.org/text\"}" - }, - "ref": { - "title": "ref", - "description": "ref", - "readOnly": true, - "type": "string", - "$comment": "{\"term\":\"ref\",\"@id\":\"https://www.schema.org/text\"}" - } + id: schemaId, + uuid: schemaUd, + description: "new", + hash: "", + status: "DRAFT", + readonly: false, + name: "test", + entity: "USER", + document: + { + $id: schemaUUID, + $comment:'{\"term\\": \"${schemaUUID}\\", \"@id\\": \"https://localhost/schema#${schemaUUID}\\"}', + title:"test", + description:" test", + type:"object", + properties:{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + type:{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true}, + id:{"type":"string","readOnly":true}, + field0:{"title":"test field","description":"test field","readOnly":false,"$comment":'{\\"term\\": \\"field0\\", \\"@id\\": \\"https://www.schema.org/text\\"}',"type":"string"}}, + required:["@context","type"], + additionalProperties:false }, - "required": [ - "@context", - "type", - "policyId" - ], - "additionalProperties": false, - "$defs": {} - }, - context: null, - contextURL: "schema:${schemaUUID}", - fields: [], - conditions: [], - active: false, - system: false, - category: "POLICY", - errors: [], }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); //Delete schema cy.request({ - method: "DELETE", + method: METHOD.DELETE, url: API.ApiServer + API.SchemasSystem + diff --git a/e2e-tests/cypress/e2e/api-tests/settings/getSettings.cy.js b/e2e-tests/cypress/e2e/api-tests/settings/getSettings.cy.js index 0ef5dc6d3d..806d467119 100644 --- a/e2e-tests/cypress/e2e/api-tests/settings/getSettings.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/settings/getSettings.cy.js @@ -2,9 +2,9 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Settings',{ tags: '@settings' }, () => { +context('Settings',{ tags: ['settings', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); - it('Get current settings', () => { + it('Get current settings', { tags: ['smoke'] }, () => { cy.request({ method: 'GET', url: API.ApiServer + 'settings', @@ -13,7 +13,7 @@ context('Settings',{ tags: '@settings' }, () => { }, }) .then((response) => { - expect(response.status).to.eq(200) + expect(response.status).to.eq(STATUS_CODE.OK) expect(response.body).to.have.property('ipfsStorageApiKey') expect(response.body).to.have.property('operatorId') expect(response.body).to.have.property('operatorKey') diff --git a/e2e-tests/cypress/e2e/api-tests/settings/getSettingsEnv.cy.js b/e2e-tests/cypress/e2e/api-tests/settings/getSettingsEnv.cy.js index c3a2c64b57..b5f6dd73ac 100644 --- a/e2e-tests/cypress/e2e/api-tests/settings/getSettingsEnv.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/settings/getSettingsEnv.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Settings", { tags: '@settings' }, () => { +context("Settings", { tags: ['settings', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Get current environment name", () => { @@ -11,9 +11,9 @@ context("Settings", { tags: '@settings' }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body).eql("testnet"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).eql("testnet"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/settings/postSettings.cy.js b/e2e-tests/cypress/e2e/api-tests/settings/postSettings.cy.js index f8845f80ad..a546525c99 100644 --- a/e2e-tests/cypress/e2e/api-tests/settings/postSettings.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/settings/postSettings.cy.js @@ -2,9 +2,9 @@ import {METHOD, STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context('Settings', {tags: '@settings'}, () => { +context('Settings', { tags: ['settings', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); - it('Set settings', () => { + it('Set settings', { tags: ['smoke'] }, () => { cy.request({ method: 'POST', url: API.ApiServer + 'settings', @@ -18,7 +18,7 @@ context('Settings', {tags: '@settings'}, () => { } }) .then((response) => { - expect(response.status).to.eq(201) + expect(response.status).to.eq(STATUS_CODE.SUCCESS) }) }) }) diff --git a/e2e-tests/cypress/e2e/api-tests/tags/deleteContractTag.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/deleteContractTag.cy.js index a487aabf0c..4ff03fbdf5 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/deleteContractTag.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/deleteContractTag.cy.js @@ -1,8 +1,8 @@ -import {STATUS_CODE} from "../../../support/api/api-const"; +import {STATUS_CODE, METHOD} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const tagName = "contractTagAPI" + Math.floor(Math.random() * 999999); const contactName = "contractNameAPI" + Math.floor(Math.random() * 999999); const authorization = Cypress.env("authorization"); @@ -11,7 +11,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.ListOfContracts, headers: { authorization, @@ -41,7 +41,7 @@ context("Tags", {tags: '@tags'}, () => { }); }); - it("Delete tag", () => { + it("Delete tag", { tags: ['smoke'] }, () => { cy.request({ method: 'DELETE', url: API.ApiServer + API.Tags + tagId, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/deleteModuleTag.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/deleteModuleTag.cy.js index 4d8d23e5e3..87f88f5a68 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/deleteModuleTag.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/deleteModuleTag.cy.js @@ -2,7 +2,7 @@ import {METHOD, STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const tagName = "moduleTagAPI" + Math.floor(Math.random() * 999999); const moduleName = "moduleNameAPI" + Math.floor(Math.random() * 999999); const authorization = Cypress.env("authorization"); diff --git a/e2e-tests/cypress/e2e/api-tests/tags/deletePolicyTag.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/deletePolicyTag.cy.js index e884a65160..a5ecd8089d 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/deletePolicyTag.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/deletePolicyTag.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const policyTag = "Tag_16850108144002" + Math.floor(Math.random() * 999999); const tagName = "policyTagAPI" + Math.floor(Math.random() * 999999); const policyName = "policyNameAPI" + Math.floor(Math.random() * 999999); @@ -13,7 +13,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create policy and tag for tag deletion cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Policies, headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/deleteTagSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/deleteTagSchema.cy.js index c98438476b..85e079ccf5 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/deleteTagSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/deleteTagSchema.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "tagSchemaAPI" + Math.floor(Math.random() * 999999); const tagId = "d0e99e70-3511-486668e-bf6f-10041e9a0cb7" + Math.floor(Math.random() * 999999); @@ -11,7 +11,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create tag schema for delete cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Tags + "schemas", headers: { authorization, @@ -93,7 +93,7 @@ context("Tags", {tags: '@tags'}, () => { it("Delete tag(schema)", () => { //delete tag schema cy.request({ - method: "DELETE", + method: METHOD.DELETE, url: API.ApiServer + API.Tags + "schemas/" + schemaId, headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/getPublishedSchemas.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/getPublishedSchemas.cy.js index 5d60887b15..d6831d22f7 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/getPublishedSchemas.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/getPublishedSchemas.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "tagSchemaAPI" + Math.floor(Math.random() * 999999); const tagId = "d0e99e70-3511-486668e-bf6f-10041e9a0cb7" + Math.floor(Math.random() * 999999); @@ -11,7 +11,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create tag schema for publish cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Tags + "schemas", headers: { authorization, @@ -88,7 +88,7 @@ context("Tags", {tags: '@tags'}, () => { }).then((response) => { schemaId = response.body.id; cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.Tags + "schemas/" + schemaId + "/publish", headers: { authorization, @@ -101,7 +101,7 @@ context("Tags", {tags: '@tags'}, () => { it("Get a list of all published schemas", () => { //get published tag schemas cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Tags + "schemas/" + "published", headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/getTagSchemas.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/getTagSchemas.cy.js index bcc8b6cc63..d746d564d1 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/getTagSchemas.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/getTagSchemas.cy.js @@ -1,8 +1,8 @@ -import {STATUS_CODE} from "../../../support/api/api-const"; +import {STATUS_CODE, METHOD} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "tagSchemaAPI" + Math.floor(Math.random() * 999999); const tagId = "d0e99e70-3511-486668e-bf6f-10041e9a0cb7" + Math.floor(Math.random() * 999999); @@ -10,7 +10,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Tags + "schemas", headers: { authorization, @@ -89,10 +89,10 @@ context("Tags", {tags: '@tags'}, () => { }); }) - it("Get all schemas", () => { + it("Get all schemas", { tags: ['smoke'] }, () => { //get published tag schemas cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + API.Tags + "schemas/", headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/postContractTags.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/postContractTags.cy.js index ecf852fa47..f411fce0f3 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/postContractTags.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/postContractTags.cy.js @@ -1,8 +1,8 @@ -import {STATUS_CODE} from "../../../support/api/api-const"; +import {STATUS_CODE, METHOD} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "contractTagAPI" + Math.floor(Math.random() * 999999); const contactName = "contractNameAPI" + Math.floor(Math.random() * 999999); @@ -11,7 +11,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create a contract for tag addition cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.ListOfContracts, headers: { authorization, @@ -27,7 +27,7 @@ context("Tags", {tags: '@tags'}, () => { }); - it("Create new tag(contract)", () => { + it("Create new tag(contract)", { tags: ['smoke'] }, () => { cy.request({ method: 'POST', url: API.ApiServer + API.Tags, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/postModuleTags.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/postModuleTags.cy.js index 5682606847..50e683b55d 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/postModuleTags.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/postModuleTags.cy.js @@ -2,7 +2,7 @@ import {METHOD, STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "moduleTagAPI" + Math.floor(Math.random() * 999999); const moduleName = "moduleNameAPI" + Math.floor(Math.random() * 999999); diff --git a/e2e-tests/cypress/e2e/api-tests/tags/postPolicyTags.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/postPolicyTags.cy.js index 15d13e821f..85a9eda6dc 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/postPolicyTags.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/postPolicyTags.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const policyTag = "Tag_16850108144002" + Math.floor(Math.random() * 999999); const tagName = "policyTagAPI" + Math.floor(Math.random() * 999999); @@ -13,7 +13,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create a policy for tag addition cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Policies, headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/postSearchTags.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/postSearchTags.cy.js index f256a71446..f98b742869 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/postSearchTags.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/postSearchTags.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "contractTagAPI" + Math.floor(Math.random() * 999999); const contactName = "contractNameAPI" + Math.floor(Math.random() * 999999); @@ -12,7 +12,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create a contract for tag searching cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.ListOfContracts, headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/postTagSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/postTagSchema.cy.js index e96cf24940..9bcf51da5a 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/postTagSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/postTagSchema.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "tagSchemaAPI" + Math.floor(Math.random() * 999999); const tagId = "d0e99e70-3511-486668e-bf6f-10041e9a0cb7" + Math.floor(Math.random() * 999999); @@ -10,7 +10,7 @@ context("Tags", {tags: '@tags'}, () => { it("Create new schema", () => { //create tag schema cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Tags + "schemas", headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/putPublishTagSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/putPublishTagSchema.cy.js index 9a5b29cede..fe92664a5a 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/putPublishTagSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/putPublishTagSchema.cy.js @@ -1,8 +1,8 @@ -import {STATUS_CODE} from "../../../support/api/api-const"; +import {STATUS_CODE, METHOD} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "tagSchemaAPI" + Math.floor(Math.random() * 999999); const tagId = "d0e99e70-3511-486668e-bf6f-10041e9a0cb7" + Math.floor(Math.random() * 999999); @@ -11,7 +11,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create tag schema for publish cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Tags + "schemas", headers: { authorization, @@ -90,10 +90,10 @@ context("Tags", {tags: '@tags'}, () => { }); }) - it("Publish the schema with the provided (internal) schema ID", () => { + it("Publish the schema with the provided (internal) schema ID", { tags: ['smoke'] }, () => { //publish tag schema cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.Tags + "schemas/" + schemaId + "/publish", headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/putTagSchema.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/putTagSchema.cy.js index 1925eaa2b8..1d24176f3e 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/putTagSchema.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/putTagSchema.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "tagSchemaAPI" + Math.floor(Math.random() * 999999); const tagId = "d0e99e70-3511-486668e-bf6f-10041e9a0cb7" + Math.floor(Math.random() * 999999); @@ -11,7 +11,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create tag schema for edit cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.Tags + "schemas", headers: { authorization, @@ -95,7 +95,7 @@ context("Tags", {tags: '@tags'}, () => { it("Update the schema with the provided schema ID", () => { //edit tag schema cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + API.Tags + "schemas/" + schemaId, headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tags/synchronizationTag.cy.js b/e2e-tests/cypress/e2e/api-tests/tags/synchronizationTag.cy.js index d3d4352726..9c2d451812 100644 --- a/e2e-tests/cypress/e2e/api-tests/tags/synchronizationTag.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tags/synchronizationTag.cy.js @@ -2,7 +2,7 @@ import {STATUS_CODE} from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tags", {tags: '@tags'}, () => { +context("Tags", { tags: ['tags', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const tagName = "contractTagAPI" + Math.floor(Math.random() * 999999); const contactName = "contractNameAPI" + Math.floor(Math.random() * 999999); @@ -11,7 +11,7 @@ context("Tags", {tags: '@tags'}, () => { before(() => { //create a contract for tag synchronization cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.ListOfContracts, headers: { authorization, diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/getTokens.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/getTokens.cy.js index 6caf64e3eb..4e034996bf 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/getTokens.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/getTokens.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens", { tags: '@tokens' },() => { +context("Tokens", { tags: ['tokens', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); it("Get all tokens", () => { @@ -11,11 +11,11 @@ context("Tokens", { tags: '@tokens' },() => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body[0]).to.have.property("_id"); - expect(resp.body[0]).to.have.property("tokenId"); - expect(resp.body[0]).to.have.property("tokenName"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body[0]).to.have.property("_id"); + expect(response.body[0]).to.have.property("tokenId"); + expect(response.body[0]).to.have.property("tokenName"); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/getUserInfoSelectedToken.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/getUserInfoSelectedToken.cy.js index ec6ea5b772..1f50fdaf92 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/getUserInfoSelectedToken.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/getUserInfoSelectedToken.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens", { tags: "@tokens" }, () => { +context("Tokens", { tags: ['tokens', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const user = Cypress.env("root_user"); @@ -12,13 +12,13 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body[0]).to.have.property("_id"); - expect(resp.body[0]).to.have.property("tokenId"); - expect(resp.body[0]).to.have.property("tokenName"); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body[0]).to.have.property("_id"); + expect(response.body[0]).to.have.property("tokenId"); + expect(response.body[0]).to.have.property("tokenName"); - const topicUid = resp.body[0].tokenId; + const topicUid = response.body[0].tokenId; cy.request({ method: METHOD.GET, @@ -32,9 +32,9 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - expect(resp.body).to.not.be.oneOf([null, ""]); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + expect(response.body).to.not.be.oneOf([null, ""]); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/postPushTokens.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/postPushTokens.cy.js index 966782346e..b438eaa9bc 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/postPushTokens.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/postPushTokens.cy.js @@ -1,12 +1,12 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens", { tags: '@tokens' },() => { +context("Tokens", { tags: ['tokens', 'thirdPool'] },() => { const authorization = Cypress.env("authorization"); it("Push create a new token", () => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.ListOfTokens + "push", headers: { authorization }, body: { diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/postTokens.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/postTokens.cy.js index e8895c968f..709e94178f 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/postTokens.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/postTokens.cy.js @@ -1,12 +1,12 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens",{ tags: '@tokens' }, () => { +context("Tokens",{ tags: ['tokens', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); it("Create a new token", () => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + API.ListOfTokens, headers: { authorization }, body: { diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/putDissociateAssociate.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/putDissociateAssociate.cy.js index a7dc790f4b..e1c7759e44 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/putDissociateAssociate.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/putDissociateAssociate.cy.js @@ -1,8 +1,8 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens",{ tags: '@tokens' }, () => { - const username = "Installer"; +context("Tokens",{ tags: ['tokens', 'thirdPool'] }, () => { + let username = "Installer"; before(() => { cy.request({ method: 'POST', @@ -46,7 +46,7 @@ context("Tokens",{ tags: '@tokens' }, () => { const authorization = Cypress.env("authorization"); - it("Associate and disassociate the user with the provided Hedera token", () => { + it("Associate and disassociate the user with the provided Hedera token", { tags: ['smoke'] }, () => { cy.request({ method: 'POST', url: API.ApiServer + 'accounts/login', diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/putFreezeUnfreeze.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/putFreezeUnfreeze.cy.js index 115aa2f0ac..8c7f7e7dba 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/putFreezeUnfreeze.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/putFreezeUnfreeze.cy.js @@ -1,11 +1,11 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens", { tags: "@tokens" }, () => { +context("Tokens", { tags: ['tokens', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const user = "Installer"; - it("Freeze and unfreeze transfers of the specified token for the user", () => { + it("Freeze and unfreeze transfers of the specified token for the user", { tags: ['smoke'] }, () => { //associate token cy.request({ method: 'POST', @@ -50,11 +50,11 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); - let token = resp.body.tokenId; - let frozen = resp.body.frozen; + let token = response.body.tokenId; + let frozen = response.body.frozen; expect(token).to.deep.equal(tokenId); expect(frozen).to.be.true; @@ -71,11 +71,11 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); - let token = resp.body.tokenId; - let frozen = resp.body.frozen; + let token = response.body.tokenId; + let frozen = response.body.frozen; expect(token).to.deep.equal(tokenId); expect(frozen).to.be.false; diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/putGrantRevokeKyc.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/putGrantRevokeKyc.cy.js index 81e870270b..8a963292dd 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/putGrantRevokeKyc.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/putGrantRevokeKyc.cy.js @@ -1,11 +1,11 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens", { tags: "@tokens" }, () => { +context("Tokens", { tags: ['tokens', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const user = "Installer"; - it("Set and unset the KYC flag for the user", () => { + it("Set and unset the KYC flag for the user", { tags: ['smoke'] }, () => { //grant kyc cy.request({ method: 'POST', @@ -29,9 +29,9 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization: accessToken } - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - let tokenId = resp.body.at(-1).tokenId + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let tokenId = response.body.at(-1).tokenId cy.request({ method: METHOD.PUT, url: @@ -44,10 +44,10 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - let token = resp.body.tokenId; - let kyc = resp.body.kyc; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let token = response.body.tokenId; + let kyc = response.body.kyc; expect(token).to.deep.equal(tokenId); expect(kyc).to.be.true; cy.request({ @@ -62,10 +62,10 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); - let token = resp.body.tokenId; - let kyc = resp.body.kyc; + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); + let token = response.body.tokenId; + let kyc = response.body.kyc; expect(token).to.deep.equal(tokenId); expect(kyc).to.be.false; }); diff --git a/e2e-tests/cypress/e2e/api-tests/tokens/putPushGrandRevokeKyc.cy.js b/e2e-tests/cypress/e2e/api-tests/tokens/putPushGrandRevokeKyc.cy.js index 4b90c3fdc3..7838727c5f 100644 --- a/e2e-tests/cypress/e2e/api-tests/tokens/putPushGrandRevokeKyc.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/tokens/putPushGrandRevokeKyc.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Tokens", { tags: "@tokens" }, () => { +context("Tokens", { tags: ['tokens', 'thirdPool'] }, () => { const authorization = Cypress.env("authorization"); const user = Cypress.env("root_user"); @@ -12,10 +12,10 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); - const tokenId = resp.body[0].tokenId; + const tokenId = response.body[0].tokenId; cy.request({ method: METHOD.PUT, @@ -30,8 +30,8 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.ACCEPTED); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ACCEPTED); }); }); }); @@ -43,10 +43,10 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.OK); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.OK); - const tokenId = resp.body[0].tokenId; + const tokenId = response.body[0].tokenId; cy.request({ method: METHOD.PUT, @@ -61,8 +61,8 @@ context("Tokens", { tags: "@tokens" }, () => { headers: { authorization, }, - }).then((resp) => { - expect(resp.status).eql(STATUS_CODE.ACCEPTED); + }).then((response) => { + expect(response.status).eql(STATUS_CODE.ACCEPTED); }); }); }); diff --git a/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchains.cy.js b/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchains.cy.js index 44cf4c3399..11f5db64d1 100644 --- a/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchains.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchains.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Trustchains", { tags: '@trustchains' },() => { +context("Trustchains", { tags: ['trustchains', 'thirdPool'] },() => { let username = 'Auditor' before(() => { cy.request({ @@ -13,8 +13,8 @@ context("Trustchains", { tags: '@trustchains' },() => { } }).then((responseWithRT) => { cy.request({ - method: "POST", - url: API.ApiServer + "accounts/access-token", + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, body: { refreshToken: responseWithRT.body.refreshToken } @@ -44,8 +44,8 @@ context("Trustchains", { tags: '@trustchains' },() => { } }).then((responseWithRT) => { cy.request({ - method: "POST", - url: API.ApiServer+"accounts/access-token", + method: METHOD.POST, + url: API.ApiServer+API.AccessToken, body: { refreshToken: responseWithRT.body.refreshToken } diff --git a/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchainsHash.cy.js b/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchainsHash.cy.js index b6746084c6..ae0148ef93 100644 --- a/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchainsHash.cy.js +++ b/e2e-tests/cypress/e2e/api-tests/trustchains/getTrustchainsHash.cy.js @@ -1,7 +1,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const"; import API from "../../../support/ApiUrls"; -context("Trustchains", { tags: '@trustchains' }, () => { +context("Trustchains", { tags: ['trustchains', 'thirdPool'] }, () => { let username = 'Auditor' before(() => { cy.request({ @@ -13,8 +13,8 @@ context("Trustchains", { tags: '@trustchains' }, () => { } }).then((responseWithRT) => { cy.request({ - method: "POST", - url: API.ApiServer + "accounts/access-token", + method: METHOD.POST, + url: API.ApiServer + API.AccessToken, body: { refreshToken: responseWithRT.body.refreshToken } @@ -46,8 +46,8 @@ context("Trustchains", { tags: '@trustchains' }, () => { // } // }).then((responseWithRT) => { // cy.request({ - // method: "POST", - // url: API.ApiServer + "accounts/access-token", + // method: METHOD.POST, + // url: API.ApiServer + API.AccessToken, // body: { // refreshToken: responseWithRT.body.refreshToken // } @@ -61,7 +61,7 @@ context("Trustchains", { tags: '@trustchains' }, () => { // authorization: accessToken // } // }).then((response) => { - // expect(response.status).to.eq(200); + // expect(response.status).to.eq(STATUS_CODE.OK); // let hash = response.body[0].hash; // cy.request({ // method: 'GET', @@ -70,7 +70,7 @@ context("Trustchains", { tags: '@trustchains' }, () => { // authorization: accessToken // } // }).then((response) => { - // expect(response.status).to.eq(200); + // expect(response.status).to.eq(STATUS_CODE.OK); // }) // }) // }) diff --git a/e2e-tests/cypress/e2e/irec.cy.js b/e2e-tests/cypress/e2e/irec.cy.js index 23464ae55d..805fa06fba 100644 --- a/e2e-tests/cypress/e2e/irec.cy.js +++ b/e2e-tests/cypress/e2e/irec.cy.js @@ -1,4 +1,4 @@ -import { METHOD, STATUS_CODE } from "../support/api/api-const"; +import { METHOD, STATUS_CODE } from "../../support/api/api-const"; import API from "../support/ApiUrls"; context("IREC e2e test", { tags: "@e2e" }, () => { @@ -13,7 +13,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { role: "STANDARD_REGISTRY", }) .should((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); expect(response.body).to.have.property("username", name); expect(response.body).to.have.property( "role", @@ -26,7 +26,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { username: name, password: "test", }).should((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.have.property("username", name); expect(response.body).to.have.property( "role", @@ -73,7 +73,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { authorization: accessToken, }, }).should((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.have.property( "confirmed" ); @@ -99,7 +99,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { it("Policy", () => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + "policies/import/message", body: { messageId: "1678461680.254393969" }, //iRec headers: { @@ -107,7 +107,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { }, timeout: 180000, }).then((response) => { - expect(response.status).to.eq(201); + expect(response.status).to.eq(STATUS_CODE.SUCCESS); let firstPolicyId = response.body[0].id; let firstPolicyStatus = response.body[0].status; @@ -121,7 +121,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { }).should((response) => { let secondPolicyId = response.body.policies[0].id; let policyStatus = response.body.policies[0].status; - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.not.be.oneOf([null, ""]); expect(firstPolicyId).to.equal(secondPolicyId); expect(policyStatus).to.equal("PUBLISH"); @@ -138,7 +138,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { role: "USER", }) .then(() => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + "accounts/login", body: { username: installer, @@ -181,7 +181,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { authorization: accessTokenInstaller, }, }).should((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); expect(response.body).to.have.property( "confirmed" ); @@ -221,7 +221,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { authorization: accessTokenInstaller, }, }).then((response) => { - expect(response.status).to.eq(200); + expect(response.status).to.eq(STATUS_CODE.OK); cy.request({ method: METHOD.PUT, url: @@ -269,7 +269,7 @@ context("IREC e2e test", { tags: "@e2e" }, () => { // authorization: accessToken, // }, // }).then((response) => { - // expect(response.status).to.eq(200); + // expect(response.status).to.eq(STATUS_CODE.OK); // const roleUuid = response.body.id; diff --git a/e2e-tests/cypress/fixtures/StandardRegistryData.json b/e2e-tests/cypress/fixtures/StandardRegistryData.json index ce29dbc21a..f7ac9b44ce 100644 --- a/e2e-tests/cypress/fixtures/StandardRegistryData.json +++ b/e2e-tests/cypress/fixtures/StandardRegistryData.json @@ -1 +1 @@ -{"username":"StandardRegistry","role":"STANDARD_REGISTRY","permissions":["ACCOUNTS_STANDARD_REGISTRY_READ","DEMO_KEY_CREATE","IPFS_FILE_READ","IPFS_FILE_CREATE","PROFILES_USER_READ","PROFILES_USER_UPDATE","PROFILES_BALANCE_READ","ACCOUNTS_ACCOUNT_READ","ANALYTIC_POLICY_READ","ANALYTIC_MODULE_READ","ANALYTIC_TOOL_READ","ANALYTIC_SCHEMA_READ","ANALYTIC_DOCUMENT_READ","ARTIFACTS_FILE_READ","ARTIFACTS_FILE_CREATE","ARTIFACTS_FILE_DELETE","BRANDING_CONFIG_UPDATE","CONTRACTS_CONTRACT_READ","CONTRACTS_CONTRACT_CREATE","CONTRACTS_CONTRACT_DELETE","CONTRACTS_CONTRACT_MANAGE","CONTRACTS_WIPE_REQUEST_READ","CONTRACTS_WIPE_REQUEST_UPDATE","CONTRACTS_WIPE_REQUEST_DELETE","CONTRACTS_WIPE_REQUEST_REVIEW","CONTRACTS_WIPE_ADMIN_CREATE","CONTRACTS_WIPE_ADMIN_DELETE","CONTRACTS_WIPE_MANAGER_CREATE","CONTRACTS_WIPE_MANAGER_DELETE","CONTRACTS_WIPER_CREATE","CONTRACTS_WIPER_DELETE","CONTRACTS_POOL_READ","CONTRACTS_POOL_UPDATE","CONTRACTS_POOL_DELETE","CONTRACTS_RETIRE_REQUEST_READ","CONTRACTS_RETIRE_REQUEST_CREATE","CONTRACTS_RETIRE_REQUEST_DELETE","CONTRACTS_RETIRE_REQUEST_REVIEW","CONTRACTS_RETIRE_ADMIN_CREATE","CONTRACTS_RETIRE_ADMIN_DELETE","CONTRACTS_PERMISSIONS_READ","CONTRACTS_DOCUMENT_READ","LOG_LOG_READ","MODULES_MODULE_READ","MODULES_MODULE_CREATE","MODULES_MODULE_UPDATE","MODULES_MODULE_DELETE","MODULES_MODULE_REVIEW","POLICIES_POLICY_READ","POLICIES_POLICY_CREATE","POLICIES_POLICY_UPDATE","POLICIES_POLICY_DELETE","POLICIES_POLICY_REVIEW","POLICIES_POLICY_EXECUTE","POLICIES_POLICY_MANAGE","POLICIES_MIGRATION_CREATE","POLICIES_RECORD_ALL","SCHEMAS_SCHEMA_READ","SCHEMAS_SCHEMA_CREATE","SCHEMAS_SCHEMA_UPDATE","SCHEMAS_SCHEMA_DELETE","SCHEMAS_SCHEMA_REVIEW","SCHEMAS_SYSTEM_SCHEMA_READ","SCHEMAS_SYSTEM_SCHEMA_CREATE","SCHEMAS_SYSTEM_SCHEMA_UPDATE","SCHEMAS_SYSTEM_SCHEMA_DELETE","SCHEMAS_SYSTEM_SCHEMA_REVIEW","TOOLS_TOOL_READ","TOOLS_TOOL_CREATE","TOOLS_TOOL_UPDATE","TOOLS_TOOL_DELETE","TOOLS_TOOL_REVIEW","TOOL_MIGRATION_CREATE","TOKENS_TOKEN_READ","TOKENS_TOKEN_CREATE","TOKENS_TOKEN_UPDATE","TOKENS_TOKEN_DELETE","TOKENS_TOKEN_MANAGE","TAGS_TAG_READ","TAGS_TAG_CREATE","PROFILES_RESTORE_ALL","SUGGESTIONS_SUGGESTIONS_READ","SUGGESTIONS_SUGGESTIONS_UPDATE","SETTINGS_SETTINGS_READ","SETTINGS_SETTINGS_UPDATE","SETTINGS_THEME_READ","SETTINGS_THEME_CREATE","SETTINGS_THEME_UPDATE","SETTINGS_THEME_DELETE","PERMISSIONS_ROLE_READ","PERMISSIONS_ROLE_CREATE","PERMISSIONS_ROLE_UPDATE","PERMISSIONS_ROLE_DELETE","PERMISSIONS_ROLE_MANAGE","ACCESS_POLICY_ALL"],"did":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","hederaAccountId":"0.0.3567105","confirmed":true,"failed":false,"topicId":"0.0.4424972","parentTopicId":"0.0.1960","didDocument":{"createDate":"2024-06-07T13:32:05.000Z","updateDate":"2024-06-07T13:32:14.446Z","did":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","document":{"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","@context":"https://www.w3.org/ns/did/v1","verificationMethod":[{"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","publicKeyBase58":"QDui45JN8tAZyc8aNcgboL85f97MwpzPynvdNa3SfKaE4rKcvifvZKLV8hGNzza7"},{"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","publicKeyBase58":"oduCCULeuEW259Zi3BBjmMMe6ToUypfhUTrVjEtShsCap1zV6SaMMzLof1EBhJvACNfivtYF5iDDiGAU3TD29ANscq4We7pvaYSx6sX8Dqt7uAYiF5eZVXcCw8nu7yChsC5"}],"authentication":["did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]},"status":"CREATE","messageId":"1717767131.724519003","topicId":"0.0.4424972","verificationMethods":{"Ed25519VerificationKey2018":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key","Bls12381G2Key2020":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key-bbs"},"_id":"66630bd53a68a496240fbb36","id":"66630bd53a68a496240fbb36"},"vcDocument":{"createDate":"2024-06-07T13:32:42.356Z","updateDate":"2024-06-07T13:32:51.614Z","owner":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","hash":"3tn2ZMVKfgPoiSPi39Q5nTGX2UK8oMHfcV3mxLfMD5WU","document":{"id":"urn:uuid:e1ff8179-ebf9-45a7-bcf4-d993c3c4ecc9","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","issuanceDate":"2024-06-07T13:32:42.233Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"credentialSubject":[{"geography":"testGeography","law":"testLaw","tags":"testTags","@context":["ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","type":"StandardRegistry"}],"proof":{"type":"Ed25519Signature2018","created":"2024-06-07T13:32:42Z","verificationMethod":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..f-1MsU1QfK4jBCXRPry4pvm0QYotXbEjZOZ2zxWVI7L5eNzIwkEMkVp92u6aQSZX_FJjYyOuVmoY96MweJwGCw"}},"documentFileId":"66630c033a68a496240fbb4e","hederaStatus":"ISSUE","signature":0,"type":"STANDARD_REGISTRY","option":{"status":"NEW"},"messageId":"1717767167.386078137","topicId":"0.0.4424972","_id":"66630bfa3a68a496240fbb4d","id":"66630bfa3a68a496240fbb4d"},"accessToken":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlN0YW5kYXJkUmVnaXN0cnkiLCJkaWQiOiJkaWQ6aGVkZXJhOnRlc3RuZXQ6NUNGNnoxR1dlMlBiMnNtN0R1d1drOVdCTUNtUHc1Sk04Y0RHc1JBQnRIdERfMC4wLjQ0MjQ5NzIiLCJyb2xlIjoiU1RBTkRBUkRfUkVHSVNUUlkiLCJleHBpcmVBdCI6MTcxNzc2OTc5NTcwOCwiaWF0IjoxNzE3NzY5NzM1fQ.lWbvs8xcq2xiMVubq-30JZnBkAqWKqjNwF3to__HKic"} \ No newline at end of file +{"username":"StandardRegistry","role":"STANDARD_REGISTRY","permissions":["ACCOUNTS_STANDARD_REGISTRY_READ","DEMO_KEY_CREATE","IPFS_FILE_READ","IPFS_FILE_CREATE","PROFILES_USER_READ","PROFILES_USER_UPDATE","PROFILES_BALANCE_READ","ACCOUNTS_ACCOUNT_READ","ANALYTIC_POLICY_READ","ANALYTIC_MODULE_READ","ANALYTIC_TOOL_READ","ANALYTIC_SCHEMA_READ","ANALYTIC_DOCUMENT_READ","ARTIFACTS_FILE_READ","ARTIFACTS_FILE_CREATE","ARTIFACTS_FILE_DELETE","BRANDING_CONFIG_UPDATE","CONTRACTS_CONTRACT_READ","CONTRACTS_CONTRACT_CREATE","CONTRACTS_CONTRACT_DELETE","CONTRACTS_CONTRACT_MANAGE","CONTRACTS_WIPE_REQUEST_READ","CONTRACTS_WIPE_REQUEST_UPDATE","CONTRACTS_WIPE_REQUEST_DELETE","CONTRACTS_WIPE_REQUEST_REVIEW","CONTRACTS_WIPE_ADMIN_CREATE","CONTRACTS_WIPE_ADMIN_DELETE","CONTRACTS_WIPE_MANAGER_CREATE","CONTRACTS_WIPE_MANAGER_DELETE","CONTRACTS_WIPER_CREATE","CONTRACTS_WIPER_DELETE","CONTRACTS_POOL_READ","CONTRACTS_POOL_UPDATE","CONTRACTS_POOL_DELETE","CONTRACTS_RETIRE_REQUEST_READ","CONTRACTS_RETIRE_REQUEST_CREATE","CONTRACTS_RETIRE_REQUEST_DELETE","CONTRACTS_RETIRE_REQUEST_REVIEW","CONTRACTS_RETIRE_ADMIN_CREATE","CONTRACTS_RETIRE_ADMIN_DELETE","CONTRACTS_PERMISSIONS_READ","CONTRACTS_DOCUMENT_READ","LOG_LOG_READ","MODULES_MODULE_READ","MODULES_MODULE_CREATE","MODULES_MODULE_UPDATE","MODULES_MODULE_DELETE","MODULES_MODULE_REVIEW","POLICIES_POLICY_READ","POLICIES_POLICY_CREATE","POLICIES_POLICY_UPDATE","POLICIES_POLICY_DELETE","POLICIES_POLICY_REVIEW","POLICIES_POLICY_EXECUTE","POLICIES_POLICY_MANAGE","POLICIES_MIGRATION_CREATE","POLICIES_RECORD_ALL","SCHEMAS_SCHEMA_READ","SCHEMAS_SCHEMA_CREATE","SCHEMAS_SCHEMA_UPDATE","SCHEMAS_SCHEMA_DELETE","SCHEMAS_SCHEMA_REVIEW","SCHEMAS_SYSTEM_SCHEMA_READ","SCHEMAS_SYSTEM_SCHEMA_CREATE","SCHEMAS_SYSTEM_SCHEMA_UPDATE","SCHEMAS_SYSTEM_SCHEMA_DELETE","SCHEMAS_SYSTEM_SCHEMA_REVIEW","TOOLS_TOOL_READ","TOOLS_TOOL_CREATE","TOOLS_TOOL_UPDATE","TOOLS_TOOL_DELETE","TOOLS_TOOL_REVIEW","TOOL_MIGRATION_CREATE","TOKENS_TOKEN_READ","TOKENS_TOKEN_CREATE","TOKENS_TOKEN_UPDATE","TOKENS_TOKEN_DELETE","TOKENS_TOKEN_MANAGE","TAGS_TAG_READ","TAGS_TAG_CREATE","PROFILES_RESTORE_ALL","SUGGESTIONS_SUGGESTIONS_READ","SUGGESTIONS_SUGGESTIONS_UPDATE","SETTINGS_SETTINGS_READ","SETTINGS_SETTINGS_UPDATE","SETTINGS_THEME_READ","SETTINGS_THEME_CREATE","SETTINGS_THEME_UPDATE","SETTINGS_THEME_DELETE","PERMISSIONS_ROLE_READ","PERMISSIONS_ROLE_CREATE","PERMISSIONS_ROLE_UPDATE","PERMISSIONS_ROLE_DELETE","PERMISSIONS_ROLE_MANAGE","ACCESS_POLICY_ALL"],"did":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","hederaAccountId":"0.0.3567105","confirmed":true,"failed":false,"topicId":"0.0.4424972","parentTopicId":"0.0.1960","didDocument":{"createDate":"2024-06-07T13:32:05.000Z","updateDate":"2024-06-07T13:32:14.446Z","did":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","document":{"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","@context":"https://www.w3.org/ns/did/v1","verificationMethod":[{"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","publicKeyBase58":"QDui45JN8tAZyc8aNcgboL85f97MwpzPynvdNa3SfKaE4rKcvifvZKLV8hGNzza7"},{"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","publicKeyBase58":"oduCCULeuEW259Zi3BBjmMMe6ToUypfhUTrVjEtShsCap1zV6SaMMzLof1EBhJvACNfivtYF5iDDiGAU3TD29ANscq4We7pvaYSx6sX8Dqt7uAYiF5eZVXcCw8nu7yChsC5"}],"authentication":["did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]},"status":"CREATE","messageId":"1717767131.724519003","topicId":"0.0.4424972","verificationMethods":{"Ed25519VerificationKey2018":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key","Bls12381G2Key2020":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key-bbs"},"_id":"66630bd53a68a496240fbb36","id":"66630bd53a68a496240fbb36"},"vcDocument":{"createDate":"2024-06-07T13:32:42.356Z","updateDate":"2024-06-07T13:32:51.614Z","owner":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","hash":"3tn2ZMVKfgPoiSPi39Q5nTGX2UK8oMHfcV3mxLfMD5WU","document":{"id":"urn:uuid:e1ff8179-ebf9-45a7-bcf4-d993c3c4ecc9","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","issuanceDate":"2024-06-07T13:32:42.233Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"credentialSubject":[{"geography":"testGeography","law":"testLaw","tags":"testTags","@context":["ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"id":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972","type":"StandardRegistry"}],"proof":{"type":"Ed25519Signature2018","created":"2024-06-07T13:32:42Z","verificationMethod":"did:hedera:testnet:5CF6z1GWe2Pb2sm7DuwWk9WBMCmPw5JM8cDGsRABtHtD_0.0.4424972#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..f-1MsU1QfK4jBCXRPry4pvm0QYotXbEjZOZ2zxWVI7L5eNzIwkEMkVp92u6aQSZX_FJjYyOuVmoY96MweJwGCw"}},"documentFileId":"66630c033a68a496240fbb4e","hederaStatus":"ISSUE","signature":0,"type":"STANDARD_REGISTRY","option":{"status":"NEW"},"messageId":"1717767167.386078137","topicId":"0.0.4424972","_id":"66630bfa3a68a496240fbb4d","id":"66630bfa3a68a496240fbb4d"},"accessToken":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IlN0YW5kYXJkUmVnaXN0cnkiLCJkaWQiOiJkaWQ6aGVkZXJhOnRlc3RuZXQ6NUNGNnoxR1dlMlBiMnNtN0R1d1drOVdCTUNtUHc1Sk04Y0RHc1JBQnRIdERfMC4wLjQ0MjQ5NzIiLCJyb2xlIjoiU1RBTkRBUkRfUkVHSVNUUlkiLCJleHBpcmVBdCI6MTcxNzc2OTc5NTcwOCwiaWF0IjoxNzE3NzY5NzM1fQ.lWbvs8xcq2xiMVubq-30JZnBkAqWKqjNwF3to__HKic"} diff --git a/e2e-tests/cypress/fixtures/testJson.json b/e2e-tests/cypress/fixtures/testJson.json new file mode 100644 index 0000000000..224c3db0d3 --- /dev/null +++ b/e2e-tests/cypress/fixtures/testJson.json @@ -0,0 +1 @@ +{"yellow": "sun","green": "grass"} \ No newline at end of file diff --git a/e2e-tests/cypress/fixtures/testJsonCid b/e2e-tests/cypress/fixtures/testJsonCid new file mode 100644 index 0000000000..ffd84982c7 --- /dev/null +++ b/e2e-tests/cypress/fixtures/testJsonCid @@ -0,0 +1 @@ +bafkreibzh3fkvxmkgqrvvzxuzdifs5hbopblidozijwpyb7ewvmuy7lkku \ No newline at end of file diff --git a/e2e-tests/cypress/fixtures/testJsonDR.json b/e2e-tests/cypress/fixtures/testJsonDR.json new file mode 100644 index 0000000000..5d33dc605b --- /dev/null +++ b/e2e-tests/cypress/fixtures/testJsonDR.json @@ -0,0 +1 @@ +{"red": "rose","blue": "sky"} \ No newline at end of file diff --git a/e2e-tests/cypress/fixtures/tokenId.txt b/e2e-tests/cypress/fixtures/tokenId.txt deleted file mode 100644 index 98c56fd3b4..0000000000 --- a/e2e-tests/cypress/fixtures/tokenId.txt +++ /dev/null @@ -1 +0,0 @@ - 0.0.5843142 \ No newline at end of file diff --git a/e2e-tests/cypress/plugins/index.js b/e2e-tests/cypress/plugins/index.js index 4a3ef3f88f..0865797059 100644 --- a/e2e-tests/cypress/plugins/index.js +++ b/e2e-tests/cypress/plugins/index.js @@ -17,6 +17,8 @@ */ // eslint-disable-next-line no-unused-vars const selectTestsWithGrep = require('cypress-select-tests/grep') +const registerCypressGrep = require('@cypress/grep') +registerCypressGrep() module.exports = (on, config) => { on('file:preprocessor', selectTestsWithGrep(config)) } \ No newline at end of file diff --git a/e2e-tests/cypress/support/ApiUrls.js b/e2e-tests/cypress/support/ApiUrls.js index bb773c2654..4258c4707c 100644 --- a/e2e-tests/cypress/support/ApiUrls.js +++ b/e2e-tests/cypress/support/ApiUrls.js @@ -1,5 +1,6 @@ const API = { ApiServer: "http://localhost:" + Cypress.env("portApi") + "/", + //Accounts Accounts: "accounts/", AccountsLogin: "accounts/login/", @@ -11,6 +12,7 @@ const API = { Balance: "accounts/balance", AccountRegister: "accounts/register", AccountSession: "accounts/session", + //Analytics PolicyCompare: "analytics/compare/policies/", SchemaCompare: "analytics/compare/schemas/", @@ -18,58 +20,82 @@ const API = { ToolCompare: "analytics/compare/tools/", PolicySearch: "analytics/search/policies/", BlockSearch: "analytics/search/blocks/", + //Profiles Profiles: "profiles/", + //Tokens ListOfTokens: "tokens/", + //Contracts ListOfContracts: "contracts/", + ImportContracts: "contracts/import/", + ContractPermissions: "permissions/", ListOfPairs: "contracts/pairs/", RetireRequests: "contracts/retire/requests/", WipeRequests: "contracts/wipe/requests/", RetireContract: "contracts/retire/", + WipeContract: "contracts/wipe/", PoolContract: "pools/", + Retire: "retire/", + RetirePools: "contracts/retire/pools/", + ManagerRole: "manager/", + WiperRole: "wiper/", + AdminRole: "admin/", + SyncPools: "pools/sync", + //Modules ListOfAllModules: "modules/", ListOfModules: "modules/menu/", ExportMessage: "export/message/", ImportMessage: "import/message/", ImportFile: "import/file/", + //Logs Logs: "logs", LogsAttributes: "logs/attributes/", + //Schemas PolicySchemas: "schemas?category=POLICY", Schemas: "schemas/", Schema: "schema/", SchemasSystem: "schemas/system/", SchemasSystemEntity: "schemas/system/entity/", - SchemaImportMsgPreview: - "schemas/import/message/preview", - SchemaImportFilePreview: - "schemas/import/file/preview", + SchemaImportMsgPreview: "schemas/import/message/preview", + SchemaImportFilePreview: "schemas/import/file/preview", SchemaImport: "schemas/import/", SchemasType: "schemas/type", + //Tools Tools: "tools", ToolsImportMsg: "tools/import/message", + //TrustChains Trustchains: "trust-chains/", + //Settings SettingsEnv: "settings/environment", + //External External: "external", + //ipfs - IPFSFile: "ipfs/file", + IPFSFile: "ipfs/file/", + IPFS: "ipfs/", + //Demo RandomKey: "demo/random-key", + RegUsers: "demo/registered-users", + //Policies Policies: "policies/", PolicisImportMsg: "policies/import/message/", + PolicisImportMsgPush: "policies/push/import/message/", PolicisImportFile: "policies/import/file/", PolicisImportMsgPreview: "policies/import/message/preview", PolicisImportMsgPreviewPush: "policies/push/import/message/preview", PolicyGroups: "groups/", + DryRun: "groups/", ChooseRegistrantRole: "tag/choose_role/blocks/", CreateApplication: "tag/create_application/blocks", WaitForApproveApplication: "tag/wait_for_approve", @@ -86,16 +112,23 @@ const API = { ApproveIssueRequestsBtn: "tag/approve_issue_requests_btn/blocks", CreateIssue: "tag/create_issue_request_form/blocks", - - //Artifacts - Artifacts: "artifacts/", + Artifacts: "artifacts/", + + //Tags Tags: "tags/", + //General ExportCSV: "export?type=csv", ExportFile: "export/file", Async: "push/", Publish: "publish/", - Blocks: "blocks/" + Blocks: "blocks/", + Approve: "approve/", + Reject: "reject/", + Cancel: "cancel/", + Requests: "requests/", + Disable: "disable/", + Enable: "enable/" }; export default API; diff --git a/e2e-tests/cypress/support/GuardianUrls.js b/e2e-tests/cypress/support/GuardianUrls.js index cf7afa2ce7..e93991a267 100644 --- a/e2e-tests/cypress/support/GuardianUrls.js +++ b/e2e-tests/cypress/support/GuardianUrls.js @@ -3,7 +3,6 @@ const PORT = 4200; const URL = { // Web Root: "http://localhost:"+PORT+"", - //Tabs Policies: "/policy-viewer", diff --git a/e2e-tests/cypress/support/api/api-const.js b/e2e-tests/cypress/support/api/api-const.js index c42027068b..bb6a959bd4 100644 --- a/e2e-tests/cypress/support/api/api-const.js +++ b/e2e-tests/cypress/support/api/api-const.js @@ -11,6 +11,7 @@ export const STATUS_CODE = { SUCCESS: 201, ACCEPTED: 202, NO_CONTENT: 204, + NOT_MODIFIED: 304, BAD_REQUEST: 400, UNAUTHORIZED: 401, FORBIDDEN: 403, diff --git a/e2e-tests/cypress/support/checkingMethods.js b/e2e-tests/cypress/support/checkingMethods.js new file mode 100644 index 0000000000..0263d863d1 --- /dev/null +++ b/e2e-tests/cypress/support/checkingMethods.js @@ -0,0 +1,148 @@ + +export const whileWipeRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileWipeRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileWipeRequestCreating(dataToCompare, request, attempts) + } + }) + } +} + +export const whileRetireRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.at(0)?.contractId) + whileRetireRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.at(0).contractId + if (data !== dataToCompare) + whileRetireRequestCreating(dataToCompare, request, attempts) + } + }) + } +} + +export const whileApplicationCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.uiMetaData?.title) + whileApplicationCreating(dataToCompare, request, attempts) + else { + let data = response.body.uiMetaData.title + if (data !== dataToCompare) + whileApplicationCreating(dataToCompare, request, attempts) + } + }) + } +} + +export const whileApplicationApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.fields) + whileApplicationApproving(dataToCompare, request, attempts) + else { + let data = response.body.fields[0]?.title + if (data !== dataToCompare) + whileApplicationApproving(dataToCompare, request, attempts) + } + }) + } +} + +export const whileDeviceCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceCreating(dataToCompare, request, attempts) + } + }) + } +} + +export const whileDeviceApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileDeviceApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileDeviceApproving(dataToCompare, request, attempts) + } + }) + } +} + +export const whileIssueRequestCreating = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestCreating(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestCreating(dataToCompare, request, attempts) + } + }) + } +} + +export const whileIssueRequestApproving = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body?.data) + whileIssueRequestApproving(dataToCompare, request, attempts) + else { + let data = response.body.data[0]?.[optionKey]?.status + if (data !== dataToCompare) + whileIssueRequestApproving(dataToCompare, request, attempts) + } + }) + } +} + +export const whileBalanceVerifying = (dataToCompare, request, attempts) => { + if (attempts < 100) { + attempts++ + let balance + cy.wait(3000) + cy.request(request).then((response) => { + if (!response?.body) + whileBalanceVerifying(dataToCompare, request, attempts) + else { + for (let i = 0; i < response.body.length; i++) { + if (response.body[i].tokenId === tokenId) + balance = response.body[i].balance + } + if (balance !== dataToCompare) + whileBalanceVerifying(dataToCompare, request, attempts) + } + }) + } +} \ No newline at end of file diff --git a/e2e-tests/cypress/support/e2e.js b/e2e-tests/cypress/support/e2e.js index 32c60f5125..7ca723642e 100644 --- a/e2e-tests/cypress/support/e2e.js +++ b/e2e-tests/cypress/support/e2e.js @@ -17,6 +17,7 @@ import "./commands"; import "./api/api-helper"; import "cypress-mochawesome-reporter/register"; +import { METHOD, STATUS_CODE } from "../support/api/api-const"; import API from "./ApiUrls"; @@ -36,7 +37,7 @@ const authorization = Cypress.env("authorization"); before(() => { let username = "StandardRegistry"; cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + "accounts/login", body: { username: username, @@ -44,14 +45,14 @@ before(() => { } }).then((responseWithRT) => { cy.request({ - method: "POST", + method: METHOD.POST, url: API.ApiServer + "accounts/access-token", body: { refreshToken: responseWithRT.body.refreshToken } }).then((responseWithAT) => { cy.request({ - method: "GET", + method: METHOD.GET, url: API.ApiServer + "profiles/" + username, headers: { authorization: "Bearer " + responseWithAT.body.accessToken, @@ -59,7 +60,7 @@ before(() => { }).then((response) => { if (response.body.confirmed === false) { cy.request({ - method: "PUT", + method: METHOD.PUT, url: API.ApiServer + "profiles/" + username, headers: { authorization: authorization, diff --git a/e2e-tests/package-lock.json b/e2e-tests/package-lock.json index c79e54a879..0617be7c5c 100644 --- a/e2e-tests/package-lock.json +++ b/e2e-tests/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@bahmutov/cy-api": "^2.1.3", - "@cypress/grep": "^4.0.2", + "@cypress/grep": "^4.1.0", "cypress-multi-reporters": "^1.6.4", "cypress-tags": "^1.2.2", "mocha-junit-reporter": "^2.2.1", @@ -25,10 +25,10 @@ "cypress-select-tests": "^1.7.1" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "node_modules/@babel/code-frame": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" @@ -37,16 +37,61 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/@babel/compat-data": { @@ -90,9 +135,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dependencies": { "@babel/types": "^7.24.7", "@jridgewell/gen-mapping": "^0.3.5", @@ -219,20 +264,17 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dependencies": { - "@babel/types": "^7.24.7" - }, + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { "@babel/template": "^7.24.7", "@babel/types": "^7.24.7" @@ -242,9 +284,9 @@ } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dependencies": { "@babel/types": "^7.24.7" }, @@ -306,9 +348,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", - "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "engines": { "node": ">=6.9.0" } @@ -370,9 +412,9 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dependencies": { "@babel/types": "^7.24.7" }, @@ -381,17 +423,17 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } @@ -419,9 +461,9 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz", + "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==", "dependencies": { "@babel/template": "^7.24.7", "@babel/types": "^7.24.7" @@ -431,9 +473,9 @@ } }, "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dependencies": { "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", @@ -501,9 +543,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", + "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -773,9 +815,9 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", "dependencies": { "@babel/helper-plugin-utils": "^7.24.7" }, @@ -1849,9 +1891,9 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", + "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/parser": "^7.24.7", @@ -1862,9 +1904,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz", + "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==", "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/generator": "^7.24.7", @@ -1882,9 +1924,9 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", + "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", "dependencies": { "@babel/helper-string-parser": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7", @@ -1986,12 +2028,12 @@ } }, "node_modules/@cypress/grep": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@cypress/grep/-/grep-4.0.2.tgz", - "integrity": "sha512-jsgbu+WMW7qbDR6aG8EqeY0Ley4/O/j7pMjj2iUkTHYeU3iES0D/uZwzQ2ijOv4jsLadp5etltQJc5jhMl8+IA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@cypress/grep/-/grep-4.1.0.tgz", + "integrity": "sha512-yUscMiUgM28VDPrNxL19/BhgHZOVrAPrzVsuEcy6mqPqDYt8H8fIaHeeGQPW4CbMu/ry9sehjH561WDDBIXOIg==", "dependencies": { "debug": "^4.3.4", - "find-test-names": "^1.19.0", + "find-test-names": "^1.28.18", "globby": "^11.0.4" }, "peerDependencies": { @@ -2044,9 +2086,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -2057,17 +2099,17 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "engines": { "node": ">=6.0.0" } @@ -2078,9 +2120,9 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", + "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" diff --git a/e2e-tests/package.json b/e2e-tests/package.json index cb6001aefe..62dde9fe56 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@bahmutov/cy-api": "^2.1.3", - "@cypress/grep": "^4.0.2", + "@cypress/grep": "^4.1.0", "cypress-multi-reporters": "^1.6.4", "cypress-tags": "^1.2.2", "mocha-junit-reporter": "^2.2.1", diff --git a/frontend/package.json b/frontend/package.json index 2160ac8ce7..cab30c362b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -74,5 +74,5 @@ "test": "ng test", "watch": "ng build --watch --configuration development --output-path ../www-data" }, - "version": "2.26.2" + "version": "2.27.0" } diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index fc8ea14168..2155848c70 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -2,7 +2,7 @@ import { Injectable, NgModule } from '@angular/core'; import { ActivatedRouteSnapshot, Router, RouterModule, RouterStateSnapshot, Routes, UrlTree } from '@angular/router'; import { IUser, Permissions, UserRole } from '@guardian/interfaces'; import { of } from 'rxjs'; -import { catchError, map } from 'rxjs/operators'; +import { catchError, map, switchMap } from 'rxjs/operators'; import { AuditComponent } from './views/audit/audit.component'; import { HomeComponent } from './views/home/home.component'; import { UserProfileComponent } from './views/user-profile/user-profile.component'; @@ -35,6 +35,7 @@ import { AboutViewComponent } from './views/admin/about-view/about-view.componen import { PolicySearchComponent } from './views/policy-search/policy-search.component'; import { ListOfTokensUserComponent } from './views/list-of-tokens-user/list-of-tokens-user.component'; import { RecordResultsComponent } from './modules/policy-engine/record/record-results/record-results.component'; +import { TestResultsComponent } from './modules/policy-engine/record/test-results/test-results.component'; import { ContractConfigComponent } from './modules/contract-engine/configs/contract-config/contract-config.component'; import { UserContractConfigComponent } from './modules/contract-engine/configs/user-contract-config/user-contract-config.component'; import { AnnotationBlockComponent } from './modules/project-comparison/component/annotation-block/annotation-block.component'; @@ -43,6 +44,7 @@ import { RolesViewComponent } from './views/roles/roles-view.component'; import { UsersManagementComponent } from './views/user-management/user-management.component'; import { UsersManagementDetailComponent } from './views/user-management-detail/user-management-detail.component'; import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.component'; +import { MapService } from './services/map.service'; @Injectable({ providedIn: 'root' @@ -50,7 +52,8 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen export class PermissionsGuard { constructor( private readonly router: Router, - private readonly auth: AuthService + private readonly auth: AuthService, + private readonly mapSevice: MapService, ) { } @@ -74,6 +77,12 @@ export class PermissionsGuard { const permissions: string[] | undefined = route.data.permissions; const defaultPage: string | undefined = route.data.defaultPage; return this.auth.sessions().pipe( + switchMap((user) => { + return this.mapSevice.loadMap().pipe( + switchMap(() => of(user)), + catchError(() => of(user)) + ); + }), map((user: IUser | null) => { if (user) { if (roles) { @@ -112,7 +121,7 @@ const routes: Routes = [ { path: 'register', component: RegisterComponent }, { path: 'task/:id', component: AsyncProgressComponent }, { path: 'notifications', component: NotificationsComponent }, - {path: 'worker-tasks', component: WorkerTasksComponent}, + { path: 'worker-tasks', component: WorkerTasksComponent }, { path: 'user-profile', @@ -403,7 +412,15 @@ const routes: Routes = [ permissions: [Permissions.POLICIES_RECORD_ALL] } }, - + { + path: 'test-results', + component: TestResultsComponent, + canActivate: [PermissionsGuard], + data: { + roles: [UserRole.STANDARD_REGISTRY], + permissions: [Permissions.POLICIES_RECORD_ALL] + } + }, { path: 'branding', component: BrandingComponent, diff --git a/frontend/src/app/app.component.scss b/frontend/src/app/app.component.scss index 59bdacc1aa..7ca58a24f7 100644 --- a/frontend/src/app/app.component.scss +++ b/frontend/src/app/app.component.scss @@ -36,39 +36,39 @@ body { overflow: auto; padding-top: 210px; - &>div { - position: absolute !important; - bottom: 0px; - } - - &>div:nth-last-child(6) { - position: absolute !important; - bottom: 200px; - } - - &>div:nth-last-child(5) { - position: absolute !important; - bottom: 160px; - } - - &>div:nth-last-child(4) { - position: absolute !important; - bottom: 120px; - } - - &>div:nth-last-child(3) { - position: absolute !important; - bottom: 80px; - } - - &>div:nth-last-child(2) { - position: absolute !important; - bottom: 40px; - } - - &>div:nth-last-child(1) { - position: relative !important; - } + // &>div { + // position: absolute !important; + // bottom: 0px; + // } + + // &>div:nth-last-child(6) { + // position: absolute !important; + // bottom: 200px; + // } + + // &>div:nth-last-child(5) { + // position: absolute !important; + // bottom: 160px; + // } + + // &>div:nth-last-child(4) { + // position: absolute !important; + // bottom: 120px; + // } + + // &>div:nth-last-child(3) { + // position: absolute !important; + // bottom: 80px; + // } + + // &>div:nth-last-child(2) { + // position: absolute !important; + // bottom: 40px; + // } + + // &>div:nth-last-child(1) { + // position: relative !important; + // } } .app { @@ -329,7 +329,7 @@ body { .cell-last { border-right: 1px solid #E1E7EF; } - + .grid-table-header { .header-cell-text { color: #848fa9 !important; @@ -340,6 +340,7 @@ body { border: none !important; } } + .grid-table-row { font-family: Inter, sans-serif; box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08); @@ -347,38 +348,44 @@ body { } .cell-310 { - min-width: 310px; - width: 310px; - max-width: 310px; + min-width: 310px; + width: 310px; + max-width: 310px; } - + .cell-190 { - min-width: 190px; - width: 190px; - max-width: 190px; + min-width: 190px; + width: 190px; + max-width: 190px; + } + + .cell-170 { + min-width: 170px; + width: 170px; + max-width: 170px; } .cell-150 { - min-width: 150px; - width: 150px; + min-width: 150px; + width: 150px; max-width: 150px; } .cell-140 { - min-width: 140px; - width: 140px; + min-width: 140px; + width: 140px; max-width: 140px; } .cell-130 { - min-width: 130px; - width: 130px; + min-width: 130px; + width: 130px; max-width: 130px; } .cell-120 { - min-width: 120px; - width: 120px; + min-width: 120px; + width: 120px; max-width: 120px; } @@ -389,6 +396,7 @@ body { } } } + ::ng-deep body .grid-table-paginator .table-paginator { display: flex; align-items: center; @@ -408,4 +416,13 @@ body { background: #fff; box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08) !important; position: relative; +} + +::ng-deep body .custom-header-dialog { + .p-dialog-content { + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-left-radius: 16px; + border-bottom-right-radius: 16px; + } } \ No newline at end of file diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 4c47fdfaf4..b602dae82a 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -14,7 +14,10 @@ import { DomSanitizer } from '@angular/platform-browser'; @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'], + styleUrls: [ + './app.component.scss', + './themes/guardian.scss' + ], }) export class AppComponent implements OnInit { public title = 'guardian'; @@ -31,25 +34,11 @@ export class AppComponent implements OnInit { constructor( public authState: AuthStateService, public wsService: WebSocketService, - public mapService: MapService, - public httpClient: HttpClient, private brandingService: BrandingService, private activatedRoute: ActivatedRoute, private domSanitizer: DomSanitizer, private matIconRegistry: MatIconRegistry ) { - const mapRequest = (value?: string) => { - httpClient - .jsonp( - `https://maps.googleapis.com/maps/api/js${value ? '?key=' + value : '' - }`, - 'callback' - ) - .subscribe((result) => { - this.mapService.mapLoaded = true; - }); - }; - mapService.getApiKey().subscribe(mapRequest); this.matIconRegistry.addSvgIconLiteral('policy-module', this.domSanitizer.bypassSecurityTrustHtml(` diff --git a/frontend/src/app/directives/use-with-service.directive.ts b/frontend/src/app/directives/use-with-service.directive.ts index adb356980f..b81843eb96 100644 --- a/frontend/src/app/directives/use-with-service.directive.ts +++ b/frontend/src/app/directives/use-with-service.directive.ts @@ -1,5 +1,6 @@ import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; import { WebSocketService } from '../services/web-socket.service'; +import { Subscription } from 'rxjs'; @Directive({ selector: '[useWithServiceDecorator]' @@ -7,18 +8,28 @@ import { WebSocketService } from '../services/web-socket.service'; export class UseWithServiceDirective{ private hasView = false; + private readonly subscription: Subscription; + private serviceName: string; constructor( private templateRef: TemplateRef, private viewContainer: ViewContainerRef, private wsService: WebSocketService ) { + this.subscription = this.wsService.statusSubscribe(() => { + this.updateView(); + }); } @Input() set useWithServiceDecorator(service: string) { + this.serviceName = service; + this.updateView(); + } + + private updateView() { let view = false; - const currentService = this.wsService.getServicesStatesArray().find(s => s.serviceName === service); + const currentService = this.wsService.getServicesStatesArray().find(s => s.serviceName === this.serviceName); if (currentService) { const readyService = currentService.states.find((state: string) => state === 'READY'); if (readyService) { @@ -34,4 +45,10 @@ export class UseWithServiceDirective{ this.hasView = false; } } + + ngOnDestroy() { + if (this.subscription) { + this.subscription.unsubscribe(); + } + } } diff --git a/frontend/src/app/modules/analytics/compare-record/compare-record.component.ts b/frontend/src/app/modules/analytics/compare-record/compare-record.component.ts index 3127a98e4a..94364752d4 100644 --- a/frontend/src/app/modules/analytics/compare-record/compare-record.component.ts +++ b/frontend/src/app/modules/analytics/compare-record/compare-record.component.ts @@ -103,9 +103,9 @@ export class CompareRecordComponent implements OnInit { this.minWidth = 770 * this.size; const k = Math.round(100 / this.size); - this._gridStyle = `max(calc(${k}vw - 70px), 690px)`; + this._gridStyle = `max(calc(${k}vw - 210px), 690px)`; for (let i = 1; i < this.size; i++) { - this._gridStyle += ` 35px max(calc(${k}vw - 55px), 710px)`; + this._gridStyle += ` 35px max(calc(${k}vw - 195px), 710px)`; } this.totalRate = this.value?.total; diff --git a/frontend/src/app/modules/analytics/search-policies/search-policies.component.html b/frontend/src/app/modules/analytics/search-policies/search-policies.component.html index 9674e414cb..fd8d6ee7b5 100644 --- a/frontend/src/app/modules/analytics/search-policies/search-policies.component.html +++ b/frontend/src/app/modules/analytics/search-policies/search-policies.component.html @@ -127,6 +127,9 @@
In Dry Run
+
+ Demo +
Published
diff --git a/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.html b/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.html index 4892c9e7de..f602eaac2b 100644 --- a/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.html +++ b/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.html @@ -7,10 +7,7 @@
Search policies
- - +
diff --git a/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.scss b/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.scss index 93b40a1dcd..a4e64056ba 100644 --- a/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.scss +++ b/frontend/src/app/modules/analytics/search-policy-dialog/search-policy-dialog.component.scss @@ -297,15 +297,6 @@ } } -::ng-deep .custom-header-dialog { - .p-dialog-content { - border-top-left-radius: 16px; - border-top-right-radius: 16px; - border-bottom-left-radius: 16px; - border-bottom-right-radius: 16px; - } -} - .dialog-header { height: 80px; display: flex; diff --git a/frontend/src/app/modules/common/async-progress/async-progress.component.css b/frontend/src/app/modules/common/async-progress/async-progress.component.css index 8f46deaa49..fae28f3532 100644 --- a/frontend/src/app/modules/common/async-progress/async-progress.component.css +++ b/frontend/src/app/modules/common/async-progress/async-progress.component.css @@ -90,11 +90,15 @@ line-height: normal; } -.task-viewer > .progress-bar { +.task-viewer > .progress-bar-container { width: 100%; margin-top: 24px; + height: 10px; } +.progress-bar { + height: 8px; +} .status-items { margin-top: 24px; diff --git a/frontend/src/app/modules/common/async-progress/async-progress.component.html b/frontend/src/app/modules/common/async-progress/async-progress.component.html index df281a9744..11a1405de0 100644 --- a/frontend/src/app/modules/common/async-progress/async-progress.component.html +++ b/frontend/src/app/modules/common/async-progress/async-progress.component.html @@ -1,10 +1,12 @@
{{ action }}...
-
- +
+
+
+
-
+
INFO: {{ status.message }}
diff --git a/frontend/src/app/modules/common/async-progress/async-progress.component.ts b/frontend/src/app/modules/common/async-progress/async-progress.component.ts index 670307c4d0..1beecb06b9 100644 --- a/frontend/src/app/modules/common/async-progress/async-progress.component.ts +++ b/frontend/src/app/modules/common/async-progress/async-progress.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Output, SimpleChanges, } from '@angular/core'; +import { Component, ElementRef, EventEmitter, Inject, Input, OnDestroy, OnInit, Output, SimpleChanges, ViewChild, } from '@angular/core'; import { WebSocketService } from 'src/app/services/web-socket.service'; import { forkJoin, Subscription } from 'rxjs'; import { IStatus, StatusType, TaskAction, UserRole, } from '@guardian/interfaces'; @@ -25,11 +25,14 @@ export class AsyncProgressComponent implements OnInit, OnDestroy { taskNotFound: boolean = false; userRole?: UserRole; last?: any; + redir?: any; @Input('taskId') inputTaskId?: string; @Output() completed = new EventEmitter(); @Output() error = new EventEmitter(); + @ViewChild('status') statusRef: ElementRef; + private subscription = new Subscription(); constructor( @@ -43,7 +46,10 @@ export class AsyncProgressComponent implements OnInit, OnDestroy { @Inject(CONFIGURATION_ERRORS) private _configurationErrors: Map ) { - this.last = this.route?.snapshot?.queryParams?.last; + const queryParams = this.route?.snapshot?.queryParams; + this.last = queryParams?.last; + this.redir = !(queryParams?.redir === 'false' || queryParams?.redir === false); + try { if (this.last) { this.last = atob(this.last); @@ -190,12 +196,18 @@ export class AsyncProgressComponent implements OnInit, OnDestroy { break; case TaskAction.IMPORT_POLICY_FILE: case TaskAction.IMPORT_POLICY_MESSAGE: - this.router.navigate(['policy-configuration'], { - queryParams: { - policyId: result.policyId, - }, - replaceUrl: true, - }); + if (this.redir) { + this.router.navigate(['policy-configuration'], { + queryParams: { + policyId: result.policyId, + }, + replaceUrl: true, + }); + } else { + this.router.navigate(['policy-viewer'], { + replaceUrl: true, + }); + } break; case TaskAction.WIZARD_CREATE_POLICY: const { policyId, saveState } = result; @@ -420,5 +432,10 @@ export class AsyncProgressComponent implements OnInit, OnDestroy { this.statusesCount > this.expected ? 100 : Math.floor((this.statusesCount / this.expected) * 100); + setTimeout(() => { + if (this.statusRef?.nativeElement) { + this.statusRef.nativeElement.scrollTop = 99999; + } + }, 50); } } diff --git a/frontend/src/app/modules/common/new-versions/new-versions.component.scss b/frontend/src/app/modules/common/new-versions/new-versions.component.scss index 859b4f51bf..9a8cdc98b5 100644 --- a/frontend/src/app/modules/common/new-versions/new-versions.component.scss +++ b/frontend/src/app/modules/common/new-versions/new-versions.component.scss @@ -16,7 +16,7 @@ .new-versions__info-icon, .new-versions__info-label { - color: #2f96b4; + color: var(--color-primary); align-self: center; } @@ -28,7 +28,7 @@ } .new-versions__link-label { - font-size: 20px; + font-size: 14px; color: #0c77ff; font-weight: bold; line-height: 25px; @@ -39,6 +39,12 @@ cursor: pointer; } +.new-versions__link-copy { + height: 18px; + width: 18px; + font-size: 18px; +} + .new-versions__links { grid-area: new-versions__links; display: flex; @@ -52,6 +58,7 @@ opacity: 1; transform: rotate(0deg) scale(1); } + 100% { opacity: 0; transform: rotate(360deg) scale(0.3); @@ -63,9 +70,11 @@ opacity: 0; transform: scale(0); } + 70% { transform: scale(1.2); } + 100% { opacity: 1; transform: scale(1); @@ -83,4 +92,4 @@ color: green; position: absolute; right: 0; -} +} \ No newline at end of file diff --git a/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.scss b/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.scss index 6c2b4dce8a..50fcd57396 100644 --- a/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.scss +++ b/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.scss @@ -1,6 +1,6 @@ .refresh-action-btn { color: #3f51b5; - background-color: none; + background-color: transparent; } .spin { diff --git a/frontend/src/app/modules/policy-engine/helpers/code-editor-dialog/code-editor-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.html similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/code-editor-dialog/code-editor-dialog.component.html rename to frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.html diff --git a/frontend/src/app/modules/policy-engine/helpers/code-editor-dialog/code-editor-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.scss similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/code-editor-dialog/code-editor-dialog.component.scss rename to frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.scss diff --git a/frontend/src/app/modules/policy-engine/helpers/code-editor-dialog/code-editor-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.ts similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/code-editor-dialog/code-editor-dialog.component.ts rename to frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.ts diff --git a/frontend/src/app/modules/policy-engine/helpers/compare-modules-dialog/compare-modules-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/compare-modules-dialog/compare-modules-dialog.component.html similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/compare-modules-dialog/compare-modules-dialog.component.html rename to frontend/src/app/modules/policy-engine/dialogs/compare-modules-dialog/compare-modules-dialog.component.html diff --git a/frontend/src/app/modules/policy-engine/helpers/compare-modules-dialog/compare-modules-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/compare-modules-dialog/compare-modules-dialog.component.scss similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/compare-modules-dialog/compare-modules-dialog.component.scss rename to frontend/src/app/modules/policy-engine/dialogs/compare-modules-dialog/compare-modules-dialog.component.scss diff --git a/frontend/src/app/modules/policy-engine/helpers/compare-modules-dialog/compare-modules-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/compare-modules-dialog/compare-modules-dialog.component.ts similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/compare-modules-dialog/compare-modules-dialog.component.ts rename to frontend/src/app/modules/policy-engine/dialogs/compare-modules-dialog/compare-modules-dialog.component.ts diff --git a/frontend/src/app/modules/policy-engine/helpers/compare-policy-dialog/compare-policy-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/compare-policy-dialog/compare-policy-dialog.component.html similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/compare-policy-dialog/compare-policy-dialog.component.html rename to frontend/src/app/modules/policy-engine/dialogs/compare-policy-dialog/compare-policy-dialog.component.html diff --git a/frontend/src/app/modules/policy-engine/helpers/compare-policy-dialog/compare-policy-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/compare-policy-dialog/compare-policy-dialog.component.scss similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/compare-policy-dialog/compare-policy-dialog.component.scss rename to frontend/src/app/modules/policy-engine/dialogs/compare-policy-dialog/compare-policy-dialog.component.scss diff --git a/frontend/src/app/modules/policy-engine/helpers/compare-policy-dialog/compare-policy-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/compare-policy-dialog/compare-policy-dialog.component.ts similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/compare-policy-dialog/compare-policy-dialog.component.ts rename to frontend/src/app/modules/policy-engine/dialogs/compare-policy-dialog/compare-policy-dialog.component.ts diff --git a/frontend/src/app/modules/policy-engine/helpers/cron-config-dialog/cron-config-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.html similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/cron-config-dialog/cron-config-dialog.component.html rename to frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.html diff --git a/frontend/src/app/modules/policy-engine/helpers/cron-config-dialog/cron-config-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.scss similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/cron-config-dialog/cron-config-dialog.component.scss rename to frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.scss diff --git a/frontend/src/app/modules/policy-engine/helpers/cron-config-dialog/cron-config-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/cron-config-dialog/cron-config-dialog.component.ts rename to frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts diff --git a/frontend/src/app/modules/policy-engine/helpers/delete-policy-dialog/delete-policy-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/delete-policy-dialog/delete-policy-dialog.component.html similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/delete-policy-dialog/delete-policy-dialog.component.html rename to frontend/src/app/modules/policy-engine/dialogs/delete-policy-dialog/delete-policy-dialog.component.html diff --git a/frontend/src/app/modules/policy-engine/helpers/delete-policy-dialog/delete-policy-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/delete-policy-dialog/delete-policy-dialog.component.scss similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/delete-policy-dialog/delete-policy-dialog.component.scss rename to frontend/src/app/modules/policy-engine/dialogs/delete-policy-dialog/delete-policy-dialog.component.scss diff --git a/frontend/src/app/modules/policy-engine/helpers/delete-policy-dialog/delete-policy-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/delete-policy-dialog/delete-policy-dialog.component.ts similarity index 100% rename from frontend/src/app/modules/policy-engine/helpers/delete-policy-dialog/delete-policy-dialog.component.ts rename to frontend/src/app/modules/policy-engine/dialogs/delete-policy-dialog/delete-policy-dialog.component.ts diff --git a/frontend/src/app/modules/policy-engine/helpers/export-policy-dialog/export-policy-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/export-policy-dialog/export-policy-dialog.component.html similarity index 71% rename from frontend/src/app/modules/policy-engine/helpers/export-policy-dialog/export-policy-dialog.component.html rename to frontend/src/app/modules/policy-engine/dialogs/export-policy-dialog/export-policy-dialog.component.html index 8b66285211..4c97b6892f 100644 --- a/frontend/src/app/modules/policy-engine/helpers/export-policy-dialog/export-policy-dialog.component.html +++ b/frontend/src/app/modules/policy-engine/dialogs/export-policy-dialog/export-policy-dialog.component.html @@ -1,3 +1,11 @@ +
+
+
{{header}}
+
+
+ +
+
@@ -57,22 +65,21 @@ @@ -205,24 +247,8 @@ class="text-truncate" pTooltip="{{ policy.description }}" tooltipPosition="top" - style="min-width: 140px" + style="min-width: 170px" >{{ policy.description }} - {{ policy.userRoles?.join(", ") }} - - - {{ policy.topicId }} - - - {{ policy.version }} {{ getLabelStatus(policy.status, !!policy.discontinuedDate) }}
- - - {{getStatusName(policy)}} - - -
- - - -
- Discontinued -
+ + + + +
+ {{getStatusName(policy)}} +
+
+ {{ policy.userRoles?.join(", ") }} + + + {{ policy.topicId }} + + + {{ policy.version }} + + + - -
- - - -
- -
-
- -
-
- -
+
+
- - - @@ -371,126 +394,65 @@
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
+ + + + + + + + + + + + + +
+
+
+
+
- - - + + + + + + + diff --git a/frontend/src/app/modules/policy-engine/policies/policies.component.scss b/frontend/src/app/modules/policy-engine/policies/policies.component.scss index 5dae18dbe1..9058fe38d5 100644 --- a/frontend/src/app/modules/policy-engine/policies/policies.component.scss +++ b/frontend/src/app/modules/policy-engine/policies/policies.component.scss @@ -66,7 +66,7 @@ .status-draft { font-weight: 500; - color: var(--color-primary); + color: var(--guardian-primary-color); } .status-publish { @@ -407,8 +407,8 @@ .toolbar-btn-primary { ::ng-deep .p-button { - background: var(--color-primary); - border: 1px solid var(--color-primary); + background: var(--guardian-primary-color); + border: 1px solid var(--guardian-primary-color); font-family: Inter, sans-serif; font-size: 1px; font-style: normal; @@ -416,13 +416,14 @@ margin-left: 10px; height: 40px; padding: 8px; + border-radius: 8px; } } .toolbar-btn-secondary { ::ng-deep .p-button { background: #fff; - border: 1px solid var(--color-primary) !important; + border: 1px solid var(--guardian-primary-color) !important; font-family: Inter, sans-serif; font-size: 1px; font-style: normal; @@ -430,6 +431,7 @@ margin-left: 10px; height: 40px; padding: 8px; + border-radius: 8px; } } @@ -442,8 +444,8 @@ } .primary-color { - fill: var(--color-primary); - color: var(--color-primary); + fill: var(--guardian-primary-color); + color: var(--guardian-primary-color); } .color-white { @@ -466,7 +468,7 @@ width: 250px; height: 40px; border: 1px solid #e1e7ef; - border-radius: 8px; + border-radius: 6px; padding-left: 16px; } @@ -512,10 +514,10 @@ ::ng-deep .p-button { height: 28px; - border-radius: 8px; + border-radius: 6px; background: var(--color-grey-white); border: 1px solid var(--color-secondary) !important; - color: var(--color-primary); + color: var(--guardian-primary-color); font-family: Inter, serif; font-size: 14px; font-style: normal; @@ -528,15 +530,13 @@ } } -.discontinued-status { +.disabled-status { display: flex; align-items: center; - justify-content: center; + justify-content: left; border-radius: 6px; - background: var(--color-accent-red-2); height: 28px; - padding: 4px 10px; - color: var(--color-accent-red-1); + padding: 4px 14px 4px 14px; font-family: Inter, sans-serif; font-size: 14px; font-style: normal; @@ -582,11 +582,11 @@ .p-dropdown { width: 128px; height: 40px; - border-radius: 8px; + border-radius: 6px; } .p-button { - border-radius: 8px; + border-radius: 6px; } .p-inputtext { @@ -617,7 +617,7 @@ font-style: normal; font-weight: 500; height: 40px; - border-radius: 8px; + border-radius: 6px; } margin-left: 10px; @@ -634,7 +634,7 @@ background-color: #ffffff; height: 40px; border: 1px solid var(--color-secondary); - border-radius: 8px; + border-radius: 6px; } } @@ -667,6 +667,32 @@ } } +.sub-menu-button { + color: var(--primary-color); + font-family: Inter, sans-serif; + font-size: 14px; + font-style: normal; + font-weight: 500; + background-color: #ffffff; + height: 40px; + border: none !important; + border-radius: 6px; + width: 100%; + text-align: left; + padding: 0.5rem 1rem; + + &:hover{ + background: rgba(33, 150, 243, 0.04); + color: #2196F3; + } + + &>div { + line-height: 24px; + display: grid; + grid-template-columns: 40px auto; + } +} + .table-container { overflow-x: auto; } @@ -680,16 +706,12 @@ .p-inputtext { padding: 4px 0 0 15px; - color: var(--color-primary); + color: inherit; font-family: Inter, sans-serif; font-size: 14px; font-style: normal; font-weight: 500; } - - .p-dropdown-trigger-icon { - color: var(--color-primary); - } } &[published="true"] { @@ -754,7 +776,7 @@ } .chip-color-blue { - color: var(--color-primary, #0681ee); + color: var(--guardian-primary-color, #0681ee); background: rgba(6, 129, 238, 0.16); } @@ -779,7 +801,7 @@ font-style: normal; font-weight: 500; line-height: 16px; - background: var(--color-primary, #0681ee) !important; + background: var(--guardian-primary-color, #0681ee) !important; color: var(--color-grey-white, #fff) !important; } @@ -792,7 +814,7 @@ border-radius: 6px; border: 1px solid var(--color-secondary, #cdddfd) !important; background: var(--color-grey-white, #fff) !important; - color: var(--color-primary, #0681ee) !important; + color: var(--guardian-primary-color, #0681ee) !important; } .loading { @@ -864,15 +886,100 @@ @media screen and (max-width: 1450px) { .actions-container { flex-direction: column !important; - align-items: flex-start !important; + align-items: flex-start !important; } .actions-container-btns { margin-left: 0px !important; margin-top: 16px !important; - & > *:first-of-type { + &>*:first-of-type { margin-left: 0px !important; } } +} + +.instance-btn { + padding: 2px 20px 2px 12px; + height: 30px; + gap: 6px; + width: 110px; +} + +.DRAFT-status, +.DRAFT-dropdown ::ng-deep .p-dropdown { + background: var(--guardian-secondary-background); + color: var(--guardian-dry-run-color); + border: 1px solid var(--guardian-dry-run-color); + // width: auto; + width: 130px; + + .p-dropdown-trigger-icon { + color: var(--guardian-dry-run-color); + } +} + +.DRY-RUN-status, +.DRY-RUN-dropdown ::ng-deep .p-dropdown { + background: var(--guardian-dry-run-background); + color: var(--guardian-dry-run-color); + border: 1px solid var(--guardian-dry-run-color); + // width: auto; + width: 130px; + + .p-dropdown-trigger-icon { + color: var(--guardian-dry-run-color); + } +} + +.PUBLISH-status, +.PUBLISH-dropdown ::ng-deep .p-dropdown { + background: var(--color-accent-green-2); + color: var(--color-accent-green-1); + border: 1px solid var(--color-accent-green-1); + // width: auto; + width: 130px; + + .p-dropdown-trigger-icon { + color: var(--color-accent-green-1); + } +} + +.DISCONTINUED-status, +.DISCONTINUED-dropdown ::ng-deep .p-dropdown { + background: #fff4f3; + color: var(--color-accent-red-1); + border: 1px solid var(--color-accent-red-1); + // width: auto; + width: 130px; + + .p-dropdown-trigger-icon { + color: var(--color-accent-red-1); + } +} + +.PUBLISH_ERROR-status, +.PUBLISH_ERROR-dropdown ::ng-deep .p-dropdown { + background: #fff4f3; + color: var(--color-accent-red-1); + border: 1px solid var(--color-accent-red-1); + // width: auto; + width: 130px; + + .p-dropdown-trigger-icon { + color: var(--color-accent-red-1); + } +} + +.DEMO-status, +.DEMO-dropdown ::ng-deep .p-dropdown { + background: #f7eef9; + color: var(--pc-wizard-color); + border: 1px solid var(--pc-wizard-color); + // width: auto; + width: 130px; + + .p-dropdown-trigger-icon { + color: var(--pc-wizard-color); + } } \ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/policies/policies.component.ts b/frontend/src/app/modules/policy-engine/policies/policies.component.ts index 8b96641fe3..ee77813011 100644 --- a/frontend/src/app/modules/policy-engine/policies/policies.component.ts +++ b/frontend/src/app/modules/policy-engine/policies/policies.component.ts @@ -1,20 +1,20 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; -import { ContractType, IUser, PolicyType, Schema, SchemaHelper, TagType, Token, UserPermissions } from '@guardian/interfaces'; +import { ContractType, IUser, PolicyHelper, PolicyType, Schema, SchemaHelper, TagType, Token, UserPermissions } from '@guardian/interfaces'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { ProfileService } from 'src/app/services/profile.service'; import { TokenService } from 'src/app/services/token.service'; -import { ExportPolicyDialog } from '../helpers/export-policy-dialog/export-policy-dialog.component'; -import { NewPolicyDialog } from '../helpers/new-policy-dialog/new-policy-dialog.component'; -import { ImportPolicyDialog } from '../helpers/import-policy-dialog/import-policy-dialog.component'; -import { PreviewPolicyDialog } from '../helpers/preview-policy-dialog/preview-policy-dialog.component'; +import { ExportPolicyDialog } from '../dialogs/export-policy-dialog/export-policy-dialog.component'; +import { NewPolicyDialog } from '../dialogs/new-policy-dialog/new-policy-dialog.component'; +import { ImportPolicyDialog } from '../dialogs/import-policy-dialog/import-policy-dialog.component'; +import { PreviewPolicyDialog } from '../dialogs/preview-policy-dialog/preview-policy-dialog.component'; import { TasksService } from 'src/app/services/tasks.service'; import { InformService } from 'src/app/services/inform.service'; -import { MultiPolicyDialogComponent } from '../helpers/multi-policy-dialog/multi-policy-dialog.component'; -import { ComparePolicyDialog } from '../helpers/compare-policy-dialog/compare-policy-dialog.component'; +import { MultiPolicyDialogComponent } from '../dialogs/multi-policy-dialog/multi-policy-dialog.component'; +import { ComparePolicyDialog } from '../dialogs/compare-policy-dialog/compare-policy-dialog.component'; import { TagsService } from 'src/app/services/tag.service'; -import { forkJoin } from 'rxjs'; +import { forkJoin, Subscription } from 'rxjs'; import { SchemaService } from 'src/app/services/schema.service'; import { WizardMode, WizardService } from 'src/app/modules/policy-engine/services/wizard.service'; import { FormControl, FormGroup } from '@angular/forms'; @@ -23,12 +23,45 @@ import { SearchPolicyDialog } from '../../analytics/search-policy-dialog/search- import { mobileDialog } from 'src/app/utils/mobile-utils'; import { DialogService } from 'primeng/dynamicdialog'; import { SuggestionsConfigurationComponent } from '../../../views/suggestions-configuration/suggestions-configuration.component'; -import { DeletePolicyDialogComponent } from '../helpers/delete-policy-dialog/delete-policy-dialog.component'; -import { SetVersionDialog } from '../../schema-engine/set-version-dialog/set-version-dialog.component'; +import { DeletePolicyDialogComponent } from '../dialogs/delete-policy-dialog/delete-policy-dialog.component'; import { CONFIGURATION_ERRORS } from '../injectors/configuration.errors.injector'; import { DiscontinuePolicy } from '../dialogs/discontinue-policy/discontinue-policy.component'; import { MigrateData } from '../dialogs/migrate-data/migrate-data.component'; import { ContractService } from 'src/app/services/contract.service'; +import { PolicyTestDialog } from '../dialogs/policy-test-dialog/policy-test-dialog.component'; +import { NewImportFileDialog } from '../dialogs/new-import-file-dialog/new-import-file-dialog.component'; +import { PublishPolicyDialog } from '../dialogs/publish-policy-dialog/publish-policy-dialog.component'; +import { WebSocketService } from 'src/app/services/web-socket.service'; + +class MenuButton { + public readonly visible: boolean; + public readonly disabled: boolean; + public readonly tooltip: string; + public readonly icon: string; + public readonly color: string; + private readonly click: () => void; + + constructor(option: { + visible: boolean, + disabled: boolean, + tooltip: string, + icon: string, + click: () => void; + }) { + this.visible = option.visible; + this.disabled = option.disabled; + this.tooltip = option.tooltip; + this.icon = option.icon; + this.click = option.click; + this.color = option.disabled ? 'disabled-color' : 'primary-color'; + } + + public onClick() { + if (!this.disabled) { + this.click(); + } + } +} const columns = [{ id: 'name', @@ -65,6 +98,16 @@ const columns = [{ permissions: (user: UserPermissions) => { return true; } +}, { + id: 'tests', + permissions: (user: UserPermissions) => { + return ( + user.POLICIES_POLICY_CREATE || + user.POLICIES_POLICY_UPDATE || + user.POLICIES_POLICY_REVIEW || + user.POLICIES_POLICY_DELETE + ) + } }, { id: 'tags', permissions: (user: UserPermissions) => { @@ -102,6 +145,9 @@ const columns = [{ } }]; + + + /** * Component for choosing a policy and * display blocks of the selected policy @@ -136,8 +182,7 @@ export class PoliciesComponent implements OnInit { { id: 'Dry-run', title: 'Dry Run', - description: - 'Run without making any persistent \n changes or executing transaction.', + description: 'Run without making any persistent \n changes or executing transaction.', color: '#3f51b5', }, ]; @@ -156,12 +201,6 @@ export class PoliciesComponent implements OnInit { }, ]; private publishErrorMenuOption = [ - // { - // id: 'Draft', - // title: 'Stop', - // description: 'Return to editing.', - // color: '#9c27b0' - // }, { id: 'Publish', title: 'Publish', @@ -169,7 +208,6 @@ export class PoliciesComponent implements OnInit { color: '#4caf50', }, ]; - private publishedMenuOption = [ { id: 'Discontinue', @@ -199,14 +237,276 @@ export class PoliciesComponent implements OnInit { }; }); + private get filters(): { policyName: string; tag: string } { + return { + policyName: this.filtersForm.value?.policyName?.trim(), + tag: this.filtersForm.value?.tag, + }; + } + + public get policiesList(): any[] { + return this.filteredPolicies.length > 0 + ? this.filteredPolicies + : this.policies || []; + } + + public get hasPolicies(): boolean { + return this.policiesList.length > 0; + } + public checkMigrationStatus(status: string): boolean { return ( - status === 'PUBLISH' || - status === 'DRY-RUN' || - status === 'DISCONTINUED' + status === PolicyType.PUBLISH || + status === PolicyType.DRY_RUN || + status === PolicyType.DEMO || + status === PolicyType.DISCONTINUED ) } + public instanceLabel(policy: any): string { + if (this.user?.POLICIES_POLICY_MANAGE) { + if ( + policy.status === PolicyType.PUBLISH || + policy.status === PolicyType.DISCONTINUED + ) { + return 'Open'; + } else if ( + policy.status === PolicyType.DEMO + ) { + return 'Demo'; + } else { + return 'Dry run'; + } + } else { + return 'Register' + } + } + + public showStatus(policy: any): boolean { + return ( + policy.status === PolicyType.DRAFT || + policy.status === PolicyType.DRY_RUN || + policy.status === PolicyType.PUBLISH_ERROR || + policy.status === PolicyType.PUBLISH + ) + } + + public showInstance(policy: any): boolean { + return ( + policy.status === PolicyType.DRY_RUN || + policy.status === PolicyType.DEMO || + policy.status === PolicyType.PUBLISH || + policy.status === PolicyType.DISCONTINUED + ) + } + + public canDisplayColumn(columnName: string): boolean { + return !!this.columns.find((column) => column === columnName); + } + + public getColor(status: string, expired: boolean = false) { + switch (status) { + case PolicyType.DRAFT: + return 'grey'; + case PolicyType.DRY_RUN: + return 'grey'; + case PolicyType.DISCONTINUED: + case PolicyType.PUBLISH_ERROR: + return 'red'; + case PolicyType.PUBLISH: + return expired ? 'yellow' : 'green'; + default: + return 'grey'; + } + } + + public getLabelStatus(status: string, expired: boolean = false) { + switch (status) { + case PolicyType.DRAFT: + return 'Draft'; + case PolicyType.DRY_RUN: + return 'Dry Run'; + case PolicyType.PUBLISH_ERROR: + return 'Publish Error'; + case PolicyType.PUBLISH: + return `Published${expired ? '*' : ''}`; + case PolicyType.DISCONTINUED: + return `Discontinued`; + default: + return 'Incorrect status'; + } + } + + public getStatusName(policy: any): string { + if (policy.status === PolicyType.DRAFT) { + return 'Draft'; + } + if (policy.status === PolicyType.DRY_RUN) { + return 'In Dry Run'; + } + if (policy.status === PolicyType.PUBLISH) { + return `Published${!!policy.discontinuedDate ? '*' : ''}`; + } + if (policy.status === PolicyType.DISCONTINUED) { + return 'Discontinued'; + } + if (policy.status === PolicyType.PUBLISH_ERROR) { + return 'Not published'; + } + if (policy.status === PolicyType.DEMO) { + return 'Demo'; + } + return 'Not published'; + } + + public getStatusOptions(policy: any) { + if (policy.status === PolicyType.DRAFT) { + return this.publishMenuOption; + } + if (policy.status === PolicyType.DRY_RUN) { + return this.draftMenuOption; + } + if (policy.status === PolicyType.PUBLISH) { + return this.publishedMenuOption; + } else { + return this.publishErrorMenuOption; + } + } + + public getDiscontinuedTooltip(date: Date) { + return date ? `Discontinue date is ${date.toLocaleString()}` : ''; + } + + public getMenu(policy: any) { + return { + groups: [{ + tooltip: 'Analytics', + group: false, + visible: this.user.ANALYTIC_POLICY_READ, + buttons: [ + new MenuButton({ + visible: this.user.ANALYTIC_POLICY_READ, + disabled: false, + tooltip: 'Search policies', + icon: 'search', + click: () => this.searchPolicy(policy) + }), + new MenuButton({ + visible: this.user.ANALYTIC_POLICY_READ, + disabled: false, + tooltip: 'Compare policies', + icon: 'compare', + click: () => this.comparePolicy(policy) + }) + ] + }, { + tooltip: 'Test', + group: false, + visible: true, + buttons: [ + new MenuButton({ + visible: true, + disabled: !( + policy.status === PolicyType.DRAFT || + policy.status === PolicyType.DRY_RUN || + policy.status === PolicyType.DEMO + ), + tooltip: 'Attach test file', + icon: 'add-test', + click: () => this.addTest(policy) + }), + new MenuButton({ + visible: true, + disabled: !(policy.tests && policy.tests.length), + tooltip: 'Test details', + icon: 'run-test', + click: () => this.testDetails(policy) + }) + ] + }, { + tooltip: 'Export & Import', + group: false, + visible: true, + buttons: [ + new MenuButton({ + visible: true, + disabled: false, + tooltip: 'Export policy', + icon: 'export-file', + click: () => this.exportPolicy(policy) + }), + new MenuButton({ + visible: true, + disabled: false, + tooltip: 'Export schemas to Excel', + icon: 'export-xls', + click: () => this.exportToExcel(policy) + }), + new MenuButton({ + visible: this.user.POLICIES_POLICY_UPDATE && this.user.SCHEMAS_SCHEMA_UPDATE, + disabled: policy.status !== PolicyType.DRAFT, + tooltip: 'Import schemas from Excel', + icon: 'import-xls', + click: () => this.importFromExcel(policy) + }) + ] + }, { + tooltip: 'Migrate data', + group: true, + visible: true, + icon: 'import-data', + buttons: [ + new MenuButton({ + visible: this.user.POLICIES_MIGRATION_CREATE, + disabled: !this.checkMigrationStatus(policy.status), + tooltip: 'Export policy data', + icon: 'export-data', + click: () => this.exportPolicyData(policy) + }), + new MenuButton({ + visible: this.user.POLICIES_MIGRATION_CREATE, + disabled: false, + tooltip: 'Migrate data', + icon: 'import-data', + click: () => this.migrateData(policy) + }), + new MenuButton({ + visible: PolicyHelper.isDryRunMode(policy) && this.user.POLICIES_MIGRATION_CREATE, + disabled: false, + tooltip: 'Export virtual keys', + icon: 'export-key', + click: () => this.exportVirtualKeys(policy) + }), + new MenuButton({ + visible: PolicyHelper.isDryRunMode(policy) && this.user.POLICIES_MIGRATION_CREATE, + disabled: false, + tooltip: 'Import virtual keys', + icon: 'import-key', + click: () => this.importVirtualKeys(policy) + }) + ] + }, { + tooltip: 'Delete', + group: false, + visible: true, + buttons: [ + new MenuButton({ + visible: this.user.POLICIES_POLICY_DELETE, + disabled: !( + policy.status === PolicyType.DRAFT || + policy.status === PolicyType.DEMO + ), + tooltip: 'Delete Policy', + icon: 'delete', + click: () => this.deletePolicy(policy) + }) + ] + }] + } + } + + private subscription = new Subscription(); + constructor( public tagsService: TagsService, private profileService: ProfileService, @@ -221,6 +521,7 @@ export class PoliciesComponent implements OnInit { private tokenService: TokenService, private analyticsService: AnalyticsService, private contractSerivce: ContractService, + private wsService: WebSocketService, @Inject(CONFIGURATION_ERRORS) private _configurationErrors: Map ) { @@ -231,11 +532,20 @@ export class PoliciesComponent implements OnInit { } ngOnInit() { + this.subscription.add( + this.wsService.testSubscribe(((test) => { + this.updatePolicyTest(test); + })) + ); this.loading = true; this.loadPolicy(); this.handleTagsUpdate(); } + ngOnDestroy(): void { + this.subscription.unsubscribe(); + } + private loadPolicy() { this.policies = null; this.isConfirmed = false; @@ -331,10 +641,6 @@ export class PoliciesComponent implements OnInit { this.loadPolicy(); } - public canDisplayColumn(columnName: string): boolean { - return !!this.columns.find((column) => column === columnName); - } - private dryRun(element: any) { this.loading = true; this.policyEngineService.dryRun(element.id).subscribe( @@ -391,12 +697,17 @@ export class PoliciesComponent implements OnInit { } private setVersion(element: any) { - const dialogRef = this.dialog.open(SetVersionDialog, { - width: '350px', - disableClose: false, - data: {}, + const item = this.policies?.find((e) => e.id === element?.id); + const dialogRef = this.dialogService.open(PublishPolicyDialog, { + showHeader: false, + header: 'Publish Policy', + width: '600px', + styleClass: 'guardian-dialog', + data: { + policy: item + } }); - dialogRef.afterClosed().subscribe((version) => { + dialogRef.onClose.subscribe(async (version) => { if (version) { this.publish(element, version); } @@ -420,13 +731,13 @@ export class PoliciesComponent implements OnInit { ); } - public deletePolicy(policyId: any, previousVersion: any) { + public deletePolicy(policy?: any) { const dialogRef = this.dialogService.open(DeletePolicyDialogComponent, { header: 'Delete Policy', width: '720px', styleClass: 'custom-dialog', data: { - notificationText: !previousVersion + notificationText: !policy?.previousVersion ? 'Are you sure want to delete policy with related schemas?' : 'Are you sure want to delete policy?', }, @@ -437,7 +748,7 @@ export class PoliciesComponent implements OnInit { } this.loading = true; - this.policyEngineService.pushDelete(policyId).subscribe( + this.policyEngineService.pushDelete(policy?.id).subscribe( (result) => { const { taskId, expectation } = result; this.router.navigate(['task', taskId], { @@ -453,24 +764,25 @@ export class PoliciesComponent implements OnInit { }); } - public exportPolicy(policyId: any) { + public exportPolicy(policy?: any) { this.policyEngineService - .exportInMessage(policyId) - .subscribe((exportedPolicy) => + .exportInMessage(policy?.id) + .subscribe((exportedPolicy) => { this.dialogService.open(ExportPolicyDialog, { - header: 'Export', + showHeader: false, + header: 'Export Policy', width: '700px', - styleClass: 'custom-dialog', + styleClass: 'guardian-dialog', data: { policy: exportedPolicy, }, - }) - ); + }); + }); } - public exportPolicyData(policyId: any) { + public exportPolicyData(policy: any) { this.policyEngineService - .exportPolicyData(policyId) + .exportPolicyData(policy?.id) .subscribe((response) => { const fileName = response.headers @@ -486,9 +798,9 @@ export class PoliciesComponent implements OnInit { }); } - public exportVirtualKeys(policyId: any) { + public exportVirtualKeys(policy?: any) { this.policyEngineService - .exportVirtualKeys(policyId) + .exportVirtualKeys(policy?.id) .subscribe((response) => { const fileName = response.headers @@ -505,13 +817,13 @@ export class PoliciesComponent implements OnInit { } private _input?: any; - public importVirtualKeys(policyId: any) { + public importVirtualKeys(policy?: any) { const handler = () => { input.removeEventListener('change', handler); this._input = null; this.loading = true; this.policyEngineService - .importVirtualKeys(policyId, input.files![0]) + .importVirtualKeys(policy?.id, input.files![0]) .subscribe({ complete: () => this.loading = false }); @@ -565,7 +877,7 @@ export class PoliciesComponent implements OnInit { } else { dialogRef = this.dialogService.open(PreviewPolicyDialog, { header: 'Preview', - width: '720px', + width: '800px', styleClass: 'custom-dialog', data: { policy: policy, @@ -580,44 +892,39 @@ export class PoliciesComponent implements OnInit { return; } - let versionOfTopicId = result.versionOfTopicId || null; + const versionOfTopicId = result.versionOfTopicId || null; + const demo = result.demo || false; + const tools = result.tools; + this.loading = true; if (type == 'message') { this.policyEngineService - .pushImportByMessage(data, versionOfTopicId, { - tools: result.tools - }) - .subscribe( - (result) => { - const { taskId, expectation } = result; - this.router.navigate(['task', taskId], { - queryParams: { - last: btoa(location.href), - }, - }); - }, - (e) => { - this.loading = false; - } - ); + .pushImportByMessage(data, versionOfTopicId, { tools }, demo) + .subscribe((result) => { + const { taskId, expectation } = result; + this.router.navigate(['task', taskId], { + queryParams: { + last: btoa(location.href), + redir: String(!demo) + }, + }); + }, (e) => { + this.loading = false; + }); } else if (type == 'file') { this.policyEngineService - .pushImportByFile(data, versionOfTopicId, { - tools: result.tools - }) - .subscribe( - (result) => { - const { taskId, expectation } = result; - this.router.navigate(['task', taskId], { - queryParams: { - last: btoa(location.href), - }, - }); - }, - (e) => { - this.loading = false; - } - ); + .pushImportByFile(data, versionOfTopicId, { tools }, demo) + .subscribe((result) => { + const { taskId, expectation } = result; + this.router.navigate(['task', taskId], { + queryParams: { + last: btoa(location.href), + redir: String(!demo) + }, + }); + }, (e) => { + this.loading = false; + }); } } }); @@ -642,7 +949,7 @@ export class PoliciesComponent implements OnInit { } else { dialogRef = this.dialogService.open(PreviewPolicyDialog, { header: 'Preview', - width: '720px', + width: '800px', styleClass: 'custom-dialog', data: { xlsx: xlsx, @@ -670,9 +977,9 @@ export class PoliciesComponent implements OnInit { }); } - public exportToExcel(policyId: any) { + public exportToExcel(policy?: any) { this.policyEngineService - .exportToExcel(policyId) + .exportToExcel(policy?.id) .subscribe((fileBuffer) => { let downloadLink = document.createElement('a'); downloadLink.href = window.URL.createObjectURL( @@ -696,7 +1003,7 @@ export class PoliciesComponent implements OnInit { ); } - public importFromExcel(policyId: any) { + public importFromExcel(policy?: any) { const dialogRef = this.dialogService.open(ImportPolicyDialog, { header: 'Select action', width: '720px', @@ -707,7 +1014,7 @@ export class PoliciesComponent implements OnInit { }); dialogRef.onClose.subscribe(async (result) => { if (result) { - this.importExcelDetails(result, policyId); + this.importExcelDetails(result, policy?.id); } }); } @@ -748,7 +1055,7 @@ export class PoliciesComponent implements OnInit { setTimeout(() => this.publishMenuSelector = null, 0); } - onPublishedAction(event: any, element: any) { + private onPublishedAction(event: any, element: any) { if (event.value.id === 'Discontinue') { const dialogRef = this.dialogService.open(DiscontinuePolicy, { header: 'Discontinue policy', @@ -785,77 +1092,9 @@ export class PoliciesComponent implements OnInit { // else if (event.id === 'Draft') { // this.draft(element); // } - setTimeout(() => this.publishMenuSelector = null, 0); } - public getColor(status: string, expired: boolean = false) { - switch (status) { - case 'DRAFT': - return 'grey'; - case 'DRY-RUN': - return 'grey'; - case 'DISCONTINUED': - case 'PUBLISH_ERROR': - return 'red'; - case 'PUBLISH': - return expired ? 'yellow' : 'green'; - default: - return 'grey'; - } - } - - public getLabelStatus(status: string, expired: boolean = false) { - switch (status) { - case 'DRAFT': - return 'Draft'; - case 'DRY-RUN': - return 'Dry Run'; - case 'PUBLISH_ERROR': - return 'Publish Error'; - case 'PUBLISH': - return `Published${expired ? '*' : ''}`; - case 'DISCONTINUED': - return `Discontinued`; - default: - return 'Incorrect status'; - } - } - - private processPublishResult(taskId: string): void { - this.taskService.get(taskId).subscribe((task: any) => { - const { result } = task; - if (result) { - const { isValid, errors, policyId } = result; - if (!isValid) { - let text = []; - const blocks = errors.blocks; - const invalidBlocks = blocks.filter( - (block: any) => !block.isValid - ); - for (let i = 0; i < invalidBlocks.length; i++) { - const block = invalidBlocks[i]; - for (let j = 0; j < block.errors.length; j++) { - const error = block.errors[j]; - if (block.id) { - text.push(`
${block.id}: ${error}
`); - } else { - text.push(`
${error}
`); - } - } - } - this.informService.errorMessage( - text.join(''), - 'The policy is invalid' - ); - } else { - this.wizardService.removeWizardPreset(policyId); - } - this.loadAllPolicy(); - } - }); - } - public createMultiPolicy(element: any) { const dialogRef = this.dialog.open(MultiPolicyDialogComponent, mobileDialog({ width: '650px', @@ -874,8 +1113,8 @@ export class PoliciesComponent implements OnInit { }); } - public comparePolicy(policyId?: any) { - const item = this.policies?.find((e) => e.id === policyId); + public comparePolicy(policy?: any) { + const item = this.policies?.find((e) => e.id === policy?.id); const dialogRef = this.dialogService.open(ComparePolicyDialog, { header: 'Policy Comparison', width: '900px', @@ -900,8 +1139,8 @@ export class PoliciesComponent implements OnInit { }); } - public migrateData(policyId?: any) { - const item = this.policies?.find((e) => e.id === policyId); + public migrateData(policy?: any) { + const item = this.policies?.find((e) => e.id === policy?.id); this.loading = true; this.contractSerivce.getContracts({ type: ContractType.RETIRE }).subscribe({ next: (res) => { @@ -911,11 +1150,7 @@ export class PoliciesComponent implements OnInit { styleClass: 'custom-dialog', data: { policy: item, - policies: this.policies?.filter(item => [ - PolicyType.PUBLISH, - PolicyType.DISCONTINUED, - PolicyType.DRY_RUN - ].includes(item.status)), + policies: this.policies?.filter(item => PolicyHelper.isRun(item)), contracts: res.body }, }); @@ -969,20 +1204,19 @@ export class PoliciesComponent implements OnInit { this.loading = true; forkJoin([ this.tokenService.getTokens(), - this.schemaService.getSchemas(), + this.schemaService.getSchemasByPage(), this.policyEngineService.all(), this.policyEngineService.getPolicyCategories() ]).subscribe( (result) => { const tokens = result[0].map((token) => new Token(token)); - const schemas = result[1].map((schema) => new Schema(schema)); + const schemas = result[1].body?.map((schema) => new Schema(schema)) ?? []; const policies = result[2]; const categories = result[3]; this.wizardService.openPolicyWizardDialog( WizardMode.CREATE, (value) => { this.loading = true; - console.log(value); this.wizardService .createPolicyAsync({ wizardConfig: value.config, @@ -990,7 +1224,6 @@ export class PoliciesComponent implements OnInit { }) .subscribe( (result) => { - console.log(result); const { taskId, expectation } = result; this.router.navigate(['task', taskId], { queryParams: { @@ -1075,33 +1308,8 @@ export class PoliciesComponent implements OnInit { ); } - private get filters(): { policyName: string; tag: string } { - return { - policyName: this.filtersForm.value?.policyName?.trim(), - tag: this.filtersForm.value?.tag, - }; - } - - get isFilterButtonDisabled(): boolean { - return this.filters.policyName.length === 0 && !this.filters.tag; - } - - get policiesList(): any[] { - return this.filteredPolicies.length > 0 - ? this.filteredPolicies - : this.policies || []; - } - - get hasPolicies(): boolean { - return this.policiesList.length > 0; - } - - get hasTagOptions(): boolean { - return this.tagOptions.length > 0; - } - - public searchPolicy(policyId?: any) { - const item = this.policies?.find((e) => e.id === policyId); + public searchPolicy(policy?: any) { + const item = this.policies?.find((e) => e.id === policy?.id); const dialogRef = this.dialogService.open(SearchPolicyDialog, { showHeader: false, width: '1100px', @@ -1124,52 +1332,6 @@ export class PoliciesComponent implements OnInit { }); } }); - - - - - - - - // this.loading = true; - // const options = { - // policyId, - // type: 'Global', - // // text, - // // owner, - // // minVcCount, - // // minVpCount, - // // minTokensCount, - // // threshold - // } - // this.analyticsService.searchPolicies(options).subscribe( - // (data) => { - // this.loading = false; - // if (!data || !data.result) { - // return; - // } - // const { target, result } = data; - // const list = result.sort((a: any, b: any) => - // a.rate > b.rate ? -1 : 1 - // ); - // const policy = target; - // this.dialog.open(SearchPolicyDialog, { - // panelClass: 'g-dialog', - // disableClose: true, - // autoFocus: false, - // data: { - // header: 'Result', - // policy, - // policyId, - // list, - // }, - // }); - // }, - // ({ message }) => { - // this.loading = false; - // console.error(message); - // } - // ); } public openSuggestionsDialog() { @@ -1183,28 +1345,15 @@ export class PoliciesComponent implements OnInit { .onClose.subscribe(); } - public getStatusName(policy: any): string { - if (policy.status == 'DRAFT') { - return 'Draft'; - } - if (policy.status == 'DRY-RUN') { - return 'In Dry Run'; - } - if (policy.status == 'PUBLISH') { - return `Published${!!policy.discontinuedDate ? '*' : ''}`; - } - return 'Not published'; - } - public onChangeStatus(event: any, policy: any): void { switch (policy.status) { - case 'DRAFT': + case PolicyType.DRAFT: this.onPublishAction(event, policy); break; - case 'DRY-RUN': + case PolicyType.DRY_RUN: this.onDryRunAction(event, policy); break; - case 'PUBLISH': + case PolicyType.PUBLISH: this.onPublishedAction(event, policy); break; default: @@ -1212,21 +1361,75 @@ export class PoliciesComponent implements OnInit { } } - public getStatusOptions(policy: any) { - if (policy.status == 'DRAFT') { - return this.publishMenuOption; - } - if (policy.status == 'DRY-RUN') { - return this.draftMenuOption; - } - if (policy.status == 'PUBLISH') { - return this.publishedMenuOption; - } else { - return this.publishErrorMenuOption; - } + public addTest(policy: any) { + const item = this.policies?.find((e) => e.id === policy?.id); + const dialogRef = this.dialogService.open(NewImportFileDialog, { + header: 'Add Policy Tests', + width: '600px', + styleClass: 'custom-dialog', + data: { + policy: item, + fileExtension: 'record', + label: 'Add test .record file', + multiple: true, + type: 'File' + } + }); + dialogRef.onClose.subscribe(async (files) => { + if (files) { + this.loading = true; + this.policyEngineService.addPolicyTest(item.id, files) + .subscribe((result) => { + this.loadAllPolicy(); + }, (e) => { + this.loading = false; + }) + } + }); } - public getDiscontinuedTooltip(date: Date) { - return date ? `Discontinue date is ${date.toLocaleString()}` : ''; + public testDetails(policy: any) { + const item = this.policies?.find((e) => e.id === policy?.id); + const dialogRef = this.dialogService.open(PolicyTestDialog, { + showHeader: false, + header: 'Policy Tests', + width: '1100px', + styleClass: 'guardian-dialog', + data: { + policy: item + } + }); + dialogRef.onClose.subscribe(async (result) => { }); + } + + public onRunTest($event: any) { + const { policy, test } = $event; + this.loading = true; + this.policyEngineService + .runTest(policy.id, test.id) + .subscribe((result) => { + this.loadAllPolicy(); + }, (e) => { + this.loading = false; + }); + } + + public onAddTest($event: any) { + const { policy } = $event; + this.addTest(policy); + } + + private updatePolicyTest(event: any) { + const policy = this.policies?.find((e: any) => e.id === event.policyId); + if (!policy) { + return; + } + const test = policy.tests?.find((e: any) => e.id === event.id); + if (!policy) { + return; + } + test.date = event.date; + test.progress = event.progress; + test.status = event.status; } } diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts index 67402703d1..049c29888e 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; -import { CodeEditorDialogComponent } from '../../../../helpers/code-editor-dialog/code-editor-dialog.component'; +import { CodeEditorDialogComponent } from '../../../../dialogs/code-editor-dialog/code-editor-dialog.component'; import { IModuleVariables, PolicyBlock, SchemaVariables } from '../../../../structures'; @Component({ diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts index e1c3990f99..921b1ac849 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; -import { CronConfigDialog } from '../../../../helpers/cron-config-dialog/cron-config-dialog.component'; +import { CronConfigDialog } from '../../../../dialogs/cron-config-dialog/cron-config-dialog.component'; import { IModuleVariables, PolicyBlock } from '../../../../structures'; /** diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts index e22ad3891c..798fe5eb00 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; -import { CodeEditorDialogComponent } from '../../../../helpers/code-editor-dialog/code-editor-dialog.component'; +import { CodeEditorDialogComponent } from '../../../../dialogs/code-editor-dialog/code-editor-dialog.component'; import { MatDialog } from '@angular/material/dialog'; import { IModuleVariables, PolicyBlock } from '../../../../structures'; diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html index 8224c0cb2a..5615451fc4 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html @@ -23,6 +23,7 @@
save @@ -62,6 +63,11 @@ Published
+
+ public + Demo +
+
{{errorsCount}}
-
double_arrow Go diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss index 41d9a101e8..2145fb3b31 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss @@ -79,6 +79,10 @@ color: var(--pc-event-color); } +.demo-color { + color: var(--pc-wizard-color); +} + .loading { background: var(--pc-background-color); position: absolute; diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts index 15103e337a..ac680ac30a 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts @@ -5,9 +5,9 @@ import { ActivatedRoute, Router } from '@angular/router'; import { PolicyCategoryType, Schema, SchemaHelper, Token, UserPermissions } from '@guardian/interfaces'; import * as yaml from 'js-yaml'; import { forkJoin, Observable } from 'rxjs'; -import { NewModuleDialog } from '../../helpers/new-module-dialog/new-module-dialog.component'; -import { SaveBeforeDialogComponent } from '../../helpers/save-before-dialog/save-before-dialog.component'; -import { PolicyAction, SavePolicyDialog } from '../../helpers/save-policy-dialog/save-policy-dialog.component'; +import { NewModuleDialog } from '../../dialogs/new-module-dialog/new-module-dialog.component'; +import { SaveBeforeDialogComponent } from '../../dialogs/save-before-dialog/save-before-dialog.component'; +import { PolicyAction, SavePolicyDialog } from '../../dialogs/save-policy-dialog/save-policy-dialog.component'; import { RegisteredService } from '../../services/registered.service'; import { IPolicyCategory, ModuleTemplate, Options, PolicyBlock, PolicyModule, PolicyStorage, PolicyTemplate, Theme, ThemeRule, ToolMenu, ToolTemplate } from '../../structures'; import { PolicyTreeComponent } from '../policy-tree/policy-tree.component'; @@ -30,6 +30,7 @@ import { TokenService } from 'src/app/services/token.service'; import { ProfileService } from 'src/app/services/profile.service'; import { ToolsService } from 'src/app/services/tools.service'; import { AnalyticsService } from 'src/app/services/analytics.service'; +import { PublishPolicyDialog } from '../../dialogs/publish-policy-dialog/publish-policy-dialog.component'; /** * The page for editing the policy and blocks. @@ -1332,12 +1333,16 @@ export class PolicyConfigurationComponent implements OnInit { } public setVersion() { - const dialogRef = this.dialog.open(SetVersionDialog, { - width: '350px', - disableClose: true, - data: {} + const dialogRef = this.dialogService.open(PublishPolicyDialog, { + showHeader: false, + header: 'Publish Policy', + width: '600px', + styleClass: 'guardian-dialog', + data: { + policy: this.policyTemplate + } }); - dialogRef.afterClosed().subscribe((version) => { + dialogRef.onClose.subscribe(async (version) => { if (version) { this.publishPolicy(version); } diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts index d8d2443b09..f729f3c132 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts @@ -3,9 +3,9 @@ import { ThemeService } from '../../../../services/theme.service'; import { Theme } from '../../structures/storage/theme'; import { ThemeRule } from '../../structures/storage/theme-rule'; import { RegisteredService } from '../../services/registered.service'; -import { ImportFileDialog } from '../../helpers/import-file-dialog/import-file-dialog.component'; +import { ImportFileDialog } from '../../dialogs/import-file-dialog/import-file-dialog.component'; import { MatDialog } from '@angular/material/dialog'; -import { NewThemeDialog } from '../../helpers/new-theme-dialog/new-theme-dialog.component'; +import { NewThemeDialog } from '../../dialogs/new-theme-dialog/new-theme-dialog.component'; import { ConfirmationDialog } from '../../policy-viewer/blocks/confirmation-dialog/confirmation-dialog.component'; import { ConfirmDialog } from 'src/app/modules/common/confirm-dialog/confirm-dialog.component'; diff --git a/frontend/src/app/modules/policy-engine/policy-engine.module.ts b/frontend/src/app/modules/policy-engine/policy-engine.module.ts index f9348f142a..3a36db6c47 100644 --- a/frontend/src/app/modules/policy-engine/policy-engine.module.ts +++ b/frontend/src/app/modules/policy-engine/policy-engine.module.ts @@ -77,30 +77,33 @@ import { ExternalTopicBlockComponent } from './policy-viewer/blocks/external-top import { UploadDocumentBlockComponent } from './policy-viewer/blocks/upload-document-block/upload-document-block.component'; //Helpers import { HelpIcon } from './helpers/help-icon/help-icon.component'; -import { SavePolicyDialog } from './helpers/save-policy-dialog/save-policy-dialog.component'; -import { ImportPolicyDialog } from './helpers/import-policy-dialog/import-policy-dialog.component'; -import { PreviewPolicyDialog } from './helpers/preview-policy-dialog/preview-policy-dialog.component'; -import { ExportPolicyDialog } from './helpers/export-policy-dialog/export-policy-dialog.component'; -import { CronConfigDialog } from './helpers/cron-config-dialog/cron-config-dialog.component'; -import { CodeEditorDialogComponent } from './helpers/code-editor-dialog/code-editor-dialog.component'; -import { SaveBeforeDialogComponent } from './helpers/save-before-dialog/save-before-dialog.component'; -import { InviteDialogComponent } from './helpers/invite-dialog/invite-dialog.component'; +import { SavePolicyDialog } from './dialogs/save-policy-dialog/save-policy-dialog.component'; +import { ImportPolicyDialog } from './dialogs/import-policy-dialog/import-policy-dialog.component'; +import { PreviewPolicyDialog } from './dialogs/preview-policy-dialog/preview-policy-dialog.component'; +import { ExportPolicyDialog } from './dialogs/export-policy-dialog/export-policy-dialog.component'; +import { CronConfigDialog } from './dialogs/cron-config-dialog/cron-config-dialog.component'; +import { CodeEditorDialogComponent } from './dialogs/code-editor-dialog/code-editor-dialog.component'; +import { SaveBeforeDialogComponent } from './dialogs/save-before-dialog/save-before-dialog.component'; +import { InviteDialogComponent } from './dialogs/invite-dialog/invite-dialog.component'; import { DocumentPath } from './helpers/document-path/document-path.component'; import { SelectBlock } from './helpers/select-block/select-block.component'; -import { MultiPolicyDialogComponent } from './helpers/multi-policy-dialog/multi-policy-dialog.component'; -import { ComparePolicyDialog } from './helpers/compare-policy-dialog/compare-policy-dialog.component'; -import { NewModuleDialog } from './helpers/new-module-dialog/new-module-dialog.component'; -import { PolicyWizardDialogComponent } from './helpers/policy-wizard-dialog/policy-wizard-dialog.component'; -import { NewPolicyDialog } from './helpers/new-policy-dialog/new-policy-dialog.component'; -import { ImportFileDialog } from './helpers/import-file-dialog/import-file-dialog.component'; -import { NewThemeDialog } from './helpers/new-theme-dialog/new-theme-dialog.component'; -import { ViewerDialog } from './helpers/viewer-dialog/viewer-dialog.component'; -import { CompareModulesDialogComponent } from './helpers/compare-modules-dialog/compare-modules-dialog.component'; +import { MultiPolicyDialogComponent } from './dialogs/multi-policy-dialog/multi-policy-dialog.component'; +import { ComparePolicyDialog } from './dialogs/compare-policy-dialog/compare-policy-dialog.component'; +import { NewModuleDialog } from './dialogs/new-module-dialog/new-module-dialog.component'; +import { PolicyWizardDialogComponent } from './dialogs/policy-wizard-dialog/policy-wizard-dialog.component'; +import { NewPolicyDialog } from './dialogs/new-policy-dialog/new-policy-dialog.component'; +import { ImportFileDialog } from './dialogs/import-file-dialog/import-file-dialog.component'; +import { NewThemeDialog } from './dialogs/new-theme-dialog/new-theme-dialog.component'; +import { ViewerDialog } from './dialogs/viewer-dialog/viewer-dialog.component'; +import { CompareModulesDialogComponent } from './dialogs/compare-modules-dialog/compare-modules-dialog.component'; import { RecordControllerComponent } from './record/record-controller/record-controller.component'; import { RecordResultDialog } from './record/record-result-dialog/record-result-dialog.component'; import { RecordResultsComponent } from './record/record-results/record-results.component'; +import { TestResultsComponent } from './record/test-results/test-results.component'; import { SearchBlocksComponent } from './helpers/search-blocks/search-blocks.component'; import { SelectSchema } from './helpers/select-schema/select-schema.component'; +import { PolicyTestResult } from './helpers/policy-test-result/policy-test-result.component'; +import { PublishPolicyDialog } from './dialogs/publish-policy-dialog/publish-policy-dialog.component'; //Modules import { ModulesListComponent } from './modules-list/modules-list.component'; import { ToolsListComponent } from './tools-list/tools-list.component'; @@ -125,19 +128,22 @@ import { TooltipModule } from 'primeng/tooltip'; import { SplitButtonModule } from 'primeng/splitbutton'; import { TabViewModule } from 'primeng/tabview'; import { DialogModule } from 'primeng/dialog'; -import { DeletePolicyDialogComponent } from './helpers/delete-policy-dialog/delete-policy-dialog.component'; +import { DeletePolicyDialogComponent } from './dialogs/delete-policy-dialog/delete-policy-dialog.component'; import { ProgressTrackerComponent } from './policy-viewer/progress-tracker/progress-tracker.component'; import { PolicyProgressService } from './services/policy-progress.service'; import { InputSwitchModule } from 'primeng/inputswitch'; import { OverlayPanelModule } from 'primeng/overlaypanel'; import { AngularSvgIconModule } from 'angular-svg-icon'; +import { RadioButtonModule } from 'primeng/radiobutton'; // Directives import { ResizingDirective } from './directives/resizing.directive'; import { CONFIGURATION_ERRORS } from './injectors/configuration.errors.injector'; // Dialogs import { DiscontinuePolicy } from './dialogs/discontinue-policy/discontinue-policy.component'; import { MigrateData } from './dialogs/migrate-data/migrate-data.component'; -import { JsonEditorDialogComponent } from './helpers/json-editor-dialog/json-editor-dialog.component'; +import { JsonEditorDialogComponent } from './dialogs/json-editor-dialog/json-editor-dialog.component'; +import { PolicyTestDialog } from './dialogs/policy-test-dialog/policy-test-dialog.component'; +import { NewImportFileDialog } from './dialogs/new-import-file-dialog/new-import-file-dialog.component'; @NgModule({ declarations: [ @@ -205,6 +211,8 @@ import { JsonEditorDialogComponent } from './helpers/json-editor-dialog/json-edi MultiSignBlockComponent, SelectBlock, SelectSchema, + PolicyTestResult, + PublishPolicyDialog, CreateTokenConfigComponent, CreateTokenBlockComponent, MultiPolicyDialogComponent, @@ -232,10 +240,13 @@ import { JsonEditorDialogComponent } from './helpers/json-editor-dialog/json-edi RecordControllerComponent, RecordResultDialog, RecordResultsComponent, + TestResultsComponent, ResizingDirective, DiscontinuePolicy, MigrateData, JsonEditorDialogComponent, + PolicyTestDialog, + NewImportFileDialog ], imports: [ CommonModule, @@ -260,6 +271,7 @@ import { JsonEditorDialogComponent } from './helpers/json-editor-dialog/json-edi TooltipModule, SplitButtonModule, TabViewModule, + RadioButtonModule, InputSwitchModule, AppRoutingModule, DialogModule, diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts index 91e0ac5b07..11f3b09e4c 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts @@ -7,7 +7,7 @@ import { forkJoin } from 'rxjs'; import { animate, state, style, transition, trigger } from '@angular/animations'; import { WebSocketService } from 'src/app/services/web-socket.service'; import { VCViewerDialog } from 'src/app/modules/schema-engine/vc-dialog/vc-dialog.component'; -import { ViewerDialog } from '../../../helpers/viewer-dialog/viewer-dialog.component'; +import { ViewerDialog } from '../../../dialogs/viewer-dialog/viewer-dialog.component'; import { DialogService } from 'primeng/dynamicdialog'; /** diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts index 804e991316..1337d9b29e 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts @@ -5,7 +5,7 @@ import { PolicyHelper } from 'src/app/services/policy-helper.service'; import { WebSocketService } from 'src/app/services/web-socket.service'; import { MatDialog } from '@angular/material/dialog'; import { ConfirmationDialog } from '../confirmation-dialog/confirmation-dialog.component'; -import { InviteDialogComponent } from '../../../helpers/invite-dialog/invite-dialog.component'; +import { InviteDialogComponent } from '../../../dialogs/invite-dialog/invite-dialog.component'; /** * Component for display block of 'policyRolesBlock' types. diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html index 15ef3f6222..d0cb54a4b1 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html @@ -106,7 +106,7 @@
Version: ({{ policyInfo.version }}) Role: {{ policyInfo.userRoles.join(", ") }} diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss index 05165d9b82..fc183e5cc2 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss @@ -86,6 +86,7 @@ a.go-back-link mat-icon { } } +.policy-header[policy-status="DEMO"], .policy-header[policy-status="DRY-RUN"] { top: 170px; } @@ -99,6 +100,7 @@ a.go-back-link mat-icon { background: #f9fafc; } +.policy-container[policy-status="DEMO"], .policy-container[policy-status="DRY-RUN"] { left: 25px; top: 170px; @@ -124,6 +126,7 @@ a.go-back-link mat-icon { background: #f9fafc; } +.second-policy-container[policy-status="DEMO"], .second-policy-container[policy-status="DRY-RUN"] { left: 25px; top: 170px; @@ -204,9 +207,7 @@ a.go-back-link mat-icon { position: relative; } -.content[status="DRY-RUN"] { -} - +.content[status="DEMO"] .policy-header, .content[status="DRY-RUN"] .policy-header { min-height: 136px; height: 136px; @@ -228,10 +229,12 @@ a.go-back-link mat-icon { color: #fff; } +.content[status="DEMO"] .go-back-link, .content[status="DRY-RUN"] .go-back-link { color: #fff; } +.content[status="DEMO"] .go-back-link mat-icon, .content[status="DRY-RUN"] .go-back-link mat-icon { color: #fff; } @@ -427,9 +430,6 @@ a.go-back-link mat-icon { text-transform: uppercase; } - .mat-header-cell:first-of-type { - } - .mat-cell { border-bottom: none; color: var(--color-grey-black-1); @@ -582,6 +582,7 @@ a.go-back-link mat-icon { border: none; } + .policy-header[policy-status="DEMO"], .policy-header[policy-status="DRY-RUN"] { top: 45px; } diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.ts index 0eb0f14c34..6d0f5ae9d8 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.ts @@ -52,7 +52,13 @@ export class PolicyViewerComponent implements OnInit, OnDestroy { private subscription = new Subscription(); public get isDryRun(): boolean { - return this.policyInfo && this.policyInfo.status === 'DRY-RUN'; + return ( + this.policyInfo && + ( + this.policyInfo.status === PolicyType.DRY_RUN || + this.policyInfo.status === PolicyType.DEMO + ) + ); } @ViewChild('recordController') diff --git a/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts b/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts index 9ed15670ea..c96547cc60 100644 --- a/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts +++ b/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@ import { Subscription } from 'rxjs'; import { RecordService } from 'src/app/services/record.service'; import { WebSocketService } from 'src/app/services/web-socket.service'; -import { ImportFileDialog } from '../../helpers/import-file-dialog/import-file-dialog.component'; +import { ImportFileDialog } from '../../dialogs/import-file-dialog/import-file-dialog.component'; import { MatDialog } from '@angular/material/dialog'; import { RecordResultDialog } from '../record-result-dialog/record-result-dialog.component'; import { Router } from '@angular/router'; diff --git a/frontend/src/app/modules/policy-engine/record/record-results/record-results.component.scss b/frontend/src/app/modules/policy-engine/record/record-results/record-results.component.scss index 1f02b85fe4..207edbbd78 100644 --- a/frontend/src/app/modules/policy-engine/record/record-results/record-results.component.scss +++ b/frontend/src/app/modules/policy-engine/record/record-results/record-results.component.scss @@ -30,242 +30,4 @@ transform: translate(-50%, -50%); font-size: 20px; color: darkgrey; -} - -.actions-container { - z-index: 2; - display: flex; - justify-content: space-between; - flex-wrap: wrap; - padding: 10px 15px 8px 24px; -} - -.actions-container { - .toolbar-btn { - margin: 15px; - min-width: 120px; - cursor: pointer; - font-weight: 500; - text-align: left; - user-select: none; - position: relative; - border-radius: 8px; - padding: 0; - font-size: 14px; - padding-left: 48px !important; - padding-right: 30px; - } - - .toolbar-btn mat-icon { - position: absolute; - left: 14px; - top: 10px; - } - - .toolbar-btn.add mat-icon { - font-size: 30px; - left: 10px; - top: 7px; - } -} - -.policy-filters { - display: flex; - align-items: center; - flex-direction: row; - justify-content: space-between; - font-size: 16px; - - &__control { - margin-left: 20px; - - &:last-child { - margin-right: 20px; - } - } - - &::ng-deep { - .mat-stroked-button { - border-radius: 25px; - font-size: 16px; - width: 180px; - height: 50px; - margin-left: 20px; - } - - .mat-stroked-button:not(.mat-button-disabled) { - color: var(--button-primary-color); - border: 1px solid var(--button-primary-color); - } - - .mat-form-field-label { - top: 50%; - margin-top: 0; - color: #9e9e9e; - } - - .mat-form-field-wrapper { - padding-bottom: 0; - } - - .mat-form-field-infix { - padding: 1.3em 0 1em 0; - border-top: unset; - font-weight: 300; - } - - .mat-select-arrow-wrapper { - transform: unset; - } - } -} - -.no-results-found { - font-size: 24px; - color: #8A8A8A; - width: 100%; - text-align: center; - margin: 20px 0; -} - -.table-container { - min-width: 1600px; - min-height: 100px; - overflow-y: auto; - position: relative; - z-index: 1; - border-top: 1px solid #eee; - max-height: calc(100vh - var(--header-height) - 170px); - - .table { - width: 100%; - } - - .mat-column-selector { - width: 16px; - max-width: 16px; - padding-left: 26px; - - mat-checkbox { - cursor: pointer; - } - } - - .mat-column-status { - padding-left: 8px; - width: 155px; - max-width: 155px; - border-right: 1px solid #dddddd; - } - - .mat-column-tokens { - padding-left: 8px; - width: 80px; - max-width: 80px; - border-right: 1px solid #dddddd; - } - - .mat-column-schemas { - padding-left: 8px; - width: 90px; - max-width: 90px; - border-right: 1px solid #dddddd; - } - - .mat-column-version { - padding-left: 8px; - min-width: 75px; - max-width: 100px; - border-right: 1px solid #dddddd; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .mat-column-topic { - padding-left: 8px; - width: 150px; - max-width: 150px; - border-right: 1px solid #dddddd; - } - - .mat-column-description { - padding-left: 8px; - max-width: calc(100vw - 1270px); - min-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .mat-column-name { - padding-left: 24px; - width: 140px; - max-width: 190px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .mat-column-tags { - max-width: 175px; - min-width: 175px; - width: 175px; - border-right: 1px solid #dddddd; - padding-left: 10px; - } - - .mat-column-rate { - max-width: 100px; - min-width: 100px; - width: 100px; - padding-left: 10px; - } - - .status-draft { - font-weight: 500; - color: #9c27b0; - } - - .status-dry-run { - font-weight: 500; - color: #3f51b5; - } - - .status-publish { - font-weight: 500; - color: #4caf50; - } - - .status-failed { - font-weight: 500; - color: #572424; - } - - .color-field { - padding-right: 8px; - font-weight: 500; - text-align: end; - - &.item-color-green { - color: #008d0c; - } - - &.item-color-yellow { - color: #c79604; - } - - &.item-color-red { - color: #e70000; - } - } - - *[readonly="true"] { - background: #f1f1f1 !important; - - & mat-checkbox { - filter: grayscale(1) !important; - pointer-events: none !important; - } - } } \ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.html b/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.html new file mode 100644 index 0000000000..5ff3294713 --- /dev/null +++ b/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.html @@ -0,0 +1,20 @@ +
+
+ +
+ + +
+ + + +
No results found.
+
+ + +
+ +
+
\ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.scss b/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.scss new file mode 100644 index 0000000000..207edbbd78 --- /dev/null +++ b/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.scss @@ -0,0 +1,33 @@ +.content { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + display: block; + min-width: 1600px; +} + +.loading { + background: #fff; + position: fixed; + z-index: 99; + top: var(--header-height); + left: 0; + bottom: 0; + right: 0; + display: flex; + align-items: center; + justify-items: center; + justify-content: center; + align-content: center; +} + +.not-exist { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + font-size: 20px; + color: darkgrey; +} \ No newline at end of file diff --git a/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.ts b/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.ts new file mode 100644 index 0000000000..c46fec4edc --- /dev/null +++ b/frontend/src/app/modules/policy-engine/record/test-results/test-results.component.ts @@ -0,0 +1,56 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ProfileService } from 'src/app/services/profile.service'; +import { forkJoin } from 'rxjs'; +import { PolicyEngineService } from 'src/app/services/policy-engine.service'; + +/** + * Component for show test results + */ +@Component({ + selector: 'app-test-results', + templateUrl: './test-results.component.html', + styleUrls: ['./test-results.component.scss'] +}) +export class TestResultsComponent implements OnInit { + public loading: boolean = true; + public testId: string; + public policyId: string; + public owner: any; + public results: any; + + constructor( + private policyEngineService: PolicyEngineService, + public profileService: ProfileService, + public route: ActivatedRoute, + public router: Router, + ) { + } + + ngOnInit() { + this.loading = true; + this.route.queryParams.subscribe(queryParams => { + this.loadData(); + }); + } + + private loadData() { + this.loading = true; + this.testId = this.route.snapshot.queryParams.testId; + this.policyId = this.route.snapshot.queryParams.policyId; + + forkJoin([ + this.profileService.getProfile(), + this.policyEngineService.getTestDetails(this.policyId, this.testId) + ]).subscribe(([profile, results]) => { + this.owner = profile?.did; + this.results = results; + setTimeout(() => { + this.loading = false; + }, 500); + }, (e) => { + this.loading = false; + console.error(e); + }); + } +} diff --git a/frontend/src/app/modules/policy-engine/services/wizard.service.ts b/frontend/src/app/modules/policy-engine/services/wizard.service.ts index 40d0f7d59b..69664a5c44 100644 --- a/frontend/src/app/modules/policy-engine/services/wizard.service.ts +++ b/frontend/src/app/modules/policy-engine/services/wizard.service.ts @@ -6,7 +6,7 @@ import { IWizardConfig, Schema, Token } from '@guardian/interfaces'; import { SelectorDialogComponent } from '../../common/selector-dialog/selector-dialog.component'; import { MatDialog } from '@angular/material/dialog'; import { ConfirmationDialogComponent } from '../../common/confirmation-dialog/confirmation-dialog.component'; -import { PolicyWizardDialogComponent } from '../helpers/policy-wizard-dialog/policy-wizard-dialog.component'; +import { PolicyWizardDialogComponent } from '../dialogs/policy-wizard-dialog/policy-wizard-dialog.component'; import { DialogService } from 'primeng/dynamicdialog'; export enum WizardMode { diff --git a/frontend/src/app/modules/policy-engine/structures/policy-models/policy/policy.model.ts b/frontend/src/app/modules/policy-engine/structures/policy-models/policy/policy.model.ts index 529c41e0e2..1a30ae3a08 100644 --- a/frontend/src/app/modules/policy-engine/structures/policy-models/policy/policy.model.ts +++ b/frontend/src/app/modules/policy-engine/structures/policy-models/policy/policy.model.ts @@ -36,6 +36,7 @@ export class PolicyTemplate { public readonly messageId!: string; public readonly version!: string; public readonly previousVersion!: string; + public readonly tests!: any; private _policyTag!: string; private _name!: string; @@ -70,6 +71,8 @@ export class PolicyTemplate { public readonly isDryRun: boolean = false; public readonly readonly: boolean = false; public readonly isPublishError: boolean = false; + public readonly isDemo: boolean = false; + public readonly isRun: boolean = false; constructor(policy?: any) { this._changed = false; @@ -93,6 +96,7 @@ export class PolicyTemplate { this.messageId = policy.messageId; this.version = policy.version; this.previousVersion = policy.previousVersion; + this.tests = policy.tests; this.buildPolicy(policy); this.buildBlock(policy.config); @@ -101,7 +105,9 @@ export class PolicyTemplate { this.isPublished = this.status === PolicyType.PUBLISH || this.status === PolicyType.DISCONTINUED; this.isDryRun = this.status === PolicyType.DRY_RUN; this.isPublishError = this.status === PolicyType.PUBLISH_ERROR; - this.readonly = this.isPublished || this.isDryRun || this.isPublishError; + this.isDemo = this.status === PolicyType.DEMO; + this.readonly = this.isPublished || this.isDryRun || this.isPublishError || this.isDemo; + this.isRun = this.isDryRun || this.isPublished || this.isDemo } public get policyTag(): string { @@ -413,11 +419,11 @@ export class PolicyTemplate { this._policyNavigation = []; if (Array.isArray(policy.policyRoles)) { for (const role of policy.policyRoles) { - this._policyNavigation.push(new PolicyNavigationModel({role, steps: []}, this)); + this._policyNavigation.push(new PolicyNavigationModel({ role, steps: [] }, this)); } } - this._policyNavigation.push(new PolicyNavigationModel({role: 'NO_ROLE', steps: []}, this)); - this._policyNavigation.push(new PolicyNavigationModel({role: 'OWNER', steps: []}, this)); + this._policyNavigation.push(new PolicyNavigationModel({ role: 'NO_ROLE', steps: [] }, this)); + this._policyNavigation.push(new PolicyNavigationModel({ role: 'OWNER', steps: [] }, this)); if (policy.policyNavigation && Array.isArray(policy.policyNavigation)) { for (const nav of policy.policyNavigation) { diff --git a/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts b/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts index ab73169cba..7a86231486 100644 --- a/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts +++ b/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts @@ -8,11 +8,11 @@ import { InformService } from 'src/app/services/inform.service'; import { ProfileService } from 'src/app/services/profile.service'; import { TagsService } from 'src/app/services/tag.service'; import { ToolsService } from 'src/app/services/tools.service'; -import { CompareModulesDialogComponent } from '../helpers/compare-modules-dialog/compare-modules-dialog.component'; -import { ExportPolicyDialog } from '../helpers/export-policy-dialog/export-policy-dialog.component'; -import { ImportPolicyDialog } from '../helpers/import-policy-dialog/import-policy-dialog.component'; -import { NewModuleDialog } from '../helpers/new-module-dialog/new-module-dialog.component'; -import { PreviewPolicyDialog } from '../helpers/preview-policy-dialog/preview-policy-dialog.component'; +import { CompareModulesDialogComponent } from '../dialogs/compare-modules-dialog/compare-modules-dialog.component'; +import { ExportPolicyDialog } from '../dialogs/export-policy-dialog/export-policy-dialog.component'; +import { ImportPolicyDialog } from '../dialogs/import-policy-dialog/import-policy-dialog.component'; +import { NewModuleDialog } from '../dialogs/new-module-dialog/new-module-dialog.component'; +import { PreviewPolicyDialog } from '../dialogs/preview-policy-dialog/preview-policy-dialog.component'; import { mobileDialog } from 'src/app/utils/mobile-utils'; import { DialogService } from 'primeng/dynamicdialog'; @@ -254,13 +254,13 @@ export class ToolsListComponent implements OnInit, OnDestroy { .subscribe(tool => { this.loading = false; this.dialogService.open(ExportPolicyDialog, { + showHeader: false, + header: 'Export Tool', width: '700px', - header: 'Export', - styleClass: 'custom-dialog', + styleClass: 'guardian-dialog', data: { tool }, - closable: true }) }); } diff --git a/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.scss b/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.scss index e795388919..fefc61a005 100644 --- a/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.scss +++ b/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.scss @@ -1,76 +1,76 @@ .content { - overflow: visible; + overflow: visible; } .form-input-container { - display: flex; - flex-direction: column; - margin-bottom: 24px; + display: flex; + flex-direction: column; + margin-bottom: 24px; } .form-label { - margin-bottom: 6px; - color: var(--color-grey-black-1, #181818); - font-family: Inter; - font-size: 12px; - font-style: normal; - font-weight: 500; - line-height: 14px; + margin-bottom: 6px; + color: var(--color-grey-black-1, #181818); + font-family: Inter; + font-size: 12px; + font-style: normal; + font-weight: 500; + line-height: 14px; } :host ::ng-deep { - .mat-dialog-title { - margin-bottom: 32px; - color: #000; - font-family: Poppins; - font-size: 24px; - font-style: normal; - font-weight: 600; - line-height: normal; - } + .mat-dialog-title { + margin-bottom: 32px; + color: #000; + font-family: Poppins; + font-size: 24px; + font-style: normal; + font-weight: 600; + line-height: normal; + } - .mat-form-field { - width: 100%; - } + .mat-form-field { + width: 100%; + } - .mat-dialog-actions { - display: flex; - justify-content: flex-end; - gap: 16px; - } + .mat-dialog-actions { + display: flex; + justify-content: flex-end; + gap: 16px; + } } @media (max-width: 810px) { - mat-form-field { - width: 100%; - } + mat-form-field { + width: 100%; + } - .mat-dialog-actions { - display: grid; - grid-template-columns: 1fr 1fr; - column-gap: 10px; - } + .mat-dialog-actions { + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 10px; + } - #cancel-btn { - border: 1px solid #2C78F6; - padding: 0; - margin-left: 0; - background: none !important; - color: #2C78F6; - order: 1; - grid-column: 1; - } + #cancel-btn { + border: 1px solid #2C78F6; + padding: 0; + margin-left: 0; + background: none !important; + color: #2C78F6; + order: 1; + grid-column: 1; + } - #publish-btn { - padding: 0; - order: 2; - grid-column: 2; - background: #2C78F6; - } + #publish-btn { + padding: 0; + order: 2; + grid-column: 2; + background: #2C78F6; + } - #publish-btn[disabled] { - opacity: 0.5; - background: #2C78F6; - color: white; - } -} + #publish-btn[disabled] { + opacity: 0.5; + background: #2C78F6; + color: white; + } +} \ No newline at end of file diff --git a/frontend/src/app/services/logger.service.ts b/frontend/src/app/services/logger.service.ts index ff3c1567e1..70ec04afb9 100644 --- a/frontend/src/app/services/logger.service.ts +++ b/frontend/src/app/services/logger.service.ts @@ -21,4 +21,8 @@ export class LoggerService { public getAttributes(name: string = "", existingAttributes: string[] = []): Observable { return this.http.get(`${this.url}/attributes`, { params: { name, existingAttributes } }); } + + public getUrlSeq(): Observable { + return this.http.get(`${this.url}/seq`); + } } diff --git a/frontend/src/app/services/map.service.ts b/frontend/src/app/services/map.service.ts index 451d712e52..d60497d649 100644 --- a/frontend/src/app/services/map.service.ts +++ b/frontend/src/app/services/map.service.ts @@ -1,7 +1,8 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { API_BASE_URL } from './api'; +import { switchMap, tap } from 'rxjs/operators'; /** * Services for working with map api. @@ -10,8 +11,9 @@ import { API_BASE_URL } from './api'; export class MapService { private readonly url: string = `${API_BASE_URL}/map`; private _mapLoaded: boolean = false; + private _mapRequested: boolean = false; - set mapLoaded(value: boolean) { + set mapLoaded(value) { this._mapLoaded = value; } @@ -21,12 +23,32 @@ export class MapService { constructor(private http: HttpClient) {} - public getApiKey(): Observable { + private _mapRequest(value?: string) { + return this.http.jsonp( + `https://maps.googleapis.com/maps/api/js${ + value ? '?key=' + value : '' + }`, + 'callback' + ); + } + + public getApiKey() { return this.http.get(`${this.url}/key`, { responseType: 'text', }); } + public loadMap(): Observable { + if (this._mapRequested) { + return of(null); + } + this._mapRequested = true; + return this.getApiKey().pipe( + switchMap((key) => this._mapRequest(key)), + tap(() => (this.mapLoaded = true)) + ); + } + public getSentinelKey(): Observable { return this.http.get(`${this.url}/sh`, { responseType: 'text', diff --git a/frontend/src/app/services/policy-engine.service.ts b/frontend/src/app/services/policy-engine.service.ts index f6c1dcb524..ebebcef5f6 100644 --- a/frontend/src/app/services/policy-engine.service.ts +++ b/frontend/src/app/services/policy-engine.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; +import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { API_BASE_URL } from './api'; import { MigrationConfig, PolicyToolMetadata } from '@guardian/interfaces'; @@ -120,41 +120,46 @@ export class PolicyEngineService { public pushImportByMessage( messageId: string, versionOfTopicId?: string, - metadata?: PolicyToolMetadata + metadata?: PolicyToolMetadata, + demo?: boolean ): Observable<{ taskId: string; expectation: number }> { - var query = versionOfTopicId - ? `?versionOfTopicId=${versionOfTopicId}` - : ''; + let params = new HttpParams(); + if (versionOfTopicId) { + params = params.set('versionOfTopicId', versionOfTopicId); + } + if (demo) { + params = params.set('demo', demo); + } return this.http.post<{ taskId: string; expectation: number }>( - `${this.url}/push/import/message${query}`, - { messageId, metadata } + `${this.url}/push/import/message`, + { messageId, metadata }, + { params } ); } public pushImportByFile( policyFile: any, versionOfTopicId?: string, - metadata?: PolicyToolMetadata + metadata?: PolicyToolMetadata, + demo?: boolean ): Observable<{ taskId: string; expectation: number }> { - var query = versionOfTopicId - ? `?versionOfTopicId=${versionOfTopicId}` - : ''; + let params = new HttpParams(); + if (versionOfTopicId) { + params = params.set('versionOfTopicId', versionOfTopicId); + } + if (demo) { + params = params.set('demo', demo); + } + const formData = new FormData(); - formData.append( - 'policyFile', - new Blob([policyFile], { type: 'application/octet-stream' }) - ); + formData.append('policyFile', new Blob([policyFile], { type: 'application/octet-stream' })); if (metadata) { - formData.append( - 'metadata', - new Blob([JSON.stringify(metadata)], { - type: 'application/json', - }) - ); + formData.append('metadata', new Blob([JSON.stringify(metadata)], { type: 'application/json' })); } return this.http.post<{ taskId: string; expectation: number }>( - `${this.url}/push/import/file-metadata${query}`, - formData + `${this.url}/push/import/file-metadata`, + formData, + { params } ); } @@ -328,4 +333,36 @@ export class PolicyEngineService { } ); } + + // public addPolicyTest(policyId: string, testFile: any): Observable { + // return this.http.post(`${this.url}/${policyId}/test/`, testFile, { + // headers: { + // 'Content-Type': 'binary/octet-stream' + // } + // }); + // } + + public runTest(policyId: string, testId: string): Observable { + return this.http.post(`${this.url}/${policyId}/test/${testId}/start`, null); + } + + public stopTest(policyId: string, testId: string): Observable { + return this.http.post(`${this.url}/${policyId}/test/${testId}/stop`, null); + } + + public getTestDetails(policyId: string, testId: string): Observable { + return this.http.get(`${this.url}/${policyId}/test/${testId}/details`); + } + + public deleteTest(policyId: string, testId: string): Observable { + return this.http.delete(`${this.url}/${policyId}/test/${testId}`); + } + + public addPolicyTest(policyId: string, files: File[]): Observable { + const formData = new FormData(); + for (const file of files) { + formData.append('tests', file); + } + return this.http.post(`${this.url}/${policyId}/test/`, formData); + } } diff --git a/frontend/src/app/services/record.service.ts b/frontend/src/app/services/record.service.ts index 24936e5bed..70c682de4f 100644 --- a/frontend/src/app/services/record.service.ts +++ b/frontend/src/app/services/record.service.ts @@ -38,11 +38,12 @@ export class RecordService { return this.http.get(`${this.url}/${policyId}/recording/actions`); } - public runRecord(policyId: string, file: any): Observable { - return this.http.post(`${this.url}/${policyId}/running/start`, file, { + public runRecord(policyId: string, file: any): Observable { + return this.http.post(`${this.url}/${policyId}/running/start`, file, { headers: { 'Content-Type': 'binary/octet-stream' - } + }, + responseType: 'text' }); } diff --git a/frontend/src/app/services/web-socket.service.ts b/frontend/src/app/services/web-socket.service.ts index 25dc436f2b..7cba546ba9 100644 --- a/frontend/src/app/services/web-socket.service.ts +++ b/frontend/src/app/services/web-socket.service.ts @@ -38,6 +38,7 @@ export class WebSocketService { private servicesReady: Subject; private profileSubject: Subject<{ type: string, data: any }>; private recordUpdateSubject: Subject; + private testUpdateSubject: Subject; private blockUpdateSubject: Subject; private userInfoUpdateSubject: Subject; private taskStatusSubject: Subject; @@ -61,6 +62,7 @@ export class WebSocketService { constructor(private dialogService: DialogService, private auth: AuthService, private toastr: ToastrService, private router: Router) { this.recordUpdateSubject = new Subject(); + this.testUpdateSubject = new Subject(); this.blockUpdateSubject = new Subject(); this.userInfoUpdateSubject = new Subject(); this.servicesReady = new Subject(); @@ -245,6 +247,10 @@ export class WebSocketService { this.recordUpdateSubject.next(data); break; } + case MessageAPI.UPDATE_TEST_EVENT: { + this.testUpdateSubject.next(data); + break; + } case MessageAPI.UPDATE_EVENT: { this.blockUpdateSubject.next(data); break; @@ -342,6 +348,14 @@ export class WebSocketService { return this.recordUpdateSubject.subscribe(next, error, complete); } + public testSubscribe( + next?: ((id: any) => void), + error?: ((error: any) => void), + complete?: (() => void) + ): Subscription { + return this.testUpdateSubject.subscribe(next, error, complete); + } + public subscribeUserInfo( next?: ((id: any) => void), error?: ((error: any) => void), @@ -513,4 +527,22 @@ export class WebSocketService { public getServicesStatesArray(): any[] { return this.serviesStates; } + + public getServiceStateObservable(serviceName: string): Observable { + return new Observable((observer) => { + const checkState = () => { + const currentService = this.serviesStates.find((s: { serviceName: string; states: string[]; }) => s.serviceName === serviceName && s.states.includes('READY')); + if (currentService) { + observer.next(true); + observer.complete(); + } + }; + + const subscription = this.servicesReady.subscribe(() => checkState()); + + checkState(); + + return () => subscription.unsubscribe(); + }); + } } diff --git a/frontend/src/app/themes/guardian.scss b/frontend/src/app/themes/guardian.scss new file mode 100644 index 0000000000..506828b6a0 --- /dev/null +++ b/frontend/src/app/themes/guardian.scss @@ -0,0 +1,618 @@ +::ng-deep body { + --guardian-font-family: Inter, serif; + --guardian-font-style: normal; + --guardian-header-color: #000; + --guardian-font-color: #23252E; + + --guardian-primary-color: var(--color-primary, #4169E2); + --guardian-primary-background: #e1e7fa; + + --guardian-secondary-color: #FFFFFF; + --guardian-secondary-background: #FFFFFF; + + --guardian-success-color: #19BE47; + --guardian-success-background: #CAFDD9; + + --guardian-failure-color: #FF432A; + --guardian-failure-background: #FFEAEA; + + --guardian-disabled-color: #848FA9; + --guardian-disabled-background: #EFF3F7; + + --guardian-dry-run-color: #4169E2; + --guardian-dry-run-background: #f5f7fd; + + --guardian-grey-color: #EFF3F7; + --guardian-grey-background: #F9FAFC; + --guardian-grey-color-2: #E1E7EF; + + --guardian-delete-color: #FF432A; + --guardian-delete-background: #FFEAEA; + + --guardian-grid-color: #848FA9; + --guardian-border-color: #E1E7EF; + + --guardian-close-color: #848FA9; + + --guardian-small-font-size: 12px; + --guardian-primary-font-size: 14px; + --guardian-header-1-font-size: 16px; + --guardian-header-2-font-size: 18px; + --guardian-header-3-font-size: 20px; + --guardian-header-4-font-size: 22px; + --guardian-header-5-font-size: 24px; + + .icon-color { + &-primary { + fill: var(--guardian-primary-color); + color: var(--guardian-primary-color); + } + + &-secondary { + fill: var(--guardian-secondary-color); + color: var(--guardian-secondary-color); + } + + &-disabled { + fill: var(--guardian-disabled-color); + color: var(--guardian-disabled-color); + } + + &-delete { + fill: var(--guardian-delete-color); + color: var(--guardian-delete-color); + } + + &-success { + fill: var(--guardian-success-color); + color: var(--guardian-success-color); + } + + &-failure { + fill: var(--guardian-failure-color); + color: var(--guardian-failure-color); + } + + &-close { + fill: var(--guardian-close-color); + color: var(--guardian-close-color); + } + } + + .guardian-loading { + background: var(--guardian-secondary-background); + position: absolute; + z-index: 99; + border-radius: 16px; + top: 0; + left: 0; + bottom: 0; + right: 0; + display: flex; + align-items: center; + justify-items: center; + justify-content: center; + align-content: center; + + .guardian-loading-image { + width: 56px; + height: 56px; + border-top: 3px solid var(--guardian-primary-color); + border-left: 3px solid transparent; + border-right: 3px solid transparent; + border-bottom: 3px solid transparent; + border-radius: 100%; + filter: brightness(100%); + animation-name: guardian-loading-animation; + animation-duration: 7.5s; + animation-iteration-count: infinite; + animation-timing-function: ease-in-out; + } + + @keyframes guardian-loading-animation { + 0% { + transform: rotate(0deg); + opacity: 1; + } + + 25% { + transform: rotate(360deg); + border-top: 3px solid transparent; + border-right: 3px solid var(--guardian-primary-color); + border-left: 3px solid transparent; + border-bottom: 3px solid transparent; + } + + 50% { + transform: rotate(720deg); + border-top: 3px solid transparent; + border-left: 3px solid transparent; + border-bottom: 3px solid var(--guardian-primary-color); + border-right: 3px solid transparent; + } + + 75% { + transform: rotate(1080deg); + border-top: 3px solid transparent; + border-bottom: 3px solid transparent; + border-right: 3px solid transparent; + border-left: 3px solid var(--guardian-primary-color); + } + + 100% { + transform: rotate(1440deg); + border-top: 3px solid var(--guardian-primary-color); + border-left: 3px solid transparent; + border-right: 3px solid transparent; + border-bottom: 3px solid transparent; + } + } + } + + .guardian-button { + display: flex; + border-radius: 6px; + font-family: var(--guardian-font-family); + transition: all 0.25s ease-in-out; + white-space: nowrap; + user-select: none; + justify-content: center; + align-items: center; + margin: 0; + display: inline-flex; + overflow: hidden; + position: relative; + box-sizing: border-box; + cursor: pointer; + border: 1px solid transparent; + text-overflow: ellipsis; + + &:hover { + filter: brightness(0.95); + } + + &-primary { + color: var(--guardian-secondary-color); + background-color: var(--guardian-primary-color); + border: 1px solid var(--guardian-primary-color); + } + + &-secondary { + color: var(--guardian-primary-color); + background-color: var(--guardian-secondary-color); + border: 1px solid var(--guardian-primary-color); + } + + &-delete { + color: var(--guardian-delete-color); + background-color: var(--guardian-secondary-color); + border: 1px solid var(--guardian-delete-color); + } + + &-success { + color: var(--guardian-success-color); + background-color: var(--guardian-success-background); + border: 1px solid var(--guardian-success-color); + } + + .guardian-button-icon { + width: auto; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + } + + .guardian-button-icon+.guardian-button-label { + padding-left: 8px; + } + + .guardian-button-label+.guardian-button-icon { + margin-right: 8px; + } + } + + button.guardian-button[disabled], + div.guardian-button[disabled="true"] { + cursor: default !important; + + color: var(--guardian-disabled-color) !important; + background-color: var(--guardian-disabled-background) !important; + border: 1px solid var(--guardian-disabled-color) !important; + filter: none !important; + } + + .guardian-label { + display: flex; + border-radius: 6px; + font-family: var(--guardian-font-family); + transition: all 0.25s ease-in-out; + white-space: nowrap; + user-select: none; + justify-content: center; + align-items: center; + margin: 0; + display: inline-flex; + overflow: hidden; + position: relative; + box-sizing: border-box; + text-overflow: ellipsis; + + &-primary { + color: var(--guardian-secondary-color); + background-color: var(--guardian-primary-color); + } + + &-secondary { + color: var(--guardian-primary-color); + background-color: var(--guardian-primary-background); + } + + &-delete { + color: var(--guardian-delete-color); + background-color: var(--guardian-delete-background); + } + + &-disabled { + color: var(--guardian-disabled-color); + background-color: var(--guardian-disabled-color); + } + } + + .guardian-icon-button { + display: flex; + border-radius: 6px; + transition: all 0.25s ease-in-out; + white-space: nowrap; + user-select: none; + justify-content: center; + align-items: center; + margin: 0; + display: inline-flex; + overflow: hidden; + position: relative; + box-sizing: border-box; + cursor: pointer; + border: none; + background-color: transparent; + + &:hover { + background-color: var(--guardian-primary-background); + } + + &.big:hover { + box-shadow: 0px 0px 0px 5px var(--guardian-primary-background); + } + } + + button.guardian-icon-button[disabled], + div.guardian-icon-button[disabled="true"] { + cursor: default !important; + background-color: transparent !important; + box-shadow: none !important; + filter: none !important; + } + + .guardian-dialog { + .p-dialog-content { + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-left-radius: 16px; + border-bottom-right-radius: 16px; + padding: 0 32px 32px 32px; + } + + .p-dialog-title { + font-family: var(--guardian-font-family); + font-size: 24px; + font-style: normal; + font-weight: 600; + } + + .p-dialog { + box-shadow: none; + } + + .p-dialog-header { + border-top-left-radius: 16px !important; + border-top-right-radius: 16px !important; + } + + .dialog-header { + height: 88px; + display: flex; + width: 100%; + position: relative; + padding: 32px 0 24px 0; + color: var(--guardian-header-color); + + .header-container { + width: 100%; + position: relative; + flex: 1; + display: flex; + flex-direction: row; + + .header-text { + font-family: var(--guardian-font-family); + font-size: var(--guardian-header-5-font-size); + font-style: var(--guardian-font-style); + font-weight: 600; + line-height: 32px; + height: 32px; + } + } + + .header-icon { + width: 32px; + min-width: 32px; + max-width: 32px; + position: relative; + flex: 32px; + padding: 4px; + border-radius: 100%; + cursor: pointer; + color: var(--guardian-close-color); + background-color: var(--guardian-secondary-color); + + &:hover { + filter: brightness(0.95); + } + } + } + + .dialog-body { + overflow-y: auto; + } + + .dialog-footer { + border-top: 1px solid var(--guardian-border-color); + padding-top: 20px; + + .action-buttons { + display: flex; + } + + .dialog-button, + .cancel-button { + margin-left: auto; + margin-right: 0px; + + button { + width: 100px; + height: 40px; + font-size: var(--guardian-primary-font-size); + font-weight: 500; + } + } + + .ok-button { + margin-left: 15px; + + button { + width: auto; + height: 40px; + font-size: var(--guardian-primary-font-size); + font-weight: 500; + } + } + } + } + + .progress-bar { + background-color: var(--guardian-disabled-background); + border-radius: 8px; + margin: 1px; + overflow: hidden; + position: relative; + + .progress-bar-value { + background-color: var(--guardian-primary-color); + font-size: 12px; + font-style: normal; + display: flex; + justify-content: center; + height: inherit; + overflow: hidden; + width: 0%; + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; + transition: width 1s ease-in-out; + + &::before { + content: ""; + background: linear-gradient(135deg, + transparent 25%, + rgba(255, 255, 255, 0.5) 50%, + rgba(255, 255, 255, 0.5) 50%, + transparent 75%); + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + transform: translate(-100%, 0px); + animation-duration: 1.5s; + animation-fill-mode: forwards; + animation-iteration-count: infinite; + animation-name: progress-bar-animation; + animation-timing-function: linear; + } + } + + &.static-bar { + .progress-bar-value { + &::before { + display: none; + } + } + } + + @keyframes progress-bar-animation { + 0% { + transform: translate(-100%, 0px); + } + + 100% { + transform: translate(100%, 0px); + } + } + } + + .dialog-grid-container { + display: flex; + flex-direction: column; + width: 100%; + overflow: auto; + + .col-text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .col-button { + padding: 12px 6px !important; + } + + .col-auto { + width: 100%; + } + + .col-44 { + width: 44px; + min-width: 44px; + max-width: 44px; + } + + .col-64 { + width: 64px; + min-width: 64px; + max-width: 64px; + } + + .col-80 { + width: 80px; + min-width: 80px; + max-width: 80px; + } + + .col-100 { + width: 100px; + min-width: 100px; + max-width: 100px; + } + + .col-120 { + width: 120px; + min-width: 120px; + max-width: 120px; + } + + .col-135 { + width: 135px; + min-width: 135px; + max-width: 135px; + } + + .col-140 { + width: 140px; + min-width: 140px; + max-width: 140px; + } + + .col-150 { + width: 150px; + min-width: 150px; + max-width: 150px; + } + + .col-160 { + width: 160px; + min-width: 160px; + max-width: 160px; + } + + .col-180 { + width: 180px; + min-width: 180px; + max-width: 180px; + } + + .col-200 { + width: 200px; + min-width: 200px; + max-width: 200px; + } + + .col-250 { + width: 250px; + min-width: 250px; + max-width: 250px; + } + + .dialog-grid-header { + display: flex; + flex-direction: row; + width: 100%; + height: 46px; + min-height: 46px; + max-height: 46px; + padding: 0px 12px; + color: var(--guardian-grid-color); + + &>div { + font-size: var(--guardian-small-font-size); + text-transform: uppercase; + padding: 12px 8px; + } + } + + .dialog-grid-body { + display: flex; + flex-direction: column; + width: 100%; + border: 1px solid var(--guardian-border-color); + border-radius: 6px; + + .dialog-grid-row { + display: flex; + flex-direction: row; + width: 100%; + height: 64px; + min-height: 64px; + max-height: 64px; + border-bottom: 1px solid var(--guardian-border-color); + cursor: default; + padding: 0px 12px; + font-size: var(--guardian-primary-font-size); + color: var(--guardian-font-color); + + &>div { + padding: 22px 10px; + display: flex; + align-items: center; + } + + &[expand="true"] { + border-bottom-color: transparent; + + .expand-icon { + transform: rotate(90deg); + } + } + } + + .dialog-grid-expand-row { + width: 100%; + border-bottom: 1px solid var(--guardian-border-color); + padding: 0px 12px; + display: none; + + &[expand="true"] { + display: flex; + } + } + } + } +} \ No newline at end of file diff --git a/frontend/src/app/views/admin/logs-view/logs-view.component.html b/frontend/src/app/views/admin/logs-view/logs-view.component.html index f911980b7d..5e40803984 100644 --- a/frontend/src/app/views/admin/logs-view/logs-view.component.html +++ b/frontend/src/app/views/admin/logs-view/logs-view.component.html @@ -2,7 +2,9 @@ + +
@@ -17,7 +19,7 @@

Logs

-
+
Logs selectionMode="range">
-
+
+
+
+ +
+
diff --git a/frontend/src/app/views/admin/logs-view/logs-view.component.ts b/frontend/src/app/views/admin/logs-view/logs-view.component.ts index e1a7118651..cceac9440a 100644 --- a/frontend/src/app/views/admin/logs-view/logs-view.component.ts +++ b/frontend/src/app/views/admin/logs-view/logs-view.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, OnDestroy, OnInit, ViewChild } from '@angular/core'; +import { Component, ElementRef, EventEmitter, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { FormBuilder, FormControl } from '@angular/forms'; import { MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete'; import { MatChipInputEvent } from '@angular/material/chips'; @@ -11,6 +11,7 @@ import { LoggerService } from 'src/app/services/logger.service'; import { DetailsLogDialog } from '../details-log-dialog/details-log-dialog.component'; import { ActivatedRoute } from '@angular/router'; import { DialogService } from 'primeng/dynamicdialog'; +import { WebSocketService } from '../../../services/web-socket.service'; /** * Page for creating, editing, importing and exporting schemas. @@ -22,6 +23,7 @@ import { DialogService } from 'primeng/dynamicdialog'; }) export class LogsViewComponent implements OnInit, OnDestroy { @ViewChild('searchInput') searchInput: any; + @ViewChild('seqButton', { static: false }) seqButton: ElementRef; loading: boolean = true; logs: ILog[] = []; @@ -62,6 +64,7 @@ export class LogsViewComponent implements OnInit, OnDestroy { dateRange: any; private subscriptions = new Subscription(); + public seqUrl: string | null get currentDate() { return new Date(); @@ -72,6 +75,7 @@ export class LogsViewComponent implements OnInit, OnDestroy { private logService: LoggerService, public dialog: DialogService, private route: ActivatedRoute, + private wsService: WebSocketService ) { } @@ -132,6 +136,20 @@ export class LogsViewComponent implements OnInit, OnDestroy { } ngAfterViewInit() { + this.subscriptions.add( + this.wsService.getServiceStateObservable('LOGGER_SERVICE').subscribe((isReady) => { + if (isReady) { + this.initializeLogs(); + } + }) + ); + + this.logService.getUrlSeq().subscribe((data: { seq_url: string | null }) => { + this.seqUrl = data.seq_url; + }); + } + + initializeLogs() { this.subscriptions.add(merge(this.onSearch) .pipe( startWith({}), @@ -293,4 +311,11 @@ export class LogsViewComponent implements OnInit, OnDestroy { } this.onApply(); } + + onSeq(): void { + if (this.seqUrl) { + window.open(this.seqUrl, '_blank'); + } + this.seqButton.nativeElement.blur() + } } diff --git a/frontend/src/app/views/schemas/schemas.component.html b/frontend/src/app/views/schemas/schemas.component.html index a2c3f4e057..6e9201f16e 100644 --- a/frontend/src/app/views/schemas/schemas.component.html +++ b/frontend/src/app/views/schemas/schemas.component.html @@ -19,7 +19,7 @@ Incomplete
+
+ Demo +
{{schema.status}}
@@ -515,7 +518,7 @@ Copy - diff --git a/frontend/src/app/views/schemas/schemas.component.scss b/frontend/src/app/views/schemas/schemas.component.scss index ceee5c3baa..c7d980b50e 100644 --- a/frontend/src/app/views/schemas/schemas.component.scss +++ b/frontend/src/app/views/schemas/schemas.component.scss @@ -185,6 +185,11 @@ a { color: var(--color-accent-red-1) !important; } +.status-DEMO { + background: var(--color-grey-2, #EFF3F7) !important; + color: var(--color-grey-5, #848FA9) !important; +} + .btn-approve { background: var(--color-primary); border-radius: 6px; diff --git a/frontend/src/app/views/schemas/schemas.component.ts b/frontend/src/app/views/schemas/schemas.component.ts index efd499d570..cf00c7c2dd 100644 --- a/frontend/src/app/views/schemas/schemas.component.ts +++ b/frontend/src/app/views/schemas/schemas.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { HttpResponse } from '@angular/common/http'; import { ActivatedRoute, Router } from '@angular/router'; -import { ISchema, IUser, Schema, SchemaCategory, SchemaHelper, TagType, UserPermissions } from '@guardian/interfaces'; +import { ISchema, IUser, Schema, SchemaCategory, SchemaHelper, SchemaStatus, TagType, UserPermissions } from '@guardian/interfaces'; import { forkJoin, Observable } from 'rxjs'; //services import { ProfileService } from '../../services/profile.service'; @@ -108,6 +108,7 @@ export class SchemaConfigComponent implements OnInit { public tagSchemas: Schema[] = []; public tagEntity = TagType.Schema; public policies: any[] = []; + public allPolicies: any[] = []; public modules: any[] = []; public tools: any[] = []; public draftTools: any[] = []; @@ -248,7 +249,8 @@ export class SchemaConfigComponent implements OnInit { ( this.ifDraft(element) || !this.readonly - ) + ) && + element.status !== SchemaStatus.DEMO ); } } @@ -265,7 +267,8 @@ export class SchemaConfigComponent implements OnInit { return ( this.isConfirmed && this.user.SCHEMAS_SCHEMA_DELETE && - this.ifDraft(element) + this.ifDraft(element) && + element.status !== SchemaStatus.DEMO ); } } @@ -274,7 +277,8 @@ export class SchemaConfigComponent implements OnInit { return ( this.isConfirmed && this.user.SCHEMAS_SCHEMA_CREATE && - this.type === SchemaType.Policy + this.type === SchemaType.Policy && + element.status !== SchemaStatus.DEMO ); } @@ -438,7 +442,7 @@ export class SchemaConfigComponent implements OnInit { const policies: any[] = value[2] || []; this.policyNameByTopic = {}; this.policyIdByTopic = {}; - this.policies = [{ + this.allPolicies = [{ name: 'No binding', topicId: null }]; @@ -446,10 +450,11 @@ export class SchemaConfigComponent implements OnInit { if (policy.topicId) { this.policyIdByTopic[policy.topicId] = policy.id; this.policyNameByTopic[policy.topicId] = policy.name; - this.policies.push(policy); + this.allPolicies.push(policy); this.readonlyByTopic[policy.topicId] = policy.creator !== this.owner; } } + this.policies = this.allPolicies.filter((p) => p.status !== 'DEMO'); const modules: any[] = value[3]?.body || []; this.moduleNameByTopic = {}; diff --git a/frontend/src/app/views/token-config/token-config.component.html b/frontend/src/app/views/token-config/token-config.component.html index 169dbed037..3f141637e4 100644 --- a/frontend/src/app/views/token-config/token-config.component.html +++ b/frontend/src/app/views/token-config/token-config.component.html @@ -20,12 +20,12 @@

List of Tokens

-
@@ -54,30 +54,30 @@

List of Tokens

- - - Token Users - Detele Token + Delete Token
Are you sure to delete token? diff --git a/frontend/src/app/views/user-management-detail/user-management-detail.component.ts b/frontend/src/app/views/user-management-detail/user-management-detail.component.ts index 1997552cbe..87293654c5 100644 --- a/frontend/src/app/views/user-management-detail/user-management-detail.component.ts +++ b/frontend/src/app/views/user-management-detail/user-management-detail.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { PermissionsService } from '../../services/permissions.service'; import { ProfileService } from '../../services/profile.service'; -import { UserPermissions } from '@guardian/interfaces'; +import { PolicyType, UserPermissions } from '@guardian/interfaces'; import { Subscription, forkJoin } from 'rxjs'; import { ActivatedRoute, Router } from '@angular/router'; import { PermissionsGroup } from 'src/app/utils/index'; @@ -39,27 +39,27 @@ export class UsersManagementDetailComponent implements OnInit, OnDestroy { value: 'ALL', }, { name: 'Draft', - value: 'DRAFT', + value: PolicyType.DRAFT, color: 'grey' }, { name: 'Dry Run', - value: 'DRY-RUN', + value: PolicyType.DRY_RUN, color: 'grey' }, { name: 'Publish Error', - value: 'PUBLISH_ERROR', + value: PolicyType.PUBLISH_ERROR, color: 'red' }, { name: 'Discontinued', - value: 'DISCONTINUED', + value: PolicyType.DISCONTINUED, color: 'red' }, { name: 'Published', - value: 'PUBLISH', + value: PolicyType.PUBLISH, color: 'green' }]; public needSave: boolean = false; @@ -346,14 +346,14 @@ export class UsersManagementDetailComponent implements OnInit, OnDestroy { public getColor(status: string, expired: boolean = false) { switch (status) { - case 'DRAFT': + case PolicyType.DRAFT: return 'grey'; - case 'DRY-RUN': + case PolicyType.DRY_RUN: return 'grey'; - case 'DISCONTINUED': - case 'PUBLISH_ERROR': + case PolicyType.DISCONTINUED: + case PolicyType.PUBLISH_ERROR: return 'red'; - case 'PUBLISH': + case PolicyType.PUBLISH: return expired ? 'yellow' : 'green'; default: return 'grey'; @@ -362,15 +362,15 @@ export class UsersManagementDetailComponent implements OnInit, OnDestroy { public getLabelStatus(status: string, expired: boolean = false) { switch (status) { - case 'DRAFT': + case PolicyType.DRAFT: return 'Draft'; - case 'DRY-RUN': + case PolicyType.DRY_RUN: return 'Dry Run'; - case 'PUBLISH_ERROR': + case PolicyType.PUBLISH_ERROR: return 'Publish Error'; - case 'PUBLISH': + case PolicyType.PUBLISH: return `Published${expired ? '*' : ''}`; - case 'DISCONTINUED': + case PolicyType.DISCONTINUED: return `Discontinued`; default: return 'Incorrect status'; diff --git a/frontend/src/assets/images/icons/16/add-test.svg b/frontend/src/assets/images/icons/16/add-test.svg new file mode 100644 index 0000000000..6ca7528dcf --- /dev/null +++ b/frontend/src/assets/images/icons/16/add-test.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/frontend/src/assets/images/icons/16/dry-run.svg b/frontend/src/assets/images/icons/16/dry-run.svg new file mode 100644 index 0000000000..c67e11a2ec --- /dev/null +++ b/frontend/src/assets/images/icons/16/dry-run.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/assets/images/icons/16/re-run.svg b/frontend/src/assets/images/icons/16/re-run.svg new file mode 100644 index 0000000000..b26ff82df2 --- /dev/null +++ b/frontend/src/assets/images/icons/16/re-run.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/frontend/src/assets/images/icons/16/refresh.svg b/frontend/src/assets/images/icons/16/refresh.svg new file mode 100644 index 0000000000..2e66973c0a --- /dev/null +++ b/frontend/src/assets/images/icons/16/refresh.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/src/assets/images/icons/16/run-test.svg b/frontend/src/assets/images/icons/16/run-test.svg new file mode 100644 index 0000000000..d3a5563d27 --- /dev/null +++ b/frontend/src/assets/images/icons/16/run-test.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/frontend/src/assets/images/icons/16/run.svg b/frontend/src/assets/images/icons/16/run.svg new file mode 100644 index 0000000000..ed6e739037 --- /dev/null +++ b/frontend/src/assets/images/icons/16/run.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/frontend/src/assets/images/icons/16/test.svg b/frontend/src/assets/images/icons/16/test.svg new file mode 100644 index 0000000000..7ec5bcf3f8 --- /dev/null +++ b/frontend/src/assets/images/icons/16/test.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/assets/images/icons/add-test.svg b/frontend/src/assets/images/icons/add-test.svg new file mode 100644 index 0000000000..dc62995b39 --- /dev/null +++ b/frontend/src/assets/images/icons/add-test.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/frontend/src/assets/images/icons/check-fill.svg b/frontend/src/assets/images/icons/check-fill.svg new file mode 100644 index 0000000000..4164082c8f --- /dev/null +++ b/frontend/src/assets/images/icons/check-fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/close-2.svg b/frontend/src/assets/images/icons/close-2.svg new file mode 100644 index 0000000000..82318d80c0 --- /dev/null +++ b/frontend/src/assets/images/icons/close-2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/assets/images/icons/close-fill.svg b/frontend/src/assets/images/icons/close-fill.svg new file mode 100644 index 0000000000..ef8d35c787 --- /dev/null +++ b/frontend/src/assets/images/icons/close-fill.svg @@ -0,0 +1,4 @@ + + + diff --git a/frontend/src/assets/images/icons/export-data.svg b/frontend/src/assets/images/icons/export-data.svg new file mode 100644 index 0000000000..08594498e1 --- /dev/null +++ b/frontend/src/assets/images/icons/export-data.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/export-file.svg b/frontend/src/assets/images/icons/export-file.svg new file mode 100644 index 0000000000..fe7254049e --- /dev/null +++ b/frontend/src/assets/images/icons/export-file.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/export-key.svg b/frontend/src/assets/images/icons/export-key.svg new file mode 100644 index 0000000000..6af234ae0d --- /dev/null +++ b/frontend/src/assets/images/icons/export-key.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/export-xls.svg b/frontend/src/assets/images/icons/export-xls.svg new file mode 100644 index 0000000000..c29a801be8 --- /dev/null +++ b/frontend/src/assets/images/icons/export-xls.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/import-cloud-2.svg b/frontend/src/assets/images/icons/import-cloud-2.svg new file mode 100644 index 0000000000..6731d559b9 --- /dev/null +++ b/frontend/src/assets/images/icons/import-cloud-2.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/import-cloud.svg b/frontend/src/assets/images/icons/import-cloud.svg new file mode 100644 index 0000000000..a0e547a60b --- /dev/null +++ b/frontend/src/assets/images/icons/import-cloud.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/import-data.svg b/frontend/src/assets/images/icons/import-data.svg new file mode 100644 index 0000000000..780fb3ed4b --- /dev/null +++ b/frontend/src/assets/images/icons/import-data.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/import-file.svg b/frontend/src/assets/images/icons/import-file.svg new file mode 100644 index 0000000000..df27a5752b --- /dev/null +++ b/frontend/src/assets/images/icons/import-file.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/import-key.svg b/frontend/src/assets/images/icons/import-key.svg new file mode 100644 index 0000000000..46a6645ff9 --- /dev/null +++ b/frontend/src/assets/images/icons/import-key.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/import-xls.svg b/frontend/src/assets/images/icons/import-xls.svg new file mode 100644 index 0000000000..ab758349ab --- /dev/null +++ b/frontend/src/assets/images/icons/import-xls.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/assets/images/icons/run-test.svg b/frontend/src/assets/images/icons/run-test.svg new file mode 100644 index 0000000000..30557c95a0 --- /dev/null +++ b/frontend/src/assets/images/icons/run-test.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/frontend/src/assets/images/icons/skip-fill.svg b/frontend/src/assets/images/icons/skip-fill.svg new file mode 100644 index 0000000000..fe5f4578b3 --- /dev/null +++ b/frontend/src/assets/images/icons/skip-fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/images/icons/skip.svg b/frontend/src/assets/images/icons/skip.svg new file mode 100644 index 0000000000..e56ca1c3ad --- /dev/null +++ b/frontend/src/assets/images/icons/skip.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/index.html b/frontend/src/index.html index 0c40f9a69c..630e8e4bd8 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -1,35 +1,23 @@ + - + Guardian - - - - - - - - - - + + + + + + + + + + + - + - + + \ No newline at end of file diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 10685da76e..d29922803b 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -615,3 +615,9 @@ svg-icon.svg-icon-32 { #ngx-colors-overlay .circle.button { padding: unset; } + +.p-datatable-scrollable .p-frozen-column { + position: sticky; + background: inherit; + z-index: 1; +} \ No newline at end of file diff --git a/frontend/src/variables.scss b/frontend/src/variables.scss index 050ddd03df..48a79607de 100644 --- a/frontend/src/variables.scss +++ b/frontend/src/variables.scss @@ -1,61 +1,62 @@ :root { - --font-family-poppins: 'Poppins', sans-serif; - --font-family-inter: 'Inter', sans-serif; + --font-family-poppins: 'Poppins', sans-serif; + --font-family-inter: 'Inter', sans-serif; - --color-background: #F9FAFC; - --color-primary: #5252ff; - --color-secondary: #CDDDFD; + --color-background: #F9FAFC; + --color-primary: #4169E2; + --color-secondary: #CDDDFD; - --color-grey-black-1: #181818; - --color-grey-black-2: #23252E; - --color-grey-1: #F9FAFC; - --color-grey-2: #EFF3F7; - --color-grey-3: #E1E7EF; - --color-grey-4: #B0B5BA; - --color-grey-5: #848FA9; - --color-grey-white: #FFFFFF; + --color-grey-black-1: #181818; + --color-grey-black-2: #23252E; + --color-grey-1: #F9FAFC; + --color-grey-2: #EFF3F7; + --color-grey-3: #E1E7EF; + --color-grey-4: #B0B5BA; + --color-grey-5: #848FA9; + --color-grey-white: #FFFFFF; - --color-accent-red-1: #FF432A; - --color-accent-red-2: #F5D7D7; + --color-accent-red-1: #FF432A; + --color-accent-red-2: #F5D7D7; - --color-accent-green-1: #19BE47; - --color-accent-green-2: #CAFDD9; + --color-accent-green-1: #19BE47; + --color-accent-green-2: #CAFDD9; - --color-accent-yellow-1: #DA9B22; - --color-accent-yellow-2: #FFF2D8; + --color-accent-yellow-1: #DA9B22; + --color-accent-yellow-2: #FFF2D8; + --pc-wizard-color: #9c27b0; - --linear-gradient: linear-gradient(174deg, var(--color-primary) 4.61%, rgba(6, 129, 238, 0.43) 128.14%), #FFF; + --linear-gradient: linear-gradient(174deg, var(--color-primary) 4.61%, rgba(6, 129, 238, 0.43) 128.14%), #FFF; - --container-margin: 56px 48px 56px 48px; + --container-margin: 56px 48px 56px 48px; - /*** TODO - remove vars below after implement new design of UI ***/ + /*** TODO - remove vars below after implement new design of UI ***/ --app-font-family: 'Lato', sans-serif; - --primary-color: #2C78F6; + --primary-color: #4169E2; --text-color: #000; - --header-width-expand: 280px; - --header-width-collapse: 80px; - --header-color-primary: #0681EE; - --header-preloader-color: #FFF; - --header-color-primary-dark: rgba(0, 0, 0, 1); - --header-color-shadow: rgba(76, 0, 161, 0.24); + --header-width-expand: 280px; + --header-width-collapse: 80px; + --header-color-primary: #0681EE; + --header-preloader-color: #FFF; + --header-color-primary-dark: rgba(0, 0, 0, 1); + --header-color-shadow: rgba(76, 0, 161, 0.24); - --header-height: 0px; + --header-height: 0px; --header-height-policy: 175px; - --header-background-color:#000; + --header-background-color: #000; --table-row-height: 64px; - --button-primary-color: #2C78F6; - --button-primary-color-hover: #0C6BE5; + --button-primary-color: #4169E2; + --button-primary-color-hover: #476ff1; - --vh: 1vh; + --vh: 1vh; } @media (max-width: 810px) { :root { - --header-height: 0px; + --header-height: 0px; } -} +} \ No newline at end of file diff --git a/guardian-service/configs/.env.guardian b/guardian-service/configs/.env.guardian index a320f58ecc..51d04ac206 100644 --- a/guardian-service/configs/.env.guardian +++ b/guardian-service/configs/.env.guardian @@ -59,3 +59,19 @@ HASHICORP_TOKEN="1234" HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" HASHICORP_ENCRIPTION_ALG="sha512" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/guardian-service/configs/.env.guardian.develop b/guardian-service/configs/.env.guardian.develop index c3d57cd4b2..d9f96d1833 100644 --- a/guardian-service/configs/.env.guardian.develop +++ b/guardian-service/configs/.env.guardian.develop @@ -58,3 +58,19 @@ HASHICORP_TOKEN="1234" HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" HASHICORP_ENCRIPTION_ALG="sha512" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/guardian-service/configs/.env.guardian.template b/guardian-service/configs/.env.guardian.template index db6d02ca04..fd1f506b6c 100644 --- a/guardian-service/configs/.env.guardian.template +++ b/guardian-service/configs/.env.guardian.template @@ -67,3 +67,19 @@ VAULT_PROVIDER="database" HASHICORP_TOKEN="1234" HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" diff --git a/guardian-service/environments/environment.prod.ts b/guardian-service/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/guardian-service/environments/environment.prod.ts +++ b/guardian-service/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/guardian-service/package.json b/guardian-service/package.json index 1b06cf4068..ecc5fd9642 100644 --- a/guardian-service/package.json +++ b/guardian-service/package.json @@ -16,8 +16,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@hashgraph/sdk": "2.46.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "^2.0.2", @@ -99,5 +99,5 @@ "test:stability": "mocha tests/stability.test.mjs" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/guardian-service/src/api/analytics.service.ts b/guardian-service/src/api/analytics.service.ts index be4d2b04b9..34481ff5b7 100644 --- a/guardian-service/src/api/analytics.service.ts +++ b/guardian-service/src/api/analytics.service.ts @@ -25,13 +25,13 @@ import { DataBaseHelper, DatabaseServer, IAuthUser, - Logger, MessageError, MessageResponse, Policy, VpDocument as VpDocumentCollection, VcDocument as VcDocumentCollection, Workers, + PinoLogger } from '@guardian/common'; import { ApiResponse } from '../api/helpers/api-response.js'; import { IOwner, MessageAPI, PolicyType, UserRole, WorkerTaskType } from '@guardian/interfaces'; @@ -210,7 +210,7 @@ export class AnalyticsController { * API analytics * @constructor */ -export async function analyticsAPI(): Promise { +export async function analyticsAPI(logger: PinoLogger): Promise { ApiResponse(MessageAPI.COMPARE_POLICIES, async (msg: { user: IOwner, @@ -246,7 +246,7 @@ export async function analyticsAPI(): Promise { const result = comparator.to(results, type); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -306,7 +306,7 @@ export async function analyticsAPI(): Promise { return new MessageResponse(result); } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -359,7 +359,7 @@ export async function analyticsAPI(): Promise { return new MessageResponse(result); } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -446,7 +446,7 @@ export async function analyticsAPI(): Promise { } return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -517,7 +517,7 @@ export async function analyticsAPI(): Promise { return new MessageError('Invalid size'); } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -591,7 +591,7 @@ export async function analyticsAPI(): Promise { return new MessageResponse(comparisonVpArray); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -657,7 +657,7 @@ export async function analyticsAPI(): Promise { return new MessageError('Invalid size'); } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -683,7 +683,7 @@ export async function analyticsAPI(): Promise { const model = new PolicySearchModel(row); policyModels.push(model); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); } } @@ -709,7 +709,7 @@ export async function analyticsAPI(): Promise { result.sort((a, b) => a.hash > b.hash ? -1 : 1); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/artifact.service.ts b/guardian-service/src/api/artifact.service.ts index 58b02975fd..10a41a0f66 100644 --- a/guardian-service/src/api/artifact.service.ts +++ b/guardian-service/src/api/artifact.service.ts @@ -1,5 +1,5 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { DatabaseServer, getArtifactExtention, getArtifactType, Logger, MessageError, MessageResponse, } from '@guardian/common'; +import { DatabaseServer, getArtifactExtention, getArtifactType, MessageError, MessageResponse, PinoLogger } from '@guardian/common'; import { IOwner, MessageAPI, ModuleStatus, PolicyType } from '@guardian/interfaces'; export async function getParent(parentId: string) { @@ -26,7 +26,7 @@ export async function getParent(parentId: string) { /** * Connect to the message broker methods of working with artifacts. */ -export async function artifactAPI(): Promise { +export async function artifactAPI(logger: PinoLogger): Promise { /** * Upload artifact * @@ -66,10 +66,10 @@ export async function artifactAPI(): Promise { } } - const extention = getArtifactExtention(artifact.originalname); + const extention = getArtifactExtention(artifact.filename); const type = getArtifactType(extention); const row = await DatabaseServer.saveArtifact({ - name: artifact.originalname.split('.')[0], + name: artifact.filename.split('.')[0], extention, type, policyId: parentId, @@ -79,7 +79,7 @@ export async function artifactAPI(): Promise { await DatabaseServer.saveArtifactFile(row.uuid, Buffer.from(msg.artifact.buffer)); return new MessageResponse(row); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error.message); } }); @@ -154,7 +154,7 @@ export async function artifactAPI(): Promise { count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -231,7 +231,7 @@ export async function artifactAPI(): Promise { count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -277,7 +277,7 @@ export async function artifactAPI(): Promise { await DatabaseServer.removeArtifact(artifactToDelete); return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/assigned-entity.service.ts b/guardian-service/src/api/assigned-entity.service.ts index b935b8c028..530e8b6006 100644 --- a/guardian-service/src/api/assigned-entity.service.ts +++ b/guardian-service/src/api/assigned-entity.service.ts @@ -1,9 +1,9 @@ import { ApiResponse } from './helpers/api-response.js'; import { DatabaseServer, - Logger, MessageError, MessageResponse, + PinoLogger, } from '@guardian/common'; import { AssignedEntityType, MessageAPI } from '@guardian/interfaces'; @@ -37,7 +37,7 @@ export async function getTarget( /** * Connect to the message broker methods of working with assigned entity. */ -export async function AssignedEntityAPI(): Promise { +export async function AssignedEntityAPI(logger: PinoLogger): Promise { /** * Assign entity * @@ -57,7 +57,7 @@ export async function AssignedEntityAPI(): Promise { const { type, entityIds, assign, did, owner } = msg; for (const entityId of entityIds) { const target = await getTarget(type, entityId); - if (!target && target.owner !== owner) { + if (!target || target.owner !== owner) { throw new Error('Entity not found'); } if (assign) { @@ -71,7 +71,7 @@ export async function AssignedEntityAPI(): Promise { } return new MessageResponse(assign); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -105,7 +105,7 @@ export async function AssignedEntityAPI(): Promise { return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -127,7 +127,7 @@ export async function AssignedEntityAPI(): Promise { const items = await DatabaseServer.getAssignedEntities(did, type); return new MessageResponse(items); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -169,7 +169,7 @@ export async function AssignedEntityAPI(): Promise { } return new MessageResponse(assign); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/branding.service.ts b/guardian-service/src/api/branding.service.ts index fe845b2c1e..2bd891c939 100644 --- a/guardian-service/src/api/branding.service.ts +++ b/guardian-service/src/api/branding.service.ts @@ -37,11 +37,19 @@ export async function brandingAPI( const brandingJSON: Branding[] = await brandingRepository.findAll(); let newBrandingJSON: Branding[]; if (!brandingJSON.length) { - const initialBranding = JSON.stringify({'headerColor': '#000', 'primaryColor': '#2C78F6', 'companyName': 'Guardian', 'companyLogoUrl': '', 'loginBannerUrl': 'bg.jpg', 'faviconUrl': 'favicon.ico', termsAndConditions}); - await brandingRepository.save({config: initialBranding}); + const initialBranding = JSON.stringify({ + 'headerColor': '#000', + 'primaryColor': '#4169E2', + 'companyName': 'Guardian', + 'companyLogoUrl': '', + 'loginBannerUrl': 'bg.jpg', + 'faviconUrl': 'favicon.ico', + termsAndConditions + }); + await brandingRepository.save({ config: initialBranding }); newBrandingJSON = await brandingRepository.findAll(); } - return new MessageResponse(brandingJSON.length ? brandingJSON[brandingJSON.length - 1] : newBrandingJSON[newBrandingJSON.length-1]); + return new MessageResponse(brandingJSON.length ? brandingJSON[brandingJSON.length - 1] : newBrandingJSON[newBrandingJSON.length - 1]); }); /** @@ -52,7 +60,7 @@ export async function brandingAPI( * @returns {Branding} - new branding object */ ApiResponse(MessageAPI.STORE_BRANDING, async (config) => { - const branding: any = await brandingRepository.save(config); - return new MessageResponse(branding); + const branding: any = await brandingRepository.save(config); + return new MessageResponse(branding); }); } diff --git a/guardian-service/src/api/config.service.ts b/guardian-service/src/api/config.service.ts index 0d048d2e15..ef5f4b823e 100644 --- a/guardian-service/src/api/config.service.ts +++ b/guardian-service/src/api/config.service.ts @@ -1,5 +1,5 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { DataBaseHelper, Environment, Logger, MessageError, MessageResponse, SecretManager, Settings, Topic, ValidateConfiguration, Workers } from '@guardian/common'; +import { DataBaseHelper, Environment, MessageError, MessageResponse, PinoLogger, SecretManager, Settings, Topic, ValidateConfiguration, Workers } from '@guardian/common'; import { CommonSettings, MessageAPI } from '@guardian/interfaces'; import { AccountId, PrivateKey } from '@hashgraph/sdk'; @@ -9,6 +9,7 @@ import { AccountId, PrivateKey } from '@hashgraph/sdk'; export async function configAPI( settingsRepository: DataBaseHelper, topicRepository: DataBaseHelper, + logger: PinoLogger, ): Promise { ApiResponse(MessageAPI.GET_TOPIC, async (msg) => { @@ -26,13 +27,13 @@ export async function configAPI( try { AccountId.fromString(settings.operatorId); } catch (error) { - await new Logger().error('OPERATOR_ID: ' + error.message, ['GUARDIAN_SERVICE']); + await logger.error('OPERATOR_ID: ' + error.message, ['GUARDIAN_SERVICE']); throw new Error('OPERATOR_ID: ' + error.message); } try { PrivateKey.fromString(settings.operatorKey); } catch (error) { - await new Logger().error('OPERATOR_KEY: ' + error.message, ['GUARDIAN_SERVICE']); + await logger.error('OPERATOR_KEY: ' + error.message, ['GUARDIAN_SERVICE']); throw new Error('OPERATOR_KEY: ' + error.message); } @@ -48,7 +49,7 @@ export async function configAPI( return new MessageResponse(null); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -69,7 +70,7 @@ export async function configAPI( }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/contract.service.ts b/guardian-service/src/api/contract.service.ts index e9ca21ece0..7d4c8d0c53 100644 --- a/guardian-service/src/api/contract.service.ts +++ b/guardian-service/src/api/contract.service.ts @@ -5,12 +5,12 @@ import { DataBaseHelper, DatabaseServer, KeyType, - Logger, MessageAction, MessageError, MessageResponse, MessageServer, NotificationHelper, + PinoLogger, RetirePool, RetireRequest, Schema as SchemaCollection, @@ -30,7 +30,8 @@ import { ContractAPI, ContractParamType, ContractType, EntityOwner, IOwner, Reti import { AccountId, TokenId } from '@hashgraph/sdk'; import { proto } from '@hashgraph/proto'; import * as ethers from 'ethers'; -import { contractCall, contractQuery, createContract, customContractCall, publishSystemSchema, } from './helpers/index.js'; +import { contractCall, contractQuery, createContract, customContractCall, publishSystemSchema } from './helpers/index.js'; +import { emptyNotifier } from '../helpers/notifier.js'; const retireAbi = new ethers.Interface([ 'function retire(tuple(address, int64, int64[])[])', @@ -958,7 +959,8 @@ async function saveRetireVC( schema, owner, messageServer, - MessageAction.PublishSystemSchema + MessageAction.PublishSystemSchema, + emptyNotifier() ); await new DataBaseHelper(SchemaCollection).save(item); } @@ -1009,7 +1011,8 @@ export async function contractAPI( wipeRequestRepository: DataBaseHelper, retirePoolRepository: DataBaseHelper, retireRequestRepository: DataBaseHelper, - vcRepostitory: DataBaseHelper + vcRepostitory: DataBaseHelper, + logger: PinoLogger, ): Promise { ApiResponse(ContractAPI.GET_CONTRACTS, async (msg: { owner: IOwner, @@ -1053,7 +1056,7 @@ export async function contractAPI( ) ); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1128,12 +1131,17 @@ export async function contractAPI( rootKey, signOptions ); - await messageServer + const contractMessageResult = await messageServer .setTopicObject(topic) .sendMessage(contractMessage); + const userTopic = await TopicConfig.fromObject( + await DatabaseServer.getTopicByType(owner.creator, TopicType.UserTopic), + true + ); + await topicHelper.twoWayLink(topic, userTopic, contractMessageResult.getId()); return new MessageResponse(contract); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1259,7 +1267,7 @@ export async function contractAPI( return new MessageResponse(contract); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1315,7 +1323,7 @@ export async function contractAPI( ); return new MessageResponse(permissions); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1362,7 +1370,7 @@ export async function contractAPI( } return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1415,7 +1423,7 @@ export async function contractAPI( ) ); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1465,7 +1473,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1515,7 +1523,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1582,7 +1590,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1648,7 +1656,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1702,7 +1710,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1766,7 +1774,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1830,7 +1838,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1894,7 +1902,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1958,7 +1966,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2022,7 +2030,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2086,7 +2094,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2183,7 +2191,7 @@ export async function contractAPI( return new MessageResponse(syncDate); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2242,7 +2250,7 @@ export async function contractAPI( } return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2313,7 +2321,7 @@ export async function contractAPI( await retirePoolRepository.findAndCount(filters, otherOptions) ); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2387,7 +2395,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2461,7 +2469,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2525,7 +2533,7 @@ export async function contractAPI( ) ); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2585,7 +2593,7 @@ export async function contractAPI( return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2650,7 +2658,7 @@ export async function contractAPI( return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2723,7 +2731,7 @@ export async function contractAPI( ]) ); - const srUser = EntityOwner.sr(sr.did); + const srUser = EntityOwner.sr(sr.id, sr.did); if (pool.immediately) { await saveRetireVC( contractRepository, @@ -2748,7 +2756,7 @@ export async function contractAPI( return new MessageResponse(pool.immediately); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2824,7 +2832,7 @@ export async function contractAPI( return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2884,7 +2892,7 @@ export async function contractAPI( return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -2948,7 +2956,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -3012,7 +3020,7 @@ export async function contractAPI( return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -3061,7 +3069,7 @@ export async function contractAPI( await vcRepostitory.findAndCount(filters, otherOptions) ); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/demo.service.ts b/guardian-service/src/api/demo.service.ts index 9c1c71bc78..02ed39dcd3 100644 --- a/guardian-service/src/api/demo.service.ts +++ b/guardian-service/src/api/demo.service.ts @@ -1,5 +1,5 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { DataBaseHelper, DatabaseServer, Logger, MessageError, MessageResponse, Policy, RunFunctionAsync, SecretManager, Settings, Workers } from '@guardian/common'; +import { DataBaseHelper, DatabaseServer, MessageError, MessageResponse, PinoLogger, Policy, RunFunctionAsync, SecretManager, Settings, Workers } from '@guardian/common'; import { MessageAPI, WorkerTaskType } from '@guardian/interfaces'; import { emptyNotifier, initNotifier, INotifier } from '../helpers/notifier.js'; @@ -59,9 +59,11 @@ async function generateDemoKey(role: any, settingsRepository: DataBaseHelper + settingsRepository: DataBaseHelper, + logger: PinoLogger ): Promise { ApiResponse(MessageAPI.GENERATE_DEMO_KEY, async (msg: { role: string, userId: string }) => { @@ -71,7 +73,7 @@ export async function demoAPI( const result = await generateDemoKey(role, settingsRepository, emptyNotifier(), userId); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -85,7 +87,7 @@ export async function demoAPI( const result = await generateDemoKey(role, settingsRepository, notifier, userId); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -111,7 +113,7 @@ export async function demoAPI( }; return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }) diff --git a/guardian-service/src/api/helpers/artifact-import-export-helper.ts b/guardian-service/src/api/helpers/artifact-import-export-helper.ts index 281502199b..630466599c 100644 --- a/guardian-service/src/api/helpers/artifact-import-export-helper.ts +++ b/guardian-service/src/api/helpers/artifact-import-export-helper.ts @@ -5,7 +5,7 @@ import { INotifier } from '../../helpers/notifier.js'; /** * Import Result */ -interface ImportResult { +export interface ImportArtifactResult { /** * New token uuid */ @@ -30,7 +30,7 @@ export async function importArtifactsByFiles( user: IOwner, artifacts: any[] = [], notifier: INotifier -): Promise { +): Promise { const errors: any[] = []; const artifactsMap = new Map(); diff --git a/guardian-service/src/api/helpers/default-schemas.ts b/guardian-service/src/api/helpers/default-schemas.ts new file mode 100644 index 0000000000..8f3a39d7b9 --- /dev/null +++ b/guardian-service/src/api/helpers/default-schemas.ts @@ -0,0 +1,84 @@ +import { SchemaEntity } from '@guardian/interfaces'; +import path from 'path'; +import { DatabaseServer } from '@guardian/common'; +import fs from 'fs-extra'; + +const { readJSON } = fs; + +/** + * Creation of default schemas. + */ +export async function setDefaultSchema() { + const fileConfig = path.join(process.cwd(), 'system-schemas', 'system-schemas.json'); + let fileContent: any; + try { + fileContent = await readJSON(fileConfig); + } catch (error) { + throw new Error('you need to create a file \'system-schemas.json\''); + } + + const map: any = {}; + for (const schema of fileContent) { + map[schema.entity] = schema; + } + + if (!map.hasOwnProperty(SchemaEntity.MINT_NFTOKEN)) { + throw new Error(`You need to fill ${SchemaEntity.MINT_NFTOKEN} field in system-schemas.json file`); + } + + if (!map.hasOwnProperty(SchemaEntity.MINT_TOKEN)) { + throw new Error(`You need to fill ${SchemaEntity.MINT_TOKEN} field in system-schemas.json file`); + } + + if (!map.hasOwnProperty(SchemaEntity.POLICY)) { + throw new Error(`You need to fill ${SchemaEntity.POLICY} field in system-schemas.json file`); + } + + if (!map.hasOwnProperty(SchemaEntity.STANDARD_REGISTRY)) { + throw new Error(`You need to fill ${SchemaEntity.STANDARD_REGISTRY} field in system-schemas.json file`); + } + + if (!map.hasOwnProperty(SchemaEntity.WIPE_TOKEN)) { + throw new Error(`You need to fill ${SchemaEntity.WIPE_TOKEN} field in system-schemas.json file`); + } + + if (!map.hasOwnProperty(SchemaEntity.ROLE)) { + throw new Error(`You need to fill ${SchemaEntity.ROLE} field in system-schemas.json file`); + } + + if (!map.hasOwnProperty(SchemaEntity.USER_PERMISSIONS)) { + throw new Error(`You need to fill ${SchemaEntity.USER_PERMISSIONS} field in system-schemas.json file`); + } + + const fn = async (schema: any) => { + const existingSchemas = await DatabaseServer.getSchema({ + uuid: schema.uuid, + system: true + }); + if (existingSchemas) { + console.log(`Skip schema: ${schema.uuid}`); + return; + } + schema.owner = null; + schema.creator = null; + schema.readonly = true; + schema.system = true; + schema.active = true; + await DatabaseServer.createAndSaveSchema(schema); + console.log(`Created schema: ${schema.uuid}`); + }; + + await fn(map[SchemaEntity.MINT_NFTOKEN]); + await fn(map[SchemaEntity.MINT_TOKEN]); + await fn(map[SchemaEntity.RETIRE_TOKEN]); + await fn(map[SchemaEntity.POLICY]); + await fn(map[SchemaEntity.STANDARD_REGISTRY]); + await fn(map[SchemaEntity.WIPE_TOKEN]); + await fn(map[SchemaEntity.ISSUER]); + await fn(map[SchemaEntity.USER_ROLE]); + await fn(map[SchemaEntity.CHUNK]); + await fn(map[SchemaEntity.ACTIVITY_IMPACT]); + await fn(map[SchemaEntity.TOKEN_DATA_SOURCE]); + await fn(map[SchemaEntity.ROLE]); + await fn(map[SchemaEntity.USER_PERMISSIONS]); +} diff --git a/guardian-service/src/api/helpers/schema-helper.ts b/guardian-service/src/api/helpers/schema-helper.ts index 6158686550..b29b7c7bb3 100644 --- a/guardian-service/src/api/helpers/schema-helper.ts +++ b/guardian-service/src/api/helpers/schema-helper.ts @@ -1,162 +1,8 @@ -import { GenerateUUIDv4, IOwner, IRootConfig, ISchema, ModuleStatus, Schema, SchemaCategory, SchemaEntity, SchemaHelper, SchemaStatus, TopicType } from '@guardian/interfaces'; -import path from 'path'; -import fs from 'fs-extra'; - +import { GenerateUUIDv4, IOwner, IRootConfig, ISchema, ModuleStatus, Schema, SchemaCategory, SchemaHelper, SchemaStatus, TopicType } from '@guardian/interfaces'; import { DatabaseServer, MessageAction, MessageServer, Schema as SchemaCollection, SchemaConverterUtils, SchemaMessage, TopicConfig, TopicHelper, Users, } from '@guardian/common'; import { INotifier } from '../../helpers/notifier.js'; import { importTag } from '../../api/helpers/tag-import-export-helper.js'; -const { readJSON } = fs; - -/** - * Import Result - */ -export interface SchemaImportResult { - /** - * Old schema id - */ - oldID: string, - /** - * New schema id - */ - newID: string, - /** - * Old schema uuid - */ - oldUUID: string, - /** - * New schema uuid - */ - newUUID: string, - /** - * Old schema iri - */ - oldIRI: string, - /** - * New schema iri - */ - newIRI: string, - /** - * Old schema message id - */ - oldMessageID: string - /** - * Old schema message id - */ - newMessageID: string -} - -/** - * Import Result - */ -export interface ImportResult { - /** - * New schema uuid - */ - schemasMap: SchemaImportResult[]; - /** - * Errors - */ - errors: any[]; -} - -/** - * Creation of default schemas. - */ -export async function setDefaultSchema() { - const fileConfig = path.join(process.cwd(), 'system-schemas', 'system-schemas.json'); - let fileContent: any; - try { - fileContent = await readJSON(fileConfig); - } catch (error) { - throw new Error('you need to create a file \'system-schemas.json\''); - } - - const map: any = {}; - for (const schema of fileContent) { - map[schema.entity] = schema; - } - - if (!map.hasOwnProperty(SchemaEntity.MINT_NFTOKEN)) { - throw new Error(`You need to fill ${SchemaEntity.MINT_NFTOKEN} field in system-schemas.json file`); - } - - if (!map.hasOwnProperty(SchemaEntity.MINT_TOKEN)) { - throw new Error(`You need to fill ${SchemaEntity.MINT_TOKEN} field in system-schemas.json file`); - } - - if (!map.hasOwnProperty(SchemaEntity.POLICY)) { - throw new Error(`You need to fill ${SchemaEntity.POLICY} field in system-schemas.json file`); - } - - if (!map.hasOwnProperty(SchemaEntity.STANDARD_REGISTRY)) { - throw new Error(`You need to fill ${SchemaEntity.STANDARD_REGISTRY} field in system-schemas.json file`); - } - - if (!map.hasOwnProperty(SchemaEntity.WIPE_TOKEN)) { - throw new Error(`You need to fill ${SchemaEntity.WIPE_TOKEN} field in system-schemas.json file`); - } - - if (!map.hasOwnProperty(SchemaEntity.ROLE)) { - throw new Error(`You need to fill ${SchemaEntity.ROLE} field in system-schemas.json file`); - } - - if (!map.hasOwnProperty(SchemaEntity.USER_PERMISSIONS)) { - throw new Error(`You need to fill ${SchemaEntity.USER_PERMISSIONS} field in system-schemas.json file`); - } - - const fn = async (schema: any) => { - const existingSchemas = await DatabaseServer.getSchema({ - uuid: schema.uuid, - system: true - }); - if (existingSchemas) { - console.log(`Skip schema: ${schema.uuid}`); - return; - } - schema.owner = null; - schema.creator = null; - schema.readonly = true; - schema.system = true; - schema.active = true; - await DatabaseServer.createAndSaveSchema(schema); - console.log(`Created schema: ${schema.uuid}`); - } - - await fn(map[SchemaEntity.MINT_NFTOKEN]); - await fn(map[SchemaEntity.MINT_TOKEN]); - await fn(map[SchemaEntity.RETIRE_TOKEN]); - await fn(map[SchemaEntity.POLICY]); - await fn(map[SchemaEntity.STANDARD_REGISTRY]); - await fn(map[SchemaEntity.WIPE_TOKEN]); - await fn(map[SchemaEntity.ISSUER]); - await fn(map[SchemaEntity.USER_ROLE]); - await fn(map[SchemaEntity.CHUNK]); - await fn(map[SchemaEntity.ACTIVITY_IMPACT]); - await fn(map[SchemaEntity.TOKEN_DATA_SOURCE]); - await fn(map[SchemaEntity.ROLE]); - await fn(map[SchemaEntity.USER_PERMISSIONS]); -} - -/** - * Get defs - * @param schema - */ -export function getDefs(schema: ISchema): string[] { - try { - let document: any = schema.document; - if (typeof document === 'string') { - document = JSON.parse(document); - } - if (!document.$defs) { - return []; - } - return Object.keys(document.$defs); - } catch (error) { - return []; - } -} - /** * Only unique * @param value @@ -329,14 +175,13 @@ export function fixSchemaDefsOnImport( * @param topic Topic * @param action * @param schema Schema - * @param userId */ export async function sendSchemaMessage( + owner: IOwner, root: IRootConfig, topic: TopicConfig, action: MessageAction, schema: SchemaCollection, - userId?: string ) { const messageServer = new MessageServer( root.hederaAccountId, @@ -347,7 +192,7 @@ export async function sendSchemaMessage( message.setDocument(schema); await messageServer .setTopicObject(topic) - .sendMessage(message, true, null, userId); + .sendMessage(message, true, null, owner.id); } export async function copyDefsSchemas( @@ -373,8 +218,6 @@ export async function copySchemaAsync( ) { const users = new Users(); const root = await users.getHederaAccount(user.creator); - const userAccount = await users.getUser(user.username); - const userId = userAccount.id.toString(); let item = await DatabaseServer.getSchema({ iri }); @@ -419,11 +262,11 @@ export async function copySchemaAsync( if (topic) { await sendSchemaMessage( + user, root, topic, MessageAction.CreateSchema, - item, - userId + item ); } return item; @@ -498,8 +341,7 @@ export async function createSchema( const users = new Users(); notifier.start('Resolve Hedera account'); const root = await users.getHederaAccount(user.creator); - const userAccount = await users.getUser(user.username); - const userId = userAccount.id.toString(); + notifier.completedAndStart('Save in DB'); if (newSchema) { delete newSchema.status; @@ -524,7 +366,7 @@ export async function createSchema( }); await topic.saveKeys(); await DatabaseServer.saveTopic(topic.toObject()); - await topicHelper.twoWayLink(topic, null, null, userId); + await topicHelper.twoWayLink(topic, null, null, user.id); } const errors = SchemaHelper.checkErrors(newSchema as Schema) @@ -559,11 +401,11 @@ export async function createSchema( notifier.completedAndStart('Save to IPFS & Hedera'); if (topic) { await sendSchemaMessage( + user, root, topic, MessageAction.CreateSchema, - schemaObject, - userId + schemaObject ); } notifier.completedAndStart('Update schema in DB'); @@ -577,7 +419,6 @@ export async function createSchema( * @param schemaId Schema ID * @param owner * @param notifier Notifier - * @param userId */ export async function deleteSchema( schemaId: any, @@ -602,16 +443,38 @@ export async function deleteSchema( if (topic) { const users = new Users(); const root = await users.getHederaAccount(owner.creator); - const userAccount = await users.getUser(owner.username); - const userId = userAccount.id.toString(); await sendSchemaMessage( + owner, root, topic, MessageAction.DeleteSchema, - item, - userId + item ); } } await DatabaseServer.deleteSchemas(item.id); } + +/** + * Delete schema + * @param schemaId Schema ID + * @param owner + * @param notifier Notifier + */ +export async function deleteDemoSchema( + schemaId: any, + owner: IOwner, + notifier: INotifier, +) { + if (!schemaId) { + return; + } + + const item = await DatabaseServer.getSchema(schemaId); + if (!item) { + throw new Error('Schema not found'); + } + + notifier.info(`Delete schema ${item.name}`); + await DatabaseServer.deleteSchemas(item.id); +} diff --git a/guardian-service/src/api/helpers/schema-import-export-helper.ts b/guardian-service/src/api/helpers/schema-import-export-helper.ts index feb389d51e..6c6e1097de 100644 --- a/guardian-service/src/api/helpers/schema-import-export-helper.ts +++ b/guardian-service/src/api/helpers/schema-import-export-helper.ts @@ -1,8 +1,8 @@ -import { GenerateUUIDv4, IOwner, ISchema, ModelHelper, ModuleStatus, Schema, SchemaCategory, SchemaEntity, SchemaHelper, SchemaStatus } from '@guardian/interfaces'; -import { DatabaseServer, Logger, MessageAction, MessageServer, MessageType, replaceValueRecursive, Schema as SchemaCollection, SchemaConverterUtils, SchemaMessage, Tag, TagMessage, UrlType } from '@guardian/common'; -import { emptyNotifier, INotifier } from '../../helpers/notifier.js'; +import { GenerateUUIDv4, IOwner, IRootConfig, ISchema, ISchemaDocument, ModelHelper, ModuleStatus, Schema, SchemaCategory, SchemaEntity, SchemaHelper, SchemaStatus, TopicType } from '@guardian/interfaces'; +import { DatabaseServer, PinoLogger, MessageAction, MessageServer, MessageType, replaceValueRecursive, Schema as SchemaCollection, SchemaConverterUtils, SchemaMessage, Tag, TagMessage, TopicConfig, TopicHelper, UrlType, Users } from '@guardian/common'; +import { INotifier } from '../../helpers/notifier.js'; import { importTag } from '../../api/helpers/tag-import-export-helper.js'; -import { createSchema, fixSchemaDefsOnImport, getDefs, ImportResult, onlyUnique, SchemaImportResult } from './schema-helper.js'; +import { onlyUnique, checkForCircularDependency } from './schema-helper.js'; import geoJson from '@guardian/interfaces/dist/helpers/geojson-schema/geo-json.js'; import sentinelHub from '@guardian/interfaces/dist/helpers/sentinel-hub/sentinel-hub-schema.js'; @@ -51,10 +51,9 @@ export class SchemaCache { /** * Load schema * @param messageId - * @param owner + * @param log */ -export async function loadSchema(messageId: string): Promise { - const log = new Logger(); +export async function loadSchema(messageId: string, log: PinoLogger): Promise { try { let schemaToImport = SchemaCache.getSchema(messageId); if (!schemaToImport) { @@ -102,10 +101,10 @@ export async function loadSchema(messageId: string): Promise { * @param topicId */ export async function importTagsByFiles( - result: ImportResult, + result: ImportSchemaResult, files: Tag[], notifier: INotifier -): Promise { +): Promise { const { schemasMap } = result; const idMap: Map = new Map(); for (const item of schemasMap) { @@ -116,37 +115,6 @@ export async function importTagsByFiles( return result; } -/** - * Export schemas - * @param ids Schemas ids - * @returns Schemas to export - */ -export async function exportSchemas( - ids: string[], - user: IOwner -) { - const schemas = await DatabaseServer.getSchemasByIds(ids); - const map: any = {}; - const relationships: SchemaCollection[] = []; - for (const schema of schemas) { - if (!map[schema.iri]) { - map[schema.iri] = schema; - relationships.push(schema); - const keys = getDefs(schema); - const defs = await DatabaseServer.getSchemas({ - where: { iri: { $in: keys } } - }); - for (const element of defs) { - if (!map[element.iri]) { - map[element.iri] = element; - relationships.push(element); - } - } - } - } - return relationships; -} - export async function getSchemaCategory(topicId: string): Promise { if (topicId) { const item = await DatabaseServer.getTool({ topicId }); @@ -171,220 +139,21 @@ export async function getSchemaTarget(topicId: string): Promise { return null; } -/** - * Import schema by files - * @param category - * @param user - * @param files - * @param topicId - * @param notifier - * @param skipGenerateId - * @param outerSchemasMapping - */ -export async function importSchemaByFiles( - category: SchemaCategory, - user: IOwner, - files: ISchema[], - topicId: string, - notifier: INotifier, - skipGenerateId = false, - outerSchemasMapping?: { name: string, iri: string }[] -): Promise { - notifier.start('Import schemas'); - - const schemasMap: SchemaImportResult[] = []; - const uuidMap: Map = new Map(); - - for (const file of files) { - const oldUUID = file.iri ? file.iri.substring(1) : null; - const newUUID = skipGenerateId ? oldUUID : GenerateUUIDv4(); - schemasMap.push({ - oldID: file.id, - newID: null, - oldUUID, - newUUID, - oldIRI: `#${oldUUID}`, - newIRI: `#${newUUID}`, - oldMessageID: file.messageId, - newMessageID: null, - }) - if (oldUUID) { - uuidMap.set(oldUUID, newUUID); - } - file.uuid = newUUID; - file.iri = '#' + newUUID; - file.documentURL = null; - file.contextURL = `schema:${file.uuid}`; - file.messageId = null; - file.creator = user.creator; - file.owner = user.owner; - file.topicId = topicId || 'draft'; - file.status = SchemaStatus.DRAFT; - if (file.document?.$defs && outerSchemasMapping) { - for (const def of Object.values(file.document.$defs)) { - if (!def || uuidMap.has(def.$id)) { - continue; - } - const subSchemaMapping = outerSchemasMapping.find( - (item) => item.name === def.title - ); - if (subSchemaMapping) { - uuidMap.set(def.$id, subSchemaMapping.iri); - } - } - } - } - - notifier.info(`Found ${files.length} schemas`); - for (const file of files) { - if (file.document) { - file.document = replaceValueRecursive(file.document, uuidMap); - } - if (file.context) { - file.context = replaceValueRecursive(file.context, uuidMap); - } - file.sourceVersion = file.version; - SchemaHelper.setVersion(file, '', ''); - } - - const tools = await DatabaseServer.getTools({ status: ModuleStatus.PUBLISHED }, { fields: ['topicId'] }); - const toolSchemas = await DatabaseServer.getSchemas({ topicId: { $in: tools.map(t => t.topicId) } }); - - const updatedSchemasMap = { - '#GeoJSON': geoJson as any as Schema, - '#SentinelHUB': sentinelHub as any as Schema - }; - const parsedSchemas: Schema[] = []; - for (const item of files) { - parsedSchemas.push(new Schema(item, true)); - } - for (const item of toolSchemas) { - parsedSchemas.push(new Schema(item, true)); - } - - const errors: any[] = []; - for (const file of files) { - const valid = fixSchemaDefsOnImport(file.iri, parsedSchemas, updatedSchemasMap); - if (!valid) { - errors.push({ - type: 'schema', - uuid: file.uuid, - name: file.name, - error: 'invalid defs' - }); - } - } - - for (let index = 0; index < files.length; index++) { - const schema = files[index]; - const parsedSchema = updatedSchemasMap[schema.iri]; - schema.document = parsedSchema.document; - const file = SchemaConverterUtils.SchemaConverter(schema); - file.category = category; - file.readonly = false; - file.system = false; - const item = await createSchema(file, user, emptyNotifier()); - schemasMap[index].newID = item.id.toString(); - notifier.info(`Schema ${index + 1} (${file.name || '-'}) created`); - } - - notifier.completed(); - return { schemasMap, errors }; -} - -/** - * Import schemas by messages - * @param owner - * @param messageIds - * @param topicId - * @param notifier - */ -export async function importSchemasByMessages( - category: SchemaCategory, - user: IOwner, - messageIds: string[], - topicId: string, - notifier: INotifier -): Promise { - notifier.start('Load schema files'); - const schemas: ISchema[] = []; - - const relationships = new Set(); - for (const messageId of messageIds) { - const newSchema = await loadSchema(messageId); - schemas.push(newSchema); - for (const id of newSchema.relationships) { - relationships.add(id); - } - } - for (const messageId of messageIds) { - relationships.delete(messageId); - } - for (const messageId of relationships) { - const newSchema = await loadSchema(messageId); - schemas.push(newSchema); - } - - notifier.start('Load tags'); - const topics = new Set(); - for (const schema of schemas) { - topics.add(schema.topicId); - } - - const tags: any[] = []; - const messageServer = new MessageServer(null, null); - for (const id of topics) { - const tagMessages = await messageServer.getMessages( - id, - MessageType.Tag, - MessageAction.PublishTag - ); - for (const tag of tagMessages) { - tags.push({ - uuid: tag.uuid, - name: tag.name, - description: tag.description, - owner: tag.owner, - entity: tag.entity, - target: tag.target, - status: 'History', - topicId: tag.topicId, - messageId: tag.id, - document: null, - uri: null, - date: tag.date, - id: null - }); - } - } - - notifier.completed(); - - let result = await importSchemaByFiles( - category, - user, - schemas, - topicId, - notifier - ); - result = await importTagsByFiles(result, tags, notifier); - - return result; -} - /** * Prepare schema for preview * @param messageIds * @param notifier + * @param logger */ export async function prepareSchemaPreview( messageIds: string[], - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { notifier.start('Load schema file'); const schemas = []; for (const messageId of messageIds) { - const schema = await loadSchema(messageId); + const schema = await loadSchema(messageId, logger); schemas.push(schema); } @@ -428,3 +197,669 @@ export async function prepareSchemaPreview( notifier.completed(); return schemas; } + +/** + * Import Result + */ +export interface ImportSchemaMap { + /** + * Old schema id + */ + oldID: string, + /** + * New schema id + */ + newID: string, + /** + * Old schema uuid + */ + oldUUID: string, + /** + * New schema uuid + */ + newUUID: string, + /** + * Old schema iri + */ + oldIRI: string, + /** + * New schema iri + */ + newIRI: string, + /** + * Old schema message id + */ + oldMessageID: string + /** + * Old schema message id + */ + newMessageID: string +} + +/** + * Import Error + */ +export interface ImportSchemaError { + /** + * Entity type (schema) + */ + type: string; + /** + * Schema uuid + */ + uuid: string; + /** + * Schema name + */ + name: string; + /** + * Error message + */ + error: string; +} + +/** + * Import Result + */ +export interface ImportSchemaResult { + /** + * New schema uuid + */ + schemasMap: ImportSchemaMap[]; + /** + * Errors + */ + errors: ImportSchemaError[]; +} + +export class SchemaImport { + private readonly demo: boolean; + private readonly notifier: INotifier; + private readonly schemasMapping: ImportSchemaMap[]; + private readonly schemaIdsMapping: Map; + private readonly externalSchemas: Map; + private readonly validatedSchemas: Map; + private readonly errors: ImportSchemaError[]; + + private root: IRootConfig; + private topicHelper: TopicHelper; + private messageServer: MessageServer; + private owner: IOwner; + private topicRow: TopicConfig; + private topicId: string; + + constructor(demo: boolean, notifier: INotifier) { + this.demo = demo; + this.notifier = notifier; + this.schemasMapping = []; + this.schemaIdsMapping = new Map(); + this.externalSchemas = new Map(); + this.validatedSchemas = new Map(); + this.validatedSchemas.set('#GeoJSON', geoJson as any as Schema); + this.validatedSchemas.set('#SentinelHUB', sentinelHub as any as Schema); + this.errors = []; + } + + public addExternalSchemas(externalSchemas: { name: string, iri: string }[]): void { + if (externalSchemas) { + for (const schema of externalSchemas) { + this.externalSchemas.set(schema.name, schema.iri); + } + } + } + + private async resolveAccount(user: IOwner): Promise { + this.notifier.start('Resolve Hedera account'); + const users = new Users(); + this.root = await users.getHederaAccount(user.creator); + this.topicHelper = new TopicHelper( + this.root.hederaAccountId, + this.root.hederaAccountKey, + this.root.signOptions + ); + this.messageServer = new MessageServer( + this.root.hederaAccountId, + this.root.hederaAccountKey, + this.root.signOptions + ); + this.owner = user; + return this.root; + } + + private async resolveTopic(user: IOwner, topicId: string) { + this.notifier.completedAndStart('Resolve Topics'); + + if (this.demo) { + this.topicRow = new TopicConfig({ + type: TopicType.SchemaTopic, + name: TopicType.SchemaTopic, + description: TopicType.SchemaTopic, + owner: user.creator, + policyId: null, + policyUUID: null, + topicId + }, null, null) + } else if (topicId === 'draft') { + this.topicRow = null; + } else if (topicId) { + this.topicRow = await TopicConfig.fromObject(await DatabaseServer.getTopicById(topicId), true); + } else { + this.topicRow = await this.topicHelper.create({ + type: TopicType.SchemaTopic, + name: TopicType.SchemaTopic, + description: TopicType.SchemaTopic, + owner: user.creator, + policyId: null, + policyUUID: null + }); + await this.topicRow.saveKeys(); + await DatabaseServer.saveTopic(this.topicRow.toObject()); + await this.topicHelper.twoWayLink(this.topicRow, null, null, this.owner.id); + } + this.topicId = this.topicRow?.topicId || 'draft'; + } + + private async resolveMessages(messageIds: string[], logger: PinoLogger): Promise { + this.notifier.start('Resolve schema messages'); + + const schemas: ISchema[] = []; + + const relationships = new Set(); + for (const messageId of messageIds) { + const newSchema = await loadSchema(messageId, logger); + schemas.push(newSchema); + for (const id of newSchema.relationships) { + relationships.add(id); + } + } + for (const messageId of messageIds) { + relationships.delete(messageId); + } + for (const messageId of relationships) { + const newSchema = await loadSchema(messageId, logger); + schemas.push(newSchema); + } + + return schemas; + } + + private updateId(schema: ISchema, generateNewId: boolean): ISchema { + const oldID = schema.id; + const oldUUID = schema.iri ? schema.iri.substring(1) : null; + const newUUID = generateNewId ? GenerateUUIDv4() : oldUUID; + + this.schemasMapping.push({ + oldID, + newID: null, + oldUUID, + newUUID, + oldIRI: `#${oldUUID}`, + newIRI: `#${newUUID}`, + oldMessageID: schema.messageId, + newMessageID: null, + }) + if (oldUUID) { + this.schemaIdsMapping.set(oldUUID, newUUID); + } + schema.uuid = newUUID; + schema.messageId = null; + return schema; + } + + private async dataPreparation( + category: SchemaCategory, + schemas: ISchema[], + user: IOwner, + skipGenerateId: boolean, + system: boolean + ) { + this.notifier.info(`Found ${schemas.length} schemas`); + for (const file of schemas) { + this.updateId(file, !skipGenerateId); + + SchemaConverterUtils.SchemaConverter(file); + file.iri = '#' + file.uuid; + file.documentURL = null; + file.contextURL = `schema:${file.uuid}`; + file.creator = user.creator; + file.owner = user.owner; + file.topicId = this.topicId; + file.status = this.demo ? SchemaStatus.DEMO : SchemaStatus.DRAFT; + file.category = category; + file.readonly = system; + file.system = false; + file.codeVersion = SchemaConverterUtils.VERSION; + + delete file.id; + delete file._id; + + //Find external schemas by Title + const defs = SchemaImportExportHelper.getDefDocuments(file); + for (const def of defs) { + if (def && !this.schemaIdsMapping.has(def.$id)) { + const externalSchemaIRI = this.externalSchemas.get(def.title); + if (externalSchemaIRI) { + this.schemaIdsMapping.set(def.$id, externalSchemaIRI); + } + } + } + } + } + + private async updateUUIDs(schemas: ISchema[]): Promise { + for (const file of schemas) { + if (file.document) { + file.document = replaceValueRecursive(file.document, this.schemaIdsMapping); + } + if (file.context) { + file.context = replaceValueRecursive(file.context, this.schemaIdsMapping); + } + file.sourceVersion = file.version; + SchemaHelper.setVersion(file, '', ''); + } + } + + private async validateDefs(schemas: ISchema[]): Promise { + const tools = await DatabaseServer.getTools({ status: ModuleStatus.PUBLISHED }, { fields: ['topicId'] }); + const toolSchemas = await DatabaseServer.getSchemas({ topicId: { $in: tools.map(t => t.topicId) } }); + + const allSchemas: Schema[] = []; + for (const item of schemas) { + allSchemas.push(new Schema(item, true)); + } + for (const item of toolSchemas) { + allSchemas.push(new Schema(item, true)); + } + + for (const file of schemas) { + const error = SchemaImportExportHelper.validateDefs(file.iri, allSchemas, this.validatedSchemas); + if (error) { + this.errors.push({ + type: 'schema', + uuid: file.uuid, + name: file.name, + error + }); + } + } + } + + private async updateDefs(schemas: ISchema[]): Promise { + for (const file of schemas) { + const schema = new Schema(file, true); + this.validatedSchemas.set(file.iri, schema); + } + } + + private async saveSchemas(schemas: ISchema[]): Promise { + let index = 0; + for (const file of schemas) { + const label = `Schema ${index + 1} (${file.name || '-'})`; + + const schema = this.validatedSchemas.get(file.iri); + file.document = schema.document; + + if (checkForCircularDependency(file)) { + throw new Error(`There is circular dependency in schema: ${file.iri}`); + } + + const schemaObject = DatabaseServer.createSchema(file); + const errors = SchemaHelper.checkErrors(file as Schema); + SchemaHelper.updateIRI(schemaObject); + + schemaObject.errors = errors; + if (errors?.length) { + schemaObject.status = SchemaStatus.ERROR; + } + + const errorsCount = await DatabaseServer.getSchemasCount({ + iri: { + $eq: schemaObject.iri + }, + $or: [{ + topicId: { $ne: schemaObject.topicId } + }, { + uuid: { $ne: schemaObject.uuid } + }] + }); + if (errorsCount > 0) { + throw new Error('Schema identifier already exist'); + } + + this.notifier.info(`${label}: Save to IPFS & Hedera`); + if (this.topicRow && !this.demo) { + const message = new SchemaMessage(MessageAction.CreateSchema); + message.setDocument(schemaObject); + await this.messageServer + .setTopicObject(this.topicRow) + .sendMessage(message, true, null, this.owner.id); + } + + this.notifier.info(`${label}: Update schema in DB`); + const row = await DatabaseServer.saveSchema(schemaObject); + + this.schemasMapping[index].newID = row.id.toString(); + this.notifier.info(`${label}: Created`); + index++; + } + } + + /** + * Import tags by files + * @param files + */ + private async importTags(topics: Set): Promise { + this.notifier.start('Load tags'); + const tags: any[] = []; + const messageServer = new MessageServer(null, null); + for (const id of topics) { + const tagMessages = await messageServer.getMessages( + id, + MessageType.Tag, + MessageAction.PublishTag + ); + for (const tag of tagMessages) { + tags.push({ + uuid: tag.uuid, + name: tag.name, + description: tag.description, + owner: tag.owner, + entity: tag.entity, + target: tag.target, + status: 'History', + topicId: tag.topicId, + messageId: tag.id, + document: null, + uri: null, + date: tag.date, + id: null + }); + } + } + + const idMap: Map = new Map(); + for (const item of this.schemasMapping) { + idMap.set(item.oldID, item.newID); + idMap.set(item.oldMessageID, item.newID); + } + await importTag(tags, idMap); + } + + public async import( + components: ISchema[], + user: IOwner, + options: { + topicId: string, + category: SchemaCategory, + skipGenerateId?: boolean + }, + ): Promise { + const { topicId, category, skipGenerateId } = options; + + this.notifier.start('Import schemas'); + + await this.resolveAccount(user); + await this.resolveTopic(user, topicId); + await this.dataPreparation(category, components, user, skipGenerateId, false); + await this.updateUUIDs(components); + await this.validateDefs(components); + await this.saveSchemas(components); + + this.notifier.completed(); + + return { + schemasMap: this.schemasMapping, + errors: this.errors + }; + } + + public async importSystem( + components: ISchema[], + user: IOwner, + options: { + topicId: string, + category: SchemaCategory, + skipGenerateId?: boolean + }, + ): Promise { + const { topicId, category, skipGenerateId } = options; + + this.notifier.start('Import schemas'); + + await this.resolveAccount(user); + await this.resolveTopic(user, topicId); + await this.dataPreparation(category, components, user, skipGenerateId, true); + await this.updateUUIDs(components); + await this.updateDefs(components); + await this.saveSchemas(components); + + this.notifier.completed(); + + return { + schemasMap: this.schemasMapping, + errors: this.errors + }; + } + + public async importByMessage( + messageIds: string[], + user: IOwner, + options: { + topicId: string, + category: SchemaCategory, + skipGenerateId?: boolean + }, + logger: PinoLogger + ): Promise { + const { topicId, category, skipGenerateId } = options; + + this.notifier.start('Import schemas'); + + await this.resolveAccount(user); + await this.resolveTopic(user, topicId); + const components = await this.resolveMessages(messageIds, logger); + const topics = new Set(components.map((s) => s.topicId)); + + await this.dataPreparation(category, components, user, skipGenerateId, false); + await this.updateUUIDs(components); + await this.validateDefs(components); + await this.saveSchemas(components); + await this.importTags(topics); + this.notifier.completed(); + + return { + schemasMap: this.schemasMapping, + errors: this.errors + }; + } +} + +/** + * Schema import export helper + */ +export class SchemaImportExportHelper { + /** + * Export schemas + * @param ids Schemas ids + * @returns Schemas to export + */ + public static async exportSchemas(ids: string[]): Promise { + const schemas = await DatabaseServer.getSchemasByIds(ids); + const map = new Map(); + for (const schema of schemas) { + map.set(schema.iri, schema); + } + + const defs = new Set(); + for (const schema of schemas) { + const keys = SchemaImportExportHelper.getDefs(schema); + for (const iri of keys) { + if (!map.has(iri)) { + defs.add(iri); + } + } + } + + const sub = await DatabaseServer.getSchemas({ iri: { $in: Array.from(defs) } }); + for (const schema of sub) { + map.set(schema.iri, schema); + } + + return Array.from(map.values()); + } + + /** + * Get defs + * @param schema + */ + public static getDefs(schema: ISchema): string[] { + try { + let document: ISchemaDocument = schema.document; + if (typeof document === 'string') { + document = JSON.parse(document); + } + if (!document.$defs) { + return []; + } + return Object.keys(document.$defs); + } catch (error) { + return []; + } + } + + /** + * Get defs + * @param schema + */ + public static getDefDocuments(schema: ISchema): ISchemaDocument[] { + try { + let document: ISchemaDocument = schema.document; + if (typeof document === 'string') { + document = JSON.parse(document); + } + if (document && document.$defs) { + return Object.values(document.$defs); + } + return []; + } catch (error) { + return []; + } + } + + /** + * Validate and update schema defs + * + * @param target Schema iri + * @param allSchemas Schemas + * @param validatedSchemas Schemas + */ + public static validateDefs( + target: string, + allSchemas: Schema[], + validatedSchemas: Map + ): string { + if (validatedSchemas.has(target)) { + return null; + } + + const schema = allSchemas.find((s) => s.iri === target); + if (!schema) { + return 'Invalid defs'; + } + + if (checkForCircularDependency(schema)) { + return `There is circular dependency in schema: ${target}`; + } + + let valid = true; + for (const field of schema.fields) { + if (field.isRef) { + const error = SchemaImportExportHelper.validateDefs(field.type, allSchemas, validatedSchemas); + if (error) { + field.type = null; + valid = false; + } + } + } + schema.update(schema.fields, schema.conditions); + schema.updateRefs(allSchemas); + + validatedSchemas.set(target, schema); + + if (!valid) { + return 'Invalid defs'; + } else { + return null; + } + } + + /** + * Import schema by files + * @param files + * @param user + * @param options + * @param notifier + */ + public static async importSchemaByFiles( + files: ISchema[], + user: IOwner, + options: { + topicId: string, + category: SchemaCategory, + skipGenerateId?: boolean, + outerSchemas?: { name: string, iri: string }[], + demo?: boolean + }, + notifier: INotifier + ): Promise { + const helper = new SchemaImport(options.demo, notifier); + helper.addExternalSchemas(options.outerSchemas); + return helper.import(files, user, options); + } + /** + * Import schemas by messages + * @param owner + * @param messageIds + * @param topicId + * @param notifier + * @param logger + */ + public static async importSchemasByMessages( + messageIds: string[], + user: IOwner, + options: { + topicId: string, + category: SchemaCategory, + demo?: boolean + }, + notifier: INotifier, + logger: PinoLogger + ): Promise { + const helper = new SchemaImport(options.demo, notifier); + return helper.importByMessage(messageIds, user, options, logger); + } + + /** + * Import schema by files + * @param files + * @param user + * @param options + * @param notifier + */ + public static async importSystemSchema( + files: ISchema[], + user: IOwner, + options: { + topicId: string, + category: SchemaCategory, + skipGenerateId?: boolean, + outerSchemas?: { name: string, iri: string }[], + demo?: boolean + }, + notifier: INotifier + ): Promise { + const helper = new SchemaImport(options.demo, notifier); + helper.addExternalSchemas(options.outerSchemas); + return helper.importSystem(files, user, options); + } +} \ No newline at end of file diff --git a/guardian-service/src/api/helpers/schema-publish-helper.ts b/guardian-service/src/api/helpers/schema-publish-helper.ts index 64a56b341c..3ee7462963 100644 --- a/guardian-service/src/api/helpers/schema-publish-helper.ts +++ b/guardian-service/src/api/helpers/schema-publish-helper.ts @@ -3,8 +3,8 @@ import { checkForCircularDependency, incrementSchemaVersion, updateSchemaDefs, u import { DatabaseServer, MessageAction, MessageServer, Schema as SchemaCollection, SchemaMessage, schemasToContext, TopicConfig, UrlType } from '@guardian/common'; import { emptyNotifier, INotifier } from '../../helpers/notifier.js'; import { publishSchemaTags } from './../tag.service.js'; -import { exportSchemas } from './schema-import-export-helper.js'; import { IRootConfig } from '../../interfaces/root-config.interface.js'; +import { SchemaImportExportHelper } from './schema-import-export-helper.js'; /** * Check access @@ -43,14 +43,12 @@ export async function accessSchema( * @param user * @param messageServer * @param type - * @param userId */ export async function publishSchema( item: SchemaCollection, user: IOwner, messageServer: MessageServer, - type?: MessageAction, - userId?: string + type: MessageAction ): Promise { if (checkForCircularDependency(item)) { throw new Error(`There is circular dependency in schema: ${item.iri}`); @@ -82,13 +80,13 @@ export async function publishSchema( item.context = schemasToContext([...defsArray, itemDocument], additionalContexts); - const relationships = await exportSchemas([item.id], user); + const relationships = await SchemaImportExportHelper.exportSchemas([item.id]); const message = new SchemaMessage(type || MessageAction.PublishSchema); message.setDocument(item); message.setRelationships(relationships); const result = await messageServer - .sendMessage(message, true, null, userId); + .sendMessage(message, true, null, user.id); const messageId = result.getId(); const topicId = result.getTopicId(); @@ -112,13 +110,11 @@ export async function publishSchema( * @param defs Definitions * @param user * @param root HederaAccount - * @param userId */ export async function publishDefsSchemas( defs: any, user: IOwner, - root: IRootConfig, - userId?: string + root: IRootConfig ) { if (!defs) { return; @@ -130,7 +126,7 @@ export async function publishDefsSchemas( }); if (schema && schema.status !== SchemaStatus.PUBLISHED) { schema = await incrementSchemaVersion(schema.iri, user); - await findAndPublishSchema(schema.id, schema.version, user, root, emptyNotifier(), userId); + await findAndPublishSchema(schema.id, schema.version, user, root, emptyNotifier()); } } } @@ -142,15 +138,13 @@ export async function publishDefsSchemas( * @param user * @param root * @param notifier - * @param userId */ export async function findAndPublishSchema( id: string, version: string, user: IOwner, root: IRootConfig, - notifier: INotifier, - userId?: string + notifier: INotifier ): Promise { notifier.start('Load schema'); @@ -166,7 +160,7 @@ export async function findAndPublishSchema( notifier.completedAndStart('Publishing related schemas'); const oldSchemaIri = item.iri; - await publishDefsSchemas(item.document?.$defs, user, root, userId); + await publishDefsSchemas(item.document?.$defs, user, root); item = await DatabaseServer.getSchema(id); notifier.completedAndStart('Resolve topic'); @@ -176,10 +170,10 @@ export async function findAndPublishSchema( notifier.completedAndStart('Publish schema'); SchemaHelper.updateVersion(item, version); - item = await publishSchema(item, user, messageServer, MessageAction.PublishSchema, userId); + item = await publishSchema(item, user, messageServer, MessageAction.PublishSchema); notifier.completedAndStart('Publish tags'); - await publishSchemaTags(item, root, userId); + await publishSchemaTags(item, user, root); notifier.completedAndStart('Update in DB'); await updateSchemaDocument(item); @@ -195,15 +189,13 @@ export async function findAndPublishSchema( * @param messageServer * @param type * @param notifier - * @param userId */ export async function publishSystemSchema( item: SchemaCollection, user: IOwner, messageServer: MessageServer, - type?: MessageAction, - notifier?: INotifier, - userId?: string + type: MessageAction, + notifier: INotifier ): Promise { delete item.id; delete item._id; @@ -213,7 +205,7 @@ export async function publishSystemSchema( item.version = undefined; item.topicId = messageServer.getTopic(); SchemaHelper.setVersion(item, undefined, undefined); - const result = await publishSchema(item, user, messageServer, type, userId); + const result = await publishSchema(item, user, messageServer, type); if (notifier) { notifier.info(`Schema ${result.name || '-'} published`); } @@ -226,14 +218,12 @@ export async function publishSystemSchema( * @param messageServer * @param user * @param notifier - * @param userId */ export async function publishSystemSchemas( systemSchemas: SchemaCollection[], messageServer: MessageServer, user: IOwner, - notifier: INotifier, - userId?: string + notifier: INotifier ): Promise { const tasks = []; for (const schema of systemSchemas) { @@ -245,8 +235,7 @@ export async function publishSystemSchemas( user, messageServer, MessageAction.PublishSystemSchema, - notifier, - userId + notifier )); } } @@ -284,7 +273,7 @@ export async function findAndDryRunSchema( for (const name of names) { const field = SchemaHelper.parseProperty(name, itemDocument.properties[name]); if (!field.type) { - throw new Error(`Field type is not set. Field: ${name}`); + throw new Error(`Field type is not set. Field: ${name}, Schema: ${item.uuid}`); } if (field.isRef && (!itemDocument.$defs || !itemDocument.$defs[field.type])) { throw new Error(`Dependent schema not found: ${item.iri}. Field: ${name}`); diff --git a/guardian-service/src/api/helpers/token-import-export-helper.ts b/guardian-service/src/api/helpers/token-import-export-helper.ts index bf7b8d361c..48f7403d1c 100644 --- a/guardian-service/src/api/helpers/token-import-export-helper.ts +++ b/guardian-service/src/api/helpers/token-import-export-helper.ts @@ -2,14 +2,24 @@ import { DataBaseHelper, Token } from '@guardian/common'; import { GenerateUUIDv4, IOwner } from '@guardian/interfaces'; import { INotifier } from '../../helpers/notifier.js'; +/** + * Import token mapping + */ +export interface ImportTokenMap { + oldID: string; + oldTokenID: string; + newID: string; + newTokenID: string; +} + /** * Import Result */ -interface ImportResult { +export interface ImportTokenResult { /** * New token uuid */ - tokenMap: any[]; + tokenMap: ImportTokenMap[]; /** * Errors */ @@ -26,9 +36,9 @@ export async function importTokensByFiles( user: IOwner, tokens: any[] = [], notifier: INotifier -): Promise { +): Promise { const errors: any[] = []; - const tokenMap: any[] = []; + const tokenMap: ImportTokenMap[] = []; notifier.start('Import tokens'); const tokenRepository = new DataBaseHelper(Token); diff --git a/guardian-service/src/api/helpers/tool-import-export-helper.ts b/guardian-service/src/api/helpers/tool-import-export-helper.ts index f4f5cde02e..f003ae10c3 100644 --- a/guardian-service/src/api/helpers/tool-import-export-helper.ts +++ b/guardian-service/src/api/helpers/tool-import-export-helper.ts @@ -2,12 +2,22 @@ import { DatabaseServer, IToolComponents, MessageAction, MessageServer, MessageT import { BlockType, GenerateUUIDv4, IOwner, IRootConfig, ModuleStatus, PolicyToolMetadata, SchemaCategory, SchemaStatus, TagType, TopicType } from '@guardian/interfaces'; import { INotifier } from '../../helpers/notifier.js'; import { importTag } from './tag-import-export-helper.js'; -import { importSchemaByFiles } from './schema-import-export-helper.js'; +import { SchemaImportExportHelper } from './schema-import-export-helper.js'; + +/** + * Import tool mapping + */ +export interface ImportToolMap { + oldMessageId: string; + messageId: string; + oldHash: string; + newHash?: string; +} /** * Import Result */ -interface ImportResult { +export interface ImportToolResult { /** * Tool */ @@ -21,7 +31,7 @@ interface ImportResult { /** * Import Results */ -interface ImportResults { +export interface ImportToolResults { /** * Tool */ @@ -40,7 +50,7 @@ interface ImportResults { export async function replaceConfig( tool: PolicyTool, schemasMap: any[], - tools: { oldMessageId: string, messageId: string, oldHash: string, newHash?: string }[] + tools: ImportToolMap[] ) { if (await DatabaseServer.getTool({ name: tool.name })) { tool.name = tool.name + '_' + Date.now(); @@ -74,7 +84,7 @@ export async function importSubTools( }[], user: IOwner, notifier: INotifier, -): Promise { +): Promise { if (!messages?.length) { return { tools: [], errors: [] }; } @@ -161,7 +171,7 @@ export async function importToolByMessage( messageId: string, user: IOwner, notifier: INotifier -): Promise { +): Promise { notifier.completedAndStart('Load tool file'); const messageServer = new MessageServer( @@ -319,7 +329,7 @@ export async function importToolByFile( components: IToolComponents, notifier: INotifier, metadata?: PolicyToolMetadata -): Promise { +): Promise { notifier.start('Import tool'); const { @@ -423,14 +433,16 @@ export async function importToolByFile( )) as { name: string; iri: string }[]; // Import Schemas - const schemasResult = await importSchemaByFiles( - SchemaCategory.TOOL, - user, + const schemasResult = await SchemaImportExportHelper.importSchemaByFiles( schemas, - tool.topicId, - notifier, - false, - toolsSchemas + user, + { + category: SchemaCategory.TOOL, + topicId: tool.topicId, + skipGenerateId: false, + outerSchemas: toolsSchemas + }, + notifier ); const schemasMap = schemasResult.schemasMap; diff --git a/guardian-service/src/api/ipfs.service.ts b/guardian-service/src/api/ipfs.service.ts index 41fb132cfe..1e1bf8c1db 100644 --- a/guardian-service/src/api/ipfs.service.ts +++ b/guardian-service/src/api/ipfs.service.ts @@ -1,12 +1,12 @@ import { ApiResponse, ApiResponseSubscribe } from '../api/helpers/api-response.js'; -import { DataBaseHelper, DryRunFiles, IPFS, Logger, MessageError, MessageResponse } from '@guardian/common'; +import { DataBaseHelper, DryRunFiles, IPFS, MessageError, MessageResponse, PinoLogger } from '@guardian/common'; import { ExternalMessageEvents, MessageAPI } from '@guardian/interfaces'; import { IPFSTaskManager } from '../helpers/ipfs-task-manager.js'; /** * TODO */ -export async function ipfsAPI(): Promise { +export async function ipfsAPI(logger: PinoLogger): Promise { ApiResponseSubscribe(ExternalMessageEvents.IPFS_ADDED_FILE, async (msg) => { try { if (!msg) { @@ -22,7 +22,7 @@ export async function ipfsAPI(): Promise { } } } catch (error) { - new Logger().error(error, ['IPFS_SERVICE']); + await logger.error(error, ['IPFS_SERVICE']); } }); @@ -41,7 +41,7 @@ export async function ipfsAPI(): Promise { } } } catch (error) { - new Logger().error(error, ['IPFS_SERVICE']); + await logger.error(error, ['IPFS_SERVICE']); } }); @@ -51,7 +51,7 @@ export async function ipfsAPI(): Promise { return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['IPFS_CLIENT']); + await logger.error(error, ['IPFS_CLIENT']); return new MessageError(error); } }) @@ -73,7 +73,7 @@ export async function ipfsAPI(): Promise { url: IPFS.IPFS_PROTOCOL + entity.id }); } catch (error) { - new Logger().error(error, ['IPFS_CLIENT']); + await logger.error(error, ['IPFS_CLIENT']); return new MessageError(error); } }) @@ -93,7 +93,7 @@ export async function ipfsAPI(): Promise { return new MessageResponse(await IPFS.getFile(msg.cid, msg.responseType, msg.userId)); } catch (error) { - new Logger().error(error, ['IPFS_CLIENT']); + await logger.error(error, ['IPFS_CLIENT']); return new MessageResponse({ error: error.message }); } }) @@ -114,7 +114,7 @@ export async function ipfsAPI(): Promise { return new MessageResponse(file.file); } catch (error) { - new Logger().error(error, ['IPFS_CLIENT']); + await logger.error(error, ['IPFS_CLIENT']); return new MessageResponse({error: error.message}); } }) diff --git a/guardian-service/src/api/loader.service.ts b/guardian-service/src/api/loader.service.ts index fd0a6e5207..c81b4c31f5 100644 --- a/guardian-service/src/api/loader.service.ts +++ b/guardian-service/src/api/loader.service.ts @@ -1,5 +1,5 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { DataBaseHelper, DidDocument, DidURL, Logger, MessageError, MessageResponse, Schema, } from '@guardian/common'; +import { DataBaseHelper, DidDocument, DidURL, MessageError, MessageResponse, PinoLogger, Schema } from '@guardian/common'; import { MessageAPI } from '@guardian/interfaces'; /** @@ -7,10 +7,12 @@ import { MessageAPI } from '@guardian/interfaces'; * * @param didDocumentLoader - DID Documents Loader * @param schemaDocumentLoader - Schema Documents Loader + * @param logger - pino logger */ export async function loaderAPI( didDocumentRepository: DataBaseHelper, - schemaRepository: DataBaseHelper + schemaRepository: DataBaseHelper, + logger: PinoLogger, ): Promise { /** * Return DID Document @@ -31,7 +33,7 @@ export async function loaderAPI( } return new MessageError('Document not found'); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -61,7 +63,7 @@ export async function loaderAPI( } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -90,7 +92,7 @@ export async function loaderAPI( } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/map.service.ts b/guardian-service/src/api/map.service.ts index 724a359c76..094d54a3aa 100644 --- a/guardian-service/src/api/map.service.ts +++ b/guardian-service/src/api/map.service.ts @@ -1,11 +1,11 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { Logger, MessageError, MessageResponse, } from '@guardian/common'; +import { MessageError, MessageResponse, PinoLogger } from '@guardian/common'; import { MessageAPI } from '@guardian/interfaces'; /** * Connect to the message broker methods of working with map. */ -export async function mapAPI(): Promise { +export async function mapAPI(logger: PinoLogger): Promise { /** * Get map api token * @@ -17,7 +17,7 @@ export async function mapAPI(): Promise { try { return new MessageResponse(process.env.MAP_API_KEY || ''); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -26,7 +26,7 @@ export async function mapAPI(): Promise { try { return new MessageResponse(process.env.GET_SENTINEL_API_KEY || ''); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/module.service.ts b/guardian-service/src/api/module.service.ts index 832a03d99f..ab386cf026 100644 --- a/guardian-service/src/api/module.service.ts +++ b/guardian-service/src/api/module.service.ts @@ -1,5 +1,5 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { BinaryMessageResponse, DatabaseServer, Logger, MessageAction, MessageError, MessageResponse, MessageServer, MessageType, ModuleImportExport, ModuleMessage, PolicyModule, TagMessage, TopicConfig, TopicHelper, Users } from '@guardian/common'; +import { BinaryMessageResponse, DatabaseServer, MessageAction, MessageError, MessageResponse, MessageServer, MessageType, ModuleImportExport, ModuleMessage, PinoLogger, PolicyModule, TagMessage, TopicConfig, TopicHelper, Users } from '@guardian/common'; import { GenerateUUIDv4, IOwner, MessageAPI, ModuleStatus, SchemaCategory, TagType, TopicType } from '@guardian/interfaces'; import { emptyNotifier, INotifier } from '../helpers/notifier.js'; import { ISerializedErrors } from '../policy-engine/policy-validation-results-container.js'; @@ -68,11 +68,13 @@ export async function preparePreviewMessage( * @param policyId * @param owner * @param notifier + * @param logger */ export async function validateAndPublish( uuid: string, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ) { notifier.start('Find and validate module'); const item = await DatabaseServer.getModuleByUUID(uuid); @@ -90,7 +92,7 @@ export async function validateAndPublish( const isValid = !errors.blocks.some(block => !block.isValid); notifier.completed(); if (isValid) { - const newModule = await publishModule(item, user, notifier); + const newModule = await publishModule(item, user, notifier, logger); return { item: newModule, isValid, errors }; } else { return { item, isValid, errors }; @@ -114,14 +116,14 @@ export async function validateModel(module: PolicyModule): Promise { - const logger = new Logger(); - logger.info('Publish module', ['GUARDIAN_SERVICE']); notifier.start('Resolve Hedera account'); const users = new Users(); @@ -184,7 +186,7 @@ export async function publishModule( /** * Connect to the message broker methods of working with modules. */ -export async function modulesAPI(): Promise { +export async function modulesAPI(logger: PinoLogger): Promise { /** * Create new module * @@ -208,7 +210,7 @@ export async function modulesAPI(): Promise { const item = await DatabaseServer.createModules(module); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -242,7 +244,7 @@ export async function modulesAPI(): Promise { return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -281,7 +283,7 @@ export async function modulesAPI(): Promise { return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -300,7 +302,7 @@ export async function modulesAPI(): Promise { await DatabaseServer.removeModule(item); return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -326,7 +328,7 @@ export async function modulesAPI(): Promise { } return new MessageResponse(items); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -354,7 +356,7 @@ export async function modulesAPI(): Promise { const result = await DatabaseServer.updateModule(item); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -372,7 +374,7 @@ export async function modulesAPI(): Promise { } return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -401,7 +403,7 @@ export async function modulesAPI(): Promise { }); return new BinaryMessageResponse(file); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -427,7 +429,7 @@ export async function modulesAPI(): Promise { owner: item.owner }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -442,7 +444,7 @@ export async function modulesAPI(): Promise { const preview = await ModuleImportExport.parseZipFile(Buffer.from(zip.data)); return new MessageResponse(preview); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -454,7 +456,7 @@ export async function modulesAPI(): Promise { const preview = await preparePreviewMessage(messageId, owner, emptyNotifier()); return new MessageResponse(preview); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -499,7 +501,7 @@ export async function modulesAPI(): Promise { return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -563,7 +565,7 @@ export async function modulesAPI(): Promise { } return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -572,14 +574,14 @@ export async function modulesAPI(): Promise { async (msg: { uuid: string, owner: IOwner, module: PolicyModule }) => { try { const { uuid, owner } = msg; - const result = await validateAndPublish(uuid, owner, emptyNotifier()); + const result = await validateAndPublish(uuid, owner, emptyNotifier(), logger); return new MessageResponse({ module: result.item, isValid: result.isValid, errors: result.errors, }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -594,7 +596,7 @@ export async function modulesAPI(): Promise { module }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/permission.service.ts b/guardian-service/src/api/permission.service.ts index 4da8ba76ad..0218184c5e 100644 --- a/guardian-service/src/api/permission.service.ts +++ b/guardian-service/src/api/permission.service.ts @@ -3,7 +3,6 @@ import { DataBaseHelper, GuardianRoleMessage, IAuthUser, - Logger, MessageAction, MessageError, MessageResponse, @@ -15,9 +14,15 @@ import { Schema as SchemaCollection, VcDocument as VcDocumentCollection, UserPermissionsMessage, + PinoLogger, + KeyType, + KEY_TYPE_KEY_ENTITY, + KeyEntity, + Token, } from '@guardian/common'; import { GenerateUUIDv4, IOwner, MessageAPI, Schema, SchemaEntity, SchemaHelper, TopicType } from '@guardian/interfaces'; import { publishSystemSchema } from './helpers/index.js'; +import { emptyNotifier } from '../helpers/notifier.js'; async function getSchema( entity: SchemaEntity, @@ -44,7 +49,8 @@ async function getSchema( schema, owner, messageServer, - MessageAction.PublishSystemSchema + MessageAction.PublishSystemSchema, + emptyNotifier() ); const result = await new DataBaseHelper(SchemaCollection).save(item); return result; @@ -134,7 +140,7 @@ export async function serDefaultRole(user: IAuthUser, owner: IOwner): Promise { +export async function permissionAPI(logger: PinoLogger): Promise { ApiResponse(MessageAPI.CREATE_ROLE, async (msg: { role: any, owner: IOwner }) => { try { @@ -166,7 +172,7 @@ export async function permissionAPI(): Promise { }); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -202,7 +208,7 @@ export async function permissionAPI(): Promise { }); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -238,7 +244,7 @@ export async function permissionAPI(): Promise { }); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -250,7 +256,47 @@ export async function permissionAPI(): Promise { const result = await serDefaultRole(user, owner); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + ApiResponse(MessageAPI.CHECK_KEY_PERMISSIONS, + async (msg: { did: string, keyType: KeyType, entityId: string }) => { + try { + const { did, keyType, entityId } = msg; + + const entity = KEY_TYPE_KEY_ENTITY.get(keyType); + if (!entity) { + return new MessageResponse(false); + } + + switch (entity) { + case KeyEntity.KEY: + return new MessageResponse(did === entityId); + case KeyEntity.DID: + return new MessageResponse( + did === entityId?.split('#')[0] + ); + case KeyEntity.TOKEN: + return new MessageResponse( + await new DataBaseHelper(Token).count({ + owner: did, + tokenId: entityId + }) > 0 + ); + case KeyEntity.TOPIC: + return new MessageResponse( + await new DataBaseHelper(Topic).count({ + owner: did, + topicId: entityId + }) > 0 + ); + default: + return new MessageResponse(false); + } + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/profile.service.ts b/guardian-service/src/api/profile.service.ts index 0e5d29a26a..f5caae0af7 100644 --- a/guardian-service/src/api/profile.service.ts +++ b/guardian-service/src/api/profile.service.ts @@ -12,11 +12,10 @@ import { HederaEd25519Method, IAuthUser, KeyType, - Logger, MessageAction, MessageError, MessageResponse, - MessageServer, + MessageServer, PinoLogger, RegistrationMessage, RunFunctionAsync, Schema as SchemaCollection, @@ -29,7 +28,7 @@ import { VcHelper, VCMessage, Wallet, - Workers + Workers, } from '@guardian/common'; import { emptyNotifier, initNotifier, INotifier } from '../helpers/notifier.js'; import { RestoreDataFromHedera } from '../helpers/restore-data-from-hedera.js'; @@ -95,11 +94,13 @@ async function getGlobalTopic(): Promise { * @param username * @param profile * @param notifier + * @param logger */ async function setupUserProfile( username: string, profile: ICredentials, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { const users = new Users(); const wallet = new Wallet(); @@ -113,10 +114,10 @@ async function setupUserProfile( let did: string; if (user.role === UserRole.STANDARD_REGISTRY) { profile.entity = SchemaEntity.STANDARD_REGISTRY; - did = await createUserProfile(profile, notifier, user); + did = await createUserProfile(profile, notifier, user, logger); } else if (user.role === UserRole.USER) { profile.entity = SchemaEntity.USER; - did = await createUserProfile(profile, notifier, user); + did = await createUserProfile(profile, notifier, user, logger); } else { throw new Error('Unknown user role.'); } @@ -132,7 +133,7 @@ async function setupUserProfile( notifier.completedAndStart('Update permissions'); if (user.role === UserRole.USER) { const changeRole = await users.setDefaultUserRole(username, profile.parent); - await serDefaultRole(changeRole, EntityOwner.sr(profile.parent)) + await serDefaultRole(changeRole, EntityOwner.sr(null, profile.parent)) } notifier.completedAndStart('Set up wallet'); @@ -180,9 +181,8 @@ async function checkAndPublishSchema( userDID: string, srUser: IOwner, messageServer: MessageServer, - logger: Logger, - notifier: INotifier, - userId?: string + logger: PinoLogger, + notifier: INotifier ): Promise { let schema = await new DataBaseHelper(SchemaCollection).findOne({ entity, @@ -200,7 +200,7 @@ async function checkAndPublishSchema( logger.info(`Publish System Schema (${entity})`, ['GUARDIAN_SERVICE']); schema.creator = userDID; schema.owner = userDID; - const item = await publishSystemSchema(schema, srUser, messageServer, MessageAction.PublishSystemSchema); + const item = await publishSystemSchema(schema, srUser, messageServer, MessageAction.PublishSystemSchema, notifier); await new DataBaseHelper(SchemaCollection).save(item); } } @@ -211,13 +211,14 @@ async function checkAndPublishSchema( * @param profile * @param notifier * @param user + * @param logger */ async function createUserProfile( profile: ICredentials, notifier: INotifier, - user: IAuthUser + user: IAuthUser, + logger: PinoLogger ): Promise { - const logger = new Logger(); const { hederaAccountId, hederaAccountKey, @@ -244,6 +245,7 @@ async function createUserProfile( } } const messageServer = new MessageServer(hederaAccountId, hederaAccountKey, signOptions); + console.log('hederaAccountId', hederaAccountId); // ------------------------ // <-- Check hedera key @@ -346,7 +348,7 @@ async function createUserProfile( notifier.completedAndStart('Publish Schema'); let schemaObject: Schema; try { - const srUser: IOwner = EntityOwner.sr(userDID); + const srUser: IOwner = EntityOwner.sr(user.id.toString(), userDID); await checkAndPublishSchema( SchemaEntity.STANDARD_REGISTRY, topicConfig, @@ -354,8 +356,7 @@ async function createUserProfile( srUser, messageServer, logger, - notifier, - user.id.toString() + notifier ); await checkAndPublishSchema( SchemaEntity.USER, @@ -364,8 +365,7 @@ async function createUserProfile( srUser, messageServer, logger, - notifier, - user.id.toString() + notifier ); await checkAndPublishSchema( SchemaEntity.RETIRE_TOKEN, @@ -374,8 +374,7 @@ async function createUserProfile( srUser, messageServer, logger, - notifier, - user.id.toString() + notifier ); await checkAndPublishSchema( SchemaEntity.ROLE, @@ -384,8 +383,7 @@ async function createUserProfile( srUser, messageServer, logger, - notifier, - user.id.toString() + notifier ); await checkAndPublishSchema( SchemaEntity.USER_PERMISSIONS, @@ -394,8 +392,7 @@ async function createUserProfile( srUser, messageServer, logger, - notifier, - user.id.toString() + notifier ); if (entity) { const schema = await new DataBaseHelper(SchemaCollection).findOne({ @@ -481,7 +478,7 @@ async function createUserProfile( // ----------------------- if (user.role === UserRole.STANDARD_REGISTRY) { messageServer.setTopicObject(topicConfig); - await createDefaultRoles(userDID, currentDidDocument, messageServer, notifier, user.id.toString()); + await createDefaultRoles(user.id.toString(), userDID, currentDidDocument, messageServer, notifier); } notifier.completed(); @@ -494,17 +491,16 @@ async function createUserProfile( * @param didDocument * @param messageServer * @param notifier - * @param userId */ async function createDefaultRoles( + userId: string, did: string, didDocument: CommonDidDocument, messageServer: MessageServer, - notifier: INotifier, - userId?: string + notifier: INotifier ): Promise { notifier.completedAndStart('Create roles'); - const owner = EntityOwner.sr(did); + const owner = EntityOwner.sr(userId, did); const users = new Users(); const vcHelper = new VcHelper(); const roles = [{ @@ -606,7 +602,7 @@ export class ProfileController { /** * Connect to the message broker methods of working with Address books. */ -export function profileAPI() { +export function profileAPI(logger: PinoLogger) { ApiResponse(MessageAPI.GET_BALANCE, async (msg: { username: string }) => { try { @@ -641,7 +637,7 @@ export function profileAPI() { } : null }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error, 500); } @@ -677,7 +673,7 @@ export function profileAPI() { return new MessageResponse(balance); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error, 500); } @@ -695,10 +691,10 @@ export function profileAPI() { return new MessageError('Invalid Hedera Account Key', 403); } - const did = await setupUserProfile(username, profile, emptyNotifier()); + const did = await setupUserProfile(username, profile, emptyNotifier(), logger); return new MessageResponse(did); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error, 500); } @@ -719,10 +715,10 @@ export function profileAPI() { return; } - const did = await setupUserProfile(username, profile, notifier); + const did = await setupUserProfile(username, profile, notifier, logger); notifier.result(did); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -776,12 +772,13 @@ export function profileAPI() { hederaAccountId, hederaAccountKey, topicId, - oldDidDocument + oldDidDocument, + logger ) notifier.completed(); notifier.result('did'); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -831,7 +828,7 @@ export function profileAPI() { notifier.completed(); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -882,7 +879,7 @@ export function profileAPI() { } return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -911,7 +908,7 @@ export function profileAPI() { return new MessageResponse(keys); } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/projects.service.ts b/guardian-service/src/api/projects.service.ts index d7c7094452..92956a7a2e 100644 --- a/guardian-service/src/api/projects.service.ts +++ b/guardian-service/src/api/projects.service.ts @@ -1,12 +1,12 @@ import { ApiResponse } from '../api/helpers/api-response.js'; import { DatabaseServer, - Logger, MessageError, MessageResponse, Policy, VcDocument, - VcDocumentDefinition + VcDocumentDefinition, + PinoLogger } from '@guardian/common'; import { MessageAPI, Schema, SchemaField } from '@guardian/interfaces'; @@ -80,7 +80,7 @@ export async function getProjectsData(documents: VcDocument[], allPolicies: Poli /** * Connect to the message broker methods of working with projects. */ -export async function projectsAPI(): Promise { +export async function projectsAPI(logger: PinoLogger): Promise { ApiResponse(MessageAPI.SEARCH_PROJECTS, async (msg: { categoryIds: string[], policyIds: string[] }) => { try { @@ -134,7 +134,7 @@ export async function projectsAPI(): Promise { return new MessageResponse(projects); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -144,7 +144,7 @@ export async function projectsAPI(): Promise { const policyCategories = await DatabaseServer.getPolicyCategories(); return new MessageResponse(policyCategories); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -155,7 +155,7 @@ export async function projectsAPI(): Promise { return new MessageResponse(policyProperties); } catch (error) { console.log(error); - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/record.service.ts b/guardian-service/src/api/record.service.ts index c9f0de0201..73e2417193 100644 --- a/guardian-service/src/api/record.service.ts +++ b/guardian-service/src/api/record.service.ts @@ -4,13 +4,12 @@ import { BinaryMessageResponse, DatabaseServer, IRecordResult, - Logger, MessageError, - MessageResponse, + MessageResponse, PinoLogger, Policy, RecordImportExport, } from '@guardian/common'; -import { IOwner, MessageAPI, PolicyEvents, PolicyType } from '@guardian/interfaces'; +import { IOwner, MessageAPI, PolicyEvents, PolicyHelper } from '@guardian/interfaces'; import { GuardiansService } from '../helpers/guardians.js'; /** @@ -43,6 +42,35 @@ export async function compareResults(details: any): Promise { } } +/** + * Compare results + * @param policyId + * @param owner + */ +export async function getDetails(details: any): Promise { + const report = await compareResults(details); + const total = report?.total; + const info = report?.right; + const table = report?.documents?.report || []; + + const documents = []; + for (let i = 1; i < table.length; i++) { + const row = table[i]; + if (row.right) { + const index = row.right.attributes; + const document = details?.documents?.[index]; + documents.push({ + type: row.document_type, + rate: row.total_rate, + schema: row.right_schema, + document + }) + } + } + + return { info, total, details, documents }; +} + /** * Check policy * @param policyId @@ -59,7 +87,7 @@ export async function checkPolicy( if (model.owner !== user.owner) { throw new Error('Invalid owner.'); } - if (model.status !== PolicyType.DRY_RUN) { + if (!PolicyHelper.isDryRunMode(model)) { throw new Error(`Policy is not in Dry Run`); } return model; @@ -68,7 +96,7 @@ export async function checkPolicy( /** * Connect to the message broker methods of working with records. */ -export async function recordAPI(): Promise { +export async function recordAPI(logger: PinoLogger): Promise { /** * Get recording or running status * @@ -89,7 +117,7 @@ export async function recordAPI(): Promise { .sendPolicyMessage(PolicyEvents.GET_RECORD_STATUS, policyId, null); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -114,7 +142,7 @@ export async function recordAPI(): Promise { .sendPolicyMessage(PolicyEvents.START_RECORDING, policyId, options); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -155,7 +183,7 @@ export async function recordAPI(): Promise { }); return new BinaryMessageResponse(file); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -180,7 +208,7 @@ export async function recordAPI(): Promise { .sendPolicyMessage(PolicyEvents.GET_RECORDED_ACTIONS, policyId, null); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -215,7 +243,7 @@ export async function recordAPI(): Promise { }); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -242,7 +270,7 @@ export async function recordAPI(): Promise { .sendPolicyMessage(PolicyEvents.STOP_RUNNING, policyId, options); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -268,34 +296,10 @@ export async function recordAPI(): Promise { const details: any = await guardiansService .sendPolicyMessage(PolicyEvents.GET_RECORD_RESULTS, policyId, null); - const report = await compareResults(details); - const total = report?.total; - const info = report?.right; - const table = report?.documents?.report || []; - - const documents = []; - for (let i = 1; i < table.length; i++) { - const row = table[i]; - if (row.right) { - const index = row.right.attributes; - const document = details?.documents?.[index]; - documents.push({ - type: row.document_type, - rate: row.total_rate, - schema: row.right_schema, - document - }) - } - } - - return new MessageResponse({ - info, - total, - details, - documents - }); + const result = await getDetails(details); + return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -324,7 +328,7 @@ export async function recordAPI(): Promise { const result = await compareResults(details); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -351,7 +355,7 @@ export async function recordAPI(): Promise { .sendPolicyMessage(PolicyEvents.FAST_FORWARD, policyId, options); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -378,7 +382,7 @@ export async function recordAPI(): Promise { .sendPolicyMessage(PolicyEvents.RECORD_RETRY_STEP, policyId, options); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -405,7 +409,7 @@ export async function recordAPI(): Promise { .sendPolicyMessage(PolicyEvents.RECORD_SKIP_STEP, policyId, options); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/schema.service.ts b/guardian-service/src/api/schema.service.ts index ea97e1e8ed..36578dff02 100644 --- a/guardian-service/src/api/schema.service.ts +++ b/guardian-service/src/api/schema.service.ts @@ -1,9 +1,9 @@ import { ApiResponse } from '../api/helpers/api-response.js'; import { emptyNotifier, initNotifier } from '../helpers/notifier.js'; import { Controller } from '@nestjs/common'; -import { BinaryMessageResponse, DatabaseServer, GenerateBlocks, JsonToXlsx, Logger, MessageError, MessageResponse, RunFunctionAsync, Users, XlsxToJson } from '@guardian/common'; +import { BinaryMessageResponse, DatabaseServer, GenerateBlocks, JsonToXlsx, MessageError, MessageResponse, PinoLogger, RunFunctionAsync, Users, XlsxToJson } from '@guardian/common'; import { IOwner, ISchema, MessageAPI, ModuleStatus, Schema, SchemaCategory, SchemaHelper, SchemaNode, SchemaStatus, TopicType } from '@guardian/interfaces'; -import { checkForCircularDependency, copySchemaAsync, createSchemaAndArtifacts, exportSchemas, findAndPublishSchema, getPageOptions, getSchemaCategory, getSchemaTarget, importSchemaByFiles, importSchemasByMessages, importSubTools, importTagsByFiles, prepareSchemaPreview, previewToolByMessage, updateSchemaDefs, updateToolConfig } from './helpers/index.js'; +import { SchemaImportExportHelper, checkForCircularDependency, deleteSchema, copySchemaAsync, createSchemaAndArtifacts, findAndPublishSchema, getPageOptions, getSchemaCategory, getSchemaTarget, importSubTools, importTagsByFiles, prepareSchemaPreview, previewToolByMessage, updateSchemaDefs, updateToolConfig } from './helpers/index.js'; import { PolicyImportExportHelper } from '../policy-engine/helpers/policy-import-export-helper.js'; import { readFile } from 'fs/promises'; import path from 'path'; @@ -15,7 +15,7 @@ export class SchemaService { } /** * Connect to the message broker methods of working with schemas. */ -export async function schemaAPI(): Promise { +export async function schemaAPI(logger: PinoLogger): Promise { /** * Create schema * @@ -31,7 +31,7 @@ export async function schemaAPI(): Promise { const schemas = await DatabaseServer.getSchemas({ owner: owner.owner }, { limit: 100 }); return new MessageResponse(schemas); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -44,7 +44,7 @@ export async function schemaAPI(): Promise { const schema = await createSchemaAndArtifacts(item.category, item, owner, notifier); notifier.result(schema.id); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); @@ -64,7 +64,7 @@ export async function schemaAPI(): Promise { const schema = await copySchemaAsync(iri, topicId, name, owner); notifier.result(schema.iri); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); @@ -102,7 +102,7 @@ export async function schemaAPI(): Promise { const schemas = await DatabaseServer.getSchemas({ owner: owner.owner }, { limit: 100 }); return new MessageResponse(schemas); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -131,7 +131,7 @@ export async function schemaAPI(): Promise { } return new MessageError('Invalid load schema parameter'); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -178,7 +178,7 @@ export async function schemaAPI(): Promise { ] })); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -242,7 +242,7 @@ export async function schemaAPI(): Promise { } return new MessageResponse(await createNode(schema)); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -332,7 +332,7 @@ export async function schemaAPI(): Promise { const [items, count] = await DatabaseServer.getSchemasAndCount(filter, otherOptions); return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -424,7 +424,7 @@ export async function schemaAPI(): Promise { return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -449,7 +449,7 @@ export async function schemaAPI(): Promise { }); return new MessageResponse(items); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -521,7 +521,7 @@ export async function schemaAPI(): Promise { } return new MessageResponse(schemas); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -543,12 +543,10 @@ export async function schemaAPI(): Promise { const { id, version, owner } = msg; const users = new Users(); const root = await users.getHederaAccount(owner.creator); - const userAccount = await users.getUser(owner.username); - const userId = userAccount.id.toString(); - const item = await findAndPublishSchema(id, version, owner, root, emptyNotifier(), userId); + const item = await findAndPublishSchema(id, version, owner, root, emptyNotifier()); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error); } @@ -566,12 +564,10 @@ export async function schemaAPI(): Promise { notifier.completedAndStart('Resolve Hedera account'); const users = new Users(); const root = await users.getHederaAccount(owner.creator); - const userAccount = await users.getUser(owner.username); - const userId = userAccount.id.toString(); - const item = await findAndPublishSchema(id, version, owner, root, notifier, userId); + const item = await findAndPublishSchema(id, version, owner, root, notifier); notifier.result(item.id); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); @@ -631,11 +627,7 @@ export async function schemaAPI(): Promise { ); } - // const users = new Users(); - // const userAccount = await users.getUser(owner.username); - // const userId = userAccount.id.toString(); - // - // await deleteSchema(id, owner, emptyNotifier()); + await deleteSchema(id, owner, emptyNotifier()); if (needResult) { const schemas = await DatabaseServer.getSchemas(null, { limit: 100 }); @@ -667,12 +659,20 @@ export async function schemaAPI(): Promise { } const category = await getSchemaCategory(topicId); - const schemasMap = await importSchemasByMessages( - category, owner, messageIds, topicId, emptyNotifier() + + const schemasMap = await SchemaImportExportHelper.importSchemasByMessages( + messageIds, + owner, + { + category, + topicId + }, + emptyNotifier(), + logger ); return new MessageResponse(schemasMap); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error); } @@ -691,12 +691,20 @@ export async function schemaAPI(): Promise { } const category = await getSchemaCategory(topicId); - const schemasMap = await importSchemasByMessages( - category, owner, messageIds, topicId, notifier + + const schemasMap = await SchemaImportExportHelper.importSchemasByMessages( + messageIds, + owner, + { + category, + topicId + }, + notifier, + logger ); notifier.result(schemasMap); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); @@ -723,18 +731,20 @@ export async function schemaAPI(): Promise { const notifier = emptyNotifier(); const category = await getSchemaCategory(topicId); - let result = await importSchemaByFiles( - category, - owner, + let result = await SchemaImportExportHelper.importSchemaByFiles( schemas, - topicId, + owner, + { + category, + topicId + }, notifier ); result = await importTagsByFiles(result, tags, notifier); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error); } @@ -755,18 +765,20 @@ export async function schemaAPI(): Promise { } const category = await getSchemaCategory(topicId); - let result = await importSchemaByFiles( - category, - owner, + let result = await SchemaImportExportHelper.importSchemaByFiles( schemas, - topicId, + owner, + { + category, + topicId + }, notifier ); result = await importTagsByFiles(result, tags, notifier); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); @@ -795,10 +807,10 @@ export async function schemaAPI(): Promise { return new MessageError('Invalid preview schema parameters'); } - const result = await prepareSchemaPreview(messageIds, emptyNotifier()); + const result = await prepareSchemaPreview(messageIds, emptyNotifier(), logger); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error); } @@ -825,10 +837,10 @@ export async function schemaAPI(): Promise { return; } - const result = await prepareSchemaPreview(messageIds, notifier); + const result = await prepareSchemaPreview(messageIds, notifier, logger); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -846,10 +858,10 @@ export async function schemaAPI(): Promise { ApiResponse(MessageAPI.EXPORT_SCHEMAS, async (msg: { ids: string[], owner: IOwner }) => { try { - const { ids, owner } = msg; - return new MessageResponse(await exportSchemas(ids, owner)); + const { ids } = msg; + return new MessageResponse(await SchemaImportExportHelper.exportSchemas(ids)); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -881,7 +893,7 @@ export async function schemaAPI(): Promise { const result = await DatabaseServer.createAndSaveSchema(schemaObject); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -923,7 +935,7 @@ export async function schemaAPI(): Promise { count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -942,7 +954,7 @@ export async function schemaAPI(): Promise { return new MessageError('Invalid load schema parameter'); } - const {fields, pageIndex, pageSize } = msg; + const { fields, pageIndex, pageSize } = msg; const filter: any = { where: { system: true @@ -966,7 +978,7 @@ export async function schemaAPI(): Promise { count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1020,7 +1032,7 @@ export async function schemaAPI(): Promise { }); return new MessageResponse(schema); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1056,7 +1068,7 @@ export async function schemaAPI(): Promise { }); return new MessageResponse(schema); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1085,7 +1097,7 @@ export async function schemaAPI(): Promise { const [items, count] = await DatabaseServer.getSchemasAndCount(filter, otherOptions); return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1115,7 +1127,7 @@ export async function schemaAPI(): Promise { return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1152,7 +1164,7 @@ export async function schemaAPI(): Promise { const result = await DatabaseServer.createAndSaveSchema(schemaObject); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1173,12 +1185,10 @@ export async function schemaAPI(): Promise { const { id, version, owner } = msg; const users = new Users(); const root = await users.getHederaAccount(owner.creator); - const userAccount = await users.getUser(owner.username); - const userId = userAccount.id.toString(); - const item = await findAndPublishSchema(id, version, owner, root, emptyNotifier(), userId); + const item = await findAndPublishSchema(id, version, owner, root, emptyNotifier()); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1209,7 +1219,7 @@ export async function schemaAPI(): Promise { }); return new MessageResponse(schemas); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1220,12 +1230,12 @@ export async function schemaAPI(): Promise { ApiResponse(MessageAPI.SCHEMA_EXPORT_XLSX, async (msg: { owner: IOwner, ids: string[] }) => { try { - const { owner, ids } = msg; - const schemas = await exportSchemas(ids, owner); + const { ids } = msg; + const schemas = await SchemaImportExportHelper.exportSchemas(ids); const buffer = await JsonToXlsx.generate(schemas, [], []); return new BinaryMessageResponse(buffer); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1260,20 +1270,22 @@ export async function schemaAPI(): Promise { xlsxResult.addErrors(errors); GenerateBlocks.generate(xlsxResult); - const result = await importSchemaByFiles( - category, - owner, + const result = await SchemaImportExportHelper.importSchemaByFiles( xlsxResult.schemas, - topicId, - notifier, - true + owner, + { + category, + topicId, + skipGenerateId: true + }, + notifier ); if (category === SchemaCategory.TOOL) { await updateToolConfig(target); await DatabaseServer.updateTool(target); } else if (category === SchemaCategory.POLICY) { - await PolicyImportExportHelper.updatePolicyComponents(target); + await PolicyImportExportHelper.updatePolicyComponents(target, logger); } return new MessageResponse({ @@ -1281,7 +1293,7 @@ export async function schemaAPI(): Promise { errors: result.errors }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1303,7 +1315,7 @@ export async function schemaAPI(): Promise { throw new Error('Unknown target'); } - new Logger().info(`Import policy by xlsx`, ['GUARDIAN_SERVICE']); + await logger.info(`Import policy by xlsx`, ['GUARDIAN_SERVICE']); const users = new Users(); const root = await users.getHederaAccount(owner.creator); notifier.start('File parsing'); @@ -1318,20 +1330,22 @@ export async function schemaAPI(): Promise { xlsxResult.updatePolicy(target); xlsxResult.addErrors(errors); GenerateBlocks.generate(xlsxResult); - const result = await importSchemaByFiles( - category, - owner, + const result = await SchemaImportExportHelper.importSchemaByFiles( xlsxResult.schemas, - topicId, - notifier, - true + owner, + { + category, + topicId, + skipGenerateId: true + }, + notifier ); if (category === SchemaCategory.TOOL) { await updateToolConfig(target); await DatabaseServer.updateTool(target); } else if (category === SchemaCategory.POLICY) { - await PolicyImportExportHelper.updatePolicyComponents(target); + await PolicyImportExportHelper.updatePolicyComponents(target, logger); } notifier.result({ @@ -1339,7 +1353,7 @@ export async function schemaAPI(): Promise { errors: result.errors }); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); @@ -1373,7 +1387,7 @@ export async function schemaAPI(): Promise { return new MessageResponse(xlsxResult.toJson()); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1389,7 +1403,7 @@ export async function schemaAPI(): Promise { const file = await readFile(filePath); return new BinaryMessageResponse(file.buffer); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/tag.service.ts b/guardian-service/src/api/tag.service.ts index 23134e1fd6..d54fda0fc3 100644 --- a/guardian-service/src/api/tag.service.ts +++ b/guardian-service/src/api/tag.service.ts @@ -1,17 +1,17 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { DatabaseServer, Logger, MessageAction, MessageError, MessageResponse, MessageServer, MessageType, Policy as PolicyCollection, PolicyModule as ModuleCollection, PolicyTool as PolicyToolCollection, Schema as SchemaCollection, Tag, TagMessage, Token as TokenCollection, TopicConfig, UrlType, Users, VcHelper, } from '@guardian/common'; +import { DatabaseServer, MessageAction, MessageError, MessageResponse, MessageServer, MessageType, PinoLogger, Policy as PolicyCollection, PolicyModule as ModuleCollection, PolicyTool as PolicyToolCollection, Schema as SchemaCollection, Tag, TagMessage, Token as TokenCollection, TopicConfig, UrlType, Users, VcHelper } from '@guardian/common'; import { GenerateUUIDv4, IOwner, IRootConfig, MessageAPI, Schema, SchemaCategory, SchemaHelper, SchemaStatus, TagType } from '@guardian/interfaces'; /** * Publish schema tags * @param schema - * @param user - * @param userId + * @param owner + * @param root */ export async function publishSchemaTags( schema: SchemaCollection, - user: IRootConfig, - userId?: string + owner: IOwner, + root: IRootConfig ): Promise { const filter: any = { localTarget: schema.id, @@ -22,12 +22,12 @@ export async function publishSchemaTags( const topic = await DatabaseServer.getTopicById(schema.topicId); const topicConfig = await TopicConfig.fromObject(topic, true); - const messageServer = new MessageServer(user.hederaAccountId, user.hederaAccountKey, user.signOptions) + const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topicConfig); for (const tag of tags) { tag.target = schema.messageId; - await publishTag(tag, messageServer, userId); + await publishTag(tag, messageServer, owner); await DatabaseServer.updateTag(tag); } } @@ -35,13 +35,13 @@ export async function publishSchemaTags( /** * Publish policy tags * @param policy - * @param user - * @param userId + * @param owner + * @param root */ export async function publishPolicyTags( policy: PolicyCollection, - user: IRootConfig, - userId?: string + owner: IOwner, + root: IRootConfig ): Promise { const filter: any = { localTarget: policy.id, @@ -52,12 +52,12 @@ export async function publishPolicyTags( const topic = await DatabaseServer.getTopicById(policy.topicId); const topicConfig = await TopicConfig.fromObject(topic, true); - const messageServer = new MessageServer(user.hederaAccountId, user.hederaAccountKey, user.signOptions) + const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topicConfig); for (const tag of tags) { tag.target = policy.messageId; - await publishTag(tag, messageServer, userId); + await publishTag(tag, messageServer, owner); await DatabaseServer.updateTag(tag); } } @@ -65,13 +65,13 @@ export async function publishPolicyTags( /** * Publish token tags * @param token - * @param user - * @param userId + * @param owner + * @param root */ export async function publishTokenTags( token: TokenCollection, - user: IRootConfig, - userId?: string + owner: IOwner, + root: IRootConfig ): Promise { const filter: any = { localTarget: token.id, @@ -82,12 +82,12 @@ export async function publishTokenTags( const topic = await DatabaseServer.getTopicById(token.topicId); const topicConfig = await TopicConfig.fromObject(topic, true); - const messageServer = new MessageServer(user.hederaAccountId, user.hederaAccountKey, user.signOptions) + const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topicConfig); for (const tag of tags) { tag.target = token.tokenId; - await publishTag(tag, messageServer, userId); + await publishTag(tag, messageServer, owner); await DatabaseServer.updateTag(tag); } } @@ -95,13 +95,13 @@ export async function publishTokenTags( /** * Publish tool tags * @param tool - * @param user - * @param userId + * @param owner + * @param root */ export async function publishToolTags( tool: PolicyToolCollection, - user: IRootConfig, - userId?: string + owner: IOwner, + root: IRootConfig ): Promise { const filter: any = { localTarget: tool.id, @@ -111,11 +111,11 @@ export async function publishToolTags( const tags = await DatabaseServer.getTags(filter); const topic = await DatabaseServer.getTopicById(tool.tagsTopicId); const topicConfig = await TopicConfig.fromObject(topic, true); - const messageServer = new MessageServer(user.hederaAccountId, user.hederaAccountKey, user.signOptions) + const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topicConfig); for (const tag of tags) { tag.target = tool.tagsTopicId; - await publishTag(tag, messageServer, userId); + await publishTag(tag, messageServer, owner); await DatabaseServer.updateTag(tag); } } @@ -123,13 +123,13 @@ export async function publishToolTags( /** * Publish module tags * @param module - * @param user - * @param userId + * @param owner + * @param root */ export async function publishModuleTags( module: ModuleCollection, - user: IRootConfig, - userId?: string + owner: IOwner, + root: IRootConfig ): Promise { const filter: any = { localTarget: module.id, @@ -140,12 +140,12 @@ export async function publishModuleTags( const topic = await DatabaseServer.getTopicById(module.topicId); const topicConfig = await TopicConfig.fromObject(topic, true); - const messageServer = new MessageServer(user.hederaAccountId, user.hederaAccountKey, user.signOptions) + const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topicConfig); for (const tag of tags) { tag.target = module.messageId; - await publishTag(tag, messageServer, userId); + await publishTag(tag, messageServer, owner); await DatabaseServer.updateTag(tag); } } @@ -154,12 +154,12 @@ export async function publishModuleTags( * Publish tag * @param item * @param messageServer - * @param userId + * @param owner */ export async function publishTag( item: Tag, messageServer: MessageServer, - userId?: string + owner: IOwner ): Promise { item.operation = 'Create'; item.status = 'Published'; @@ -167,7 +167,7 @@ export async function publishTag( const message = new TagMessage(MessageAction.PublishTag); message.setDocument(item); const result = await messageServer - .sendMessage(message, true, null, userId); + .sendMessage(message, true, null, owner.id); const messageId = result.getId(); const topicId = result.getTopicId(); item.messageId = messageId; @@ -180,12 +180,12 @@ export async function publishTag( * Delete tag * @param item * @param messageServer - * @param userId + * @param owner */ export async function deleteTag( item: Tag, messageServer: MessageServer, - userId?: string + owner: IOwner ): Promise { item.operation = 'Delete'; item.status = 'Published'; @@ -193,7 +193,7 @@ export async function deleteTag( const message = new TagMessage(MessageAction.DeleteTag); message.setDocument(item); const result = await messageServer - .sendMessage(message, true, null, userId); + .sendMessage(message, true, null, owner.id); const messageId = result.getId(); const topicId = result.getTopicId(); item.messageId = messageId; @@ -324,7 +324,7 @@ export async function getTarget(entity: TagType, id: string): Promise<{ /** * Connect to the message broker methods of working with tags. */ -export async function tagsAPI(): Promise { +export async function tagsAPI(logger: PinoLogger): Promise { /** * Create new tag * @@ -379,7 +379,7 @@ export async function tagsAPI(): Promise { const topicConfig = await TopicConfig.fromObject(topic, true); const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topicConfig); - await publishTag(tag, messageServer); + await publishTag(tag, messageServer, owner); } else { tag.target = null; tag.localTarget = target.id; @@ -391,7 +391,7 @@ export async function tagsAPI(): Promise { throw new Error('Invalid target'); } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -412,7 +412,7 @@ export async function tagsAPI(): Promise { const items = await DatabaseServer.getTags(filter); return new MessageResponse(items); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -433,7 +433,7 @@ export async function tagsAPI(): Promise { const items = await DatabaseServer.getTagCache(filter); return new MessageResponse(items); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -511,7 +511,7 @@ export async function tagsAPI(): Promise { const tags = await DatabaseServer.getTags(filter); return new MessageResponse(tags); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -519,28 +519,30 @@ export async function tagsAPI(): Promise { ApiResponse(MessageAPI.DELETE_TAG, async (msg: { uuid: string, owner: IOwner }) => { try { - if (!msg.uuid || !msg.owner) { + const { uuid, owner } = msg; + + if (!uuid || !owner) { return new MessageError('Invalid load tags parameter'); } - const item = await DatabaseServer.getTagById(msg.uuid); - if (!item || item.owner !== msg.owner.creator) { + const item = await DatabaseServer.getTagById(uuid); + if (!item || item.owner !== owner.creator) { throw new Error('Invalid tag'); } await DatabaseServer.removeTag(item); if (item.topicId && item.status === 'Published') { const users = new Users(); - const root = await users.getHederaAccount(msg.owner.creator); + const root = await users.getHederaAccount(owner.creator); const topic = await DatabaseServer.getTopicById(item.topicId); const topicConfig = await TopicConfig.fromObject(topic, true); const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions) .setTopicObject(topicConfig); - await deleteTag(item, messageServer); + await deleteTag(item, messageServer, owner); } return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -566,7 +568,7 @@ export async function tagsAPI(): Promise { } return new MessageResponse(items); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/theme.service.ts b/guardian-service/src/api/theme.service.ts index b6078f544d..730df4af53 100644 --- a/guardian-service/src/api/theme.service.ts +++ b/guardian-service/src/api/theme.service.ts @@ -2,18 +2,18 @@ import { ApiResponse } from '../api/helpers/api-response.js'; import { BinaryMessageResponse, DatabaseServer, - Logger, MessageError, MessageResponse, + PinoLogger, Theme, - ThemeImportExport + ThemeImportExport, } from '@guardian/common'; import { GenerateUUIDv4, IOwner, MessageAPI } from '@guardian/interfaces'; /** * Connect to the message broker methods of working with themes. */ -export async function themeAPI(): Promise { +export async function themeAPI(logger: PinoLogger): Promise { /** * Create new theme * @@ -36,7 +36,7 @@ export async function themeAPI(): Promise { const item = await DatabaseServer.createTheme(theme); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -70,7 +70,7 @@ export async function themeAPI(): Promise { const result = await DatabaseServer.updateTheme(item); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -92,7 +92,7 @@ export async function themeAPI(): Promise { const items = await DatabaseServer.getThemes({ owner: owner.creator }); return new MessageResponse(items); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -114,7 +114,7 @@ export async function themeAPI(): Promise { const item = await DatabaseServer.getTheme({ id: themeId, owner: owner.creator }); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -140,7 +140,7 @@ export async function themeAPI(): Promise { await DatabaseServer.removeTheme(item); return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -173,7 +173,7 @@ export async function themeAPI(): Promise { }); return new BinaryMessageResponse(file); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -211,7 +211,7 @@ export async function themeAPI(): Promise { return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/token.service.ts b/guardian-service/src/api/token.service.ts index 6dc43622e3..34e48e97d5 100644 --- a/guardian-service/src/api/token.service.ts +++ b/guardian-service/src/api/token.service.ts @@ -1,5 +1,5 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { ArrayMessageResponse, DataBaseHelper, DatabaseServer, KeyType, Logger, MessageError, MessageResponse, RunFunctionAsync, Token, TopicHelper, Users, Wallet, Workers, } from '@guardian/common'; +import { ArrayMessageResponse, DataBaseHelper, DatabaseServer, KeyType, MessageError, MessageResponse, PinoLogger, RunFunctionAsync, Token, TopicHelper, Users, Wallet, Workers } from '@guardian/common'; import { GenerateUUIDv4, IOwner, IRootConfig, MessageAPI, OrderDirection, TopicType, WorkerTaskType } from '@guardian/interfaces'; import { emptyNotifier, initNotifier, INotifier } from '../helpers/notifier.js'; import { publishTokenTags } from './tag.service.js'; @@ -196,13 +196,15 @@ async function createToken( * @param newToken * @param tokenRepository * @param notifier + * @param log */ async function updateToken( oldToken: Token, newToken: Token, user: IOwner, tokenRepository: DataBaseHelper, - notifier: INotifier + notifier: INotifier, + log: PinoLogger ): Promise { if (oldToken.draftToken && newToken.draftToken) { notifier.start('Update token'); @@ -225,9 +227,8 @@ async function updateToken( notifier.completedAndStart('Publish tags'); try { - await publishTokenTags(result, root); + await publishTokenTags(result, user, root); } catch (error) { - const log = new Logger(); log.error(error, ['GUARDIAN_SERVICE, TAGS']); } @@ -569,7 +570,7 @@ async function freezeToken( * * @param tokenRepository - table with tokens */ -export async function tokenAPI(tokenRepository: DataBaseHelper): Promise { +export async function tokenAPI(tokenRepository: DataBaseHelper, logger: PinoLogger): Promise { /** * Create new token * @@ -591,7 +592,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const tokens = await tokenRepository.findAll(); return new MessageResponse(tokens); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -608,7 +609,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await createToken(token, owner, tokenRepository, notifier); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -627,9 +628,9 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< throw new Error('Token not found'); } - return new MessageResponse(await updateToken(item, token, owner, tokenRepository, emptyNotifier())); + return new MessageResponse(await updateToken(item, token, owner, tokenRepository, emptyNotifier(), logger)); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -647,10 +648,10 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< throw new Error('Token not found'); } - const result = await updateToken(item, token, owner, tokenRepository, notifier); + const result = await updateToken(item, token, owner, tokenRepository, notifier, logger); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -672,7 +673,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await deleteToken(item, owner, tokenRepository, notifier); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); @@ -685,7 +686,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await freezeToken(tokenId, username, owner, freeze, tokenRepository, emptyNotifier()); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error, 400); } }); @@ -699,7 +700,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await freezeToken(tokenId, username, owner, freeze, tokenRepository, notifier); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -713,7 +714,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await grantKycToken(tokenId, username, owner, grant, tokenRepository, emptyNotifier()); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error, 400); } }); @@ -727,7 +728,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await grantKycToken(tokenId, username, owner, grant, tokenRepository, notifier); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -741,7 +742,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await associateToken(tokenId, owner, associate, tokenRepository, emptyNotifier()); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error, 400); } }) @@ -755,7 +756,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< const result = await associateToken(tokenId, owner, associate, tokenRepository, notifier); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); @@ -797,7 +798,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error, 400); } }) @@ -863,7 +864,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< return new ArrayMessageResponse(result, count); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error, 400); } }) @@ -1038,7 +1039,7 @@ export async function tokenAPI(tokenRepository: DataBaseHelper): Promise< )); return new MessageResponse(serials[tokenId] || []); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error, 400); } }); diff --git a/guardian-service/src/api/tool.service.ts b/guardian-service/src/api/tool.service.ts index 9289c4fa35..4cb8e9bbcf 100644 --- a/guardian-service/src/api/tool.service.ts +++ b/guardian-service/src/api/tool.service.ts @@ -1,5 +1,5 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { BinaryMessageResponse, DatabaseServer, Hashing, Logger, MessageAction, MessageError, MessageResponse, MessageServer, MessageType, PolicyTool, replaceAllEntities, replaceAllVariables, RunFunctionAsync, SchemaFields, ToolImportExport, ToolMessage, TopicConfig, TopicHelper, Users } from '@guardian/common'; +import { BinaryMessageResponse, DatabaseServer, Hashing, MessageAction, MessageError, MessageResponse, MessageServer, MessageType, PinoLogger, PolicyTool, replaceAllEntities, replaceAllVariables, RunFunctionAsync, SchemaFields, ToolImportExport, ToolMessage, TopicConfig, TopicHelper, Users } from '@guardian/common'; import { IOwner, IRootConfig, MessageAPI, ModuleStatus, SchemaStatus, TopicType } from '@guardian/interfaces'; import { emptyNotifier, initNotifier, INotifier } from '../helpers/notifier.js'; import { findAndPublishSchema } from '../api/helpers/schema-publish-helper.js'; @@ -72,11 +72,13 @@ export async function preparePreviewMessage( * @param id * @param owner * @param notifier + * @param logger */ export async function validateAndPublish( id: string, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ) { notifier.start('Find and validate tool'); const item = await DatabaseServer.getToolById(id); @@ -95,7 +97,7 @@ export async function validateAndPublish( notifier.completed(); if (isValid) { - const newTool = await publishTool(item, user, notifier); + const newTool = await publishTool(item, user, notifier, logger); return { tool: newTool, isValid, errors }; } else { return { tool: item, isValid, errors }; @@ -118,21 +120,20 @@ export async function validateTool(tool: PolicyTool): Promise * @param tool * @param user * @param notifier + * @param logger */ export async function publishTool( tool: PolicyTool, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { try { - const logger = new Logger(); - logger.info('Publish tool', ['GUARDIAN_SERVICE']); + await logger.info('Publish tool', ['GUARDIAN_SERVICE']); notifier.start('Resolve Hedera account'); const users = new Users(); const root = await users.getHederaAccount(user.creator); - const userAccount = await users.getUser(user.username); - const userId = userAccount.id.toString(); notifier.completedAndStart('Find topic'); const topic = await TopicConfig.fromObject(await DatabaseServer.getTopicById(tool.topicId), true); @@ -140,7 +141,7 @@ export async function publishTool( .setTopicObject(topic); notifier.completedAndStart('Publish schemas'); - tool = await publishSchemas(tool, user, root, notifier, userId); + tool = await publishSchemas(tool, user, root, notifier); notifier.completedAndStart('Create tags topic'); const topicHelper = new TopicHelper(root.hederaAccountId, root.hederaAccountKey, root.signOptions); @@ -172,13 +173,13 @@ export async function publishTool( const message = new ToolMessage(MessageType.Tool, MessageAction.PublishTool); message.setDocument(tool, buffer); const result = await messageServer - .sendMessage(message, true, null, userId); + .sendMessage(message, true, null, user.id); notifier.completedAndStart('Publish tags'); try { - await publishToolTags(tool, root, userId); + await publishToolTags(tool, user, root); } catch (error) { - logger.error(error, ['GUARDIAN_SERVICE, TAGS']); + await logger.error(error, ['GUARDIAN_SERVICE, TAGS']); } notifier.completedAndStart('Saving in DB'); @@ -188,7 +189,7 @@ export async function publishTool( notifier.completed(); - logger.info('Published tool', ['GUARDIAN_SERVICE']); + await logger.info('Published tool', ['GUARDIAN_SERVICE']); return retVal } catch (error) { @@ -230,8 +231,7 @@ export async function publishSchemas( schema.version, owner, root, - emptyNotifier(), - userId + emptyNotifier() ); if (Array.isArray(tool.config?.variables)) { for (const variable of tool.config?.variables) { @@ -260,14 +260,15 @@ export async function publishSchemas( * @param owner * @param version * @param notifier + * @param logger */ export async function createTool( json: PolicyTool, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { - const logger = new Logger(); - logger.info('Create Policy', ['GUARDIAN_SERVICE']); + await logger.info('Create Policy', ['GUARDIAN_SERVICE']); notifier.start('Save in DB'); if (json) { delete json._id; @@ -291,7 +292,7 @@ export async function createTool( const root = await users.getHederaAccount(user.creator); notifier.completedAndStart('Create topic'); - logger.info('Create Tool: Create New Topic', ['GUARDIAN_SERVICE']); + await logger.info('Create Tool: Create New Topic', ['GUARDIAN_SERVICE']); const parent = await TopicConfig.fromObject( await DatabaseServer.getTopicByType(user.owner, TopicType.UserTopic), true ); @@ -333,7 +334,7 @@ export async function createTool( /** * Connect to the message broker methods of working with tools. */ -export async function toolsAPI(): Promise { +export async function toolsAPI(logger: PinoLogger): Promise { /** * Create new tool * @@ -348,10 +349,10 @@ export async function toolsAPI(): Promise { throw new Error('Invalid Params'); } const { tool, owner } = msg; - const item = await createTool(tool, owner, emptyNotifier()); + const item = await createTool(tool, owner, emptyNotifier(), logger); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -371,7 +372,7 @@ export async function toolsAPI(): Promise { const { tool, owner, task } = msg; const notifier = await initNotifier(task); RunFunctionAsync(async () => { - const item = await createTool(tool, owner, notifier); + const item = await createTool(tool, owner, notifier, logger); notifier.result(item.id); }, async (error) => { notifier.error(error); @@ -420,7 +421,7 @@ export async function toolsAPI(): Promise { }, otherOptions); return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -460,7 +461,7 @@ export async function toolsAPI(): Promise { return new MessageResponse({ items, count }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -482,7 +483,7 @@ export async function toolsAPI(): Promise { await DatabaseServer.removeTool(item); return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -539,7 +540,7 @@ export async function toolsAPI(): Promise { } return new MessageResponse(tools); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -567,7 +568,7 @@ export async function toolsAPI(): Promise { const result = await DatabaseServer.updateTool(item); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -588,7 +589,7 @@ export async function toolsAPI(): Promise { } return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -620,7 +621,7 @@ export async function toolsAPI(): Promise { }); return new BinaryMessageResponse(file); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -647,7 +648,7 @@ export async function toolsAPI(): Promise { owner: item.owner }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -662,7 +663,7 @@ export async function toolsAPI(): Promise { const preview = await ToolImportExport.parseZipFile(Buffer.from(zip.data)); return new MessageResponse(preview); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -674,7 +675,7 @@ export async function toolsAPI(): Promise { const preview = await preparePreviewMessage(messageId, owner, emptyNotifier()); return new MessageResponse(preview); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -690,13 +691,13 @@ export async function toolsAPI(): Promise { const { tool, errors } = await importToolByFile(owner, preview, emptyNotifier(), metadata); if (errors?.length) { const message = importToolErrors(errors); - new Logger().warn(message, ['GUARDIAN_SERVICE']); + await logger.warn(message, ['GUARDIAN_SERVICE']); return new MessageError(message); } else { return new MessageResponse(tool); } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -720,7 +721,7 @@ export async function toolsAPI(): Promise { notifier.completed(); return new MessageResponse(item); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -738,7 +739,7 @@ export async function toolsAPI(): Promise { if (errors?.length) { const message = importToolErrors(errors); notifier.error(message); - new Logger().warn(message, ['GUARDIAN_SERVICE']); + await logger.warn(message, ['GUARDIAN_SERVICE']); } else { notifier.result({ toolId: tool.id, @@ -771,7 +772,7 @@ export async function toolsAPI(): Promise { if (errors?.length) { const message = importToolErrors(errors); notifier.error(message); - new Logger().warn(message, ['GUARDIAN_SERVICE']); + await logger.warn(message, ['GUARDIAN_SERVICE']); } else { notifier.result({ toolId: tool.id, @@ -788,10 +789,10 @@ export async function toolsAPI(): Promise { async (msg: { id: string, owner: IOwner, tool: PolicyTool }) => { try { const { id, owner } = msg; - const result = await validateAndPublish(id, owner, emptyNotifier()); + const result = await validateAndPublish(id, owner, emptyNotifier(), logger); return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -803,16 +804,16 @@ export async function toolsAPI(): Promise { const notifier = await initNotifier(task); RunFunctionAsync(async () => { - const result = await validateAndPublish(id, owner, notifier); + const result = await validateAndPublish(id, owner, notifier, logger); notifier.result(result); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); return new MessageResponse(task); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -827,7 +828,7 @@ export async function toolsAPI(): Promise { tool }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/api/trust-chain.service.ts b/guardian-service/src/api/trust-chain.service.ts index 7945deab7c..0cc86a7a48 100644 --- a/guardian-service/src/api/trust-chain.service.ts +++ b/guardian-service/src/api/trust-chain.service.ts @@ -1,6 +1,6 @@ import { IChainItem, MessageAPI, SchemaEntity } from '@guardian/interfaces'; import { ApiResponse } from '../api/helpers/api-response.js'; -import { DataBaseHelper, DidDocument, Logger, MessageError, MessageResponse, VcDocument, VpDocument, VpDocumentDefinition as HVpDocument } from '@guardian/common'; +import { DataBaseHelper, DidDocument, MessageError, MessageResponse, PinoLogger, VcDocument, VpDocument, VpDocumentDefinition as HVpDocument } from '@guardian/common'; /** * Get field @@ -55,11 +55,13 @@ function checkPolicy(vcDocument: VcDocument, policyId: string) { * @param didDocumentRepository - table with DID Documents * @param vcDocumentRepository - table with VC Documents * @param vpDocumentRepository - table with VP Documents + * @param logger - pino logger */ export async function trustChainAPI( didDocumentRepository: DataBaseHelper, vcDocumentRepository: DataBaseHelper, - vpDocumentRepository: DataBaseHelper + vpDocumentRepository: DataBaseHelper, + logger: PinoLogger, ): Promise { /** * Search parent by VC or VP Document @@ -277,7 +279,7 @@ export async function trustChainAPI( await getPolicyInfo(chain, null); return new MessageResponse(chain); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error); } diff --git a/guardian-service/src/api/wizard.service.ts b/guardian-service/src/api/wizard.service.ts index 8df26e871c..28ecd004f9 100644 --- a/guardian-service/src/api/wizard.service.ts +++ b/guardian-service/src/api/wizard.service.ts @@ -1,9 +1,9 @@ import { ApiResponse } from '../api/helpers/api-response.js'; -import { DatabaseServer, Logger, MessageError, MessageResponse, RunFunctionAsync, } from '@guardian/common'; +import { DatabaseServer, MessageError, MessageResponse, PinoLogger, RunFunctionAsync } from '@guardian/common'; import { IOwner, IWizardConfig, MessageAPI, SchemaCategory } from '@guardian/interfaces'; import { emptyNotifier, initNotifier } from '../helpers/notifier.js'; import { PolicyEngine } from '../policy-engine/policy-engine.js'; -import { exportSchemas, importSchemaByFiles, } from './helpers/schema-import-export-helper.js'; +import { SchemaImportExportHelper } from './helpers/schema-import-export-helper.js'; import { PolicyWizardHelper } from './helpers/policy-wizard-helper.js'; /** @@ -25,15 +25,16 @@ async function createExistingPolicySchemas( schema.topicId !== policyTopicId ); const schemaToCreateIris = schemasToCreate.map((schema) => schema.iri); - const relationships = await exportSchemas( - schemasToCreate.map((schema) => schema.id), - user + const relationships = await SchemaImportExportHelper.exportSchemas( + schemasToCreate.map((schema) => schema.id) ); - const importResult = await importSchemaByFiles( - SchemaCategory.POLICY, - user, + const importResult = await SchemaImportExportHelper.importSchemaByFiles( relationships, - policyTopicId, + user, + { + category: SchemaCategory.POLICY, + topicId: policyTopicId + }, emptyNotifier() ); const schemasMap = importResult.schemasMap; @@ -71,7 +72,7 @@ async function createExistingPolicySchemas( /** * Connect to the message broker methods of working with wizard. */ -export async function wizardAPI(): Promise { +export async function wizardAPI(logger: PinoLogger): Promise { ApiResponse(MessageAPI.WIZARD_POLICY_CREATE_ASYNC, async (msg: { config: any, owner: IOwner, task: any, saveState: boolean }) => { // tslint:disable-next-line:prefer-const @@ -79,7 +80,7 @@ export async function wizardAPI(): Promise { const notifier = await initNotifier(task); RunFunctionAsync( async () => { - const policyEngine = new PolicyEngine(); + const policyEngine = new PolicyEngine(logger); const wizardHelper = new PolicyWizardHelper(); config = await createExistingPolicySchemas(config, owner); const categories = []; @@ -108,7 +109,8 @@ export async function wizardAPI(): Promise { categories }), owner, - notifier + notifier, + logger ); await policyEngine.setupPolicySchemas( config.schemas.map((schema: any) => schema.iri), @@ -133,7 +135,7 @@ export async function wizardAPI(): Promise { try { // tslint:disable-next-line:prefer-const let { config, owner } = msg; - const policyEngine = new PolicyEngine(); + const policyEngine = new PolicyEngine(logger); const wizardHelper = new PolicyWizardHelper(); config = await createExistingPolicySchemas(config, owner); const policyConfig = wizardHelper.createPolicyConfig(config); @@ -145,7 +147,8 @@ export async function wizardAPI(): Promise { ), }), owner, - emptyNotifier() + emptyNotifier(), + logger ); await policyEngine.setupPolicySchemas( config.schemas.map((schema: any) => schema.iri), @@ -166,7 +169,7 @@ export async function wizardAPI(): Promise { try { // tslint:disable-next-line:prefer-const let { policyId, config, owner } = msg; - const policyEngine = new PolicyEngine(); + const policyEngine = new PolicyEngine(logger); const wizardHelper = new PolicyWizardHelper(); const policy = await DatabaseServer.getPolicy({ owner: owner.owner, @@ -191,7 +194,7 @@ export async function wizardAPI(): Promise { wizardConfig: config, }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); diff --git a/guardian-service/src/app.ts b/guardian-service/src/app.ts index d6dbb6313c..a512d16528 100644 --- a/guardian-service/src/app.ts +++ b/guardian-service/src/app.ts @@ -7,40 +7,13 @@ import { tokenAPI } from './api/token.service.js'; import { trustChainAPI } from './api/trust-chain.service.js'; import { PolicyEngineService } from './policy-engine/policy-engine.service.js'; import { - ApplicationState, - Branding, - COMMON_CONNECTION_CONFIG, - Contract, - DataBaseHelper, - DatabaseServer, - DidDocument, - entities, - Environment, - ExternalEventChannel, - IPFS, - LargePayloadContainer, - Logger, - MessageBrokerChannel, - MessageServer, - Migration, - OldSecretManager, - Policy, - RetirePool, - RetireRequest, - Schema, - SecretManager, - Settings, - Token, - Topic, - TopicMemo, - TransactionLogger, - TransactionLogLvl, - Users, - ValidateConfiguration, - VcDocument, - VpDocument, - WiperRequest, - Workers + AggregateVC, ApplicationState, ApprovalDocument, Artifact, ArtifactChunk, AssignEntity, BlockCache, BlockState, Branding, COMMON_CONNECTION_CONFIG, + Contract, DataBaseHelper, DatabaseServer, DidDocument, DocumentState, DryRun, DryRunFiles, Environment, ExternalDocument, ExternalEventChannel, IPFS, + LargePayloadContainer, MessageBrokerChannel, MessageServer, Migration, MintRequest, MintTransaction, mongoForLoggingInitialization, MultiDocuments, + MultiPolicy, MultiPolicyTransaction, OldSecretManager, PinoLogger, pinoLoggerInitialization, Policy, PolicyCache, PolicyCacheData, PolicyCategory, + PolicyInvitations, PolicyModule, PolicyProperty, PolicyRoles, PolicyTest, PolicyTool, Record, RetirePool, RetireRequest, Schema, SecretManager, + Settings, SplitDocuments, SuggestionsConfig, Tag, TagCache, Theme, Token, Topic, TopicMemo, TransactionLogger, TransactionLogLvl, Users, + ValidateConfiguration, VcDocument, VpDocument, Wallet, WiperRequest, Workers } from '@guardian/common'; import { ApplicationStates, PolicyEvents, PolicyType, WorkerTaskType } from '@guardian/interfaces'; import { AccountId, PrivateKey, TopicId } from '@hashgraph/sdk'; @@ -55,7 +28,6 @@ import { toolsAPI } from './api/tool.service.js'; import { GuardiansService } from './helpers/guardians.js'; import { mapAPI } from './api/map.service.js'; import { tagsAPI } from './api/tag.service.js'; -import { setDefaultSchema } from './api/helpers/schema-helper.js'; import { demoAPI } from './api/demo.service.js'; import { themeAPI } from './api/theme.service.js'; import { brandingAPI } from './api/branding.service.js'; @@ -74,9 +46,57 @@ import { projectsAPI } from './api/projects.service.js'; import { AISuggestionsService } from './helpers/ai-suggestions.js'; import { AssignedEntityAPI } from './api/assigned-entity.service.js'; import { permissionAPI } from './api/permission.service.js'; +import { setDefaultSchema } from './api/helpers/default-schemas.js'; export const obj = {}; +const necessaryEntity = [ + AggregateVC, + ApprovalDocument, + ArtifactChunk, + Artifact, + BlockCache, + BlockState, + Branding, + Contract, + DidDocument, + DocumentState, + DryRun, + ExternalDocument, + PolicyModule, + MultiDocuments, + MultiPolicyTransaction, + MultiPolicy, + PolicyInvitations, + PolicyRoles, + Policy, + RetirePool, + RetireRequest, + Schema, + Settings, + SplitDocuments, + SuggestionsConfig, + TagCache, + Tag, + Theme, + Token, + PolicyTool, + Topic, + VcDocument, + VpDocument, + WiperRequest, + Record, + PolicyCategory, + PolicyProperty, + MintRequest, + MintTransaction, + DryRunFiles, + PolicyCacheData, + PolicyCache, + AssignEntity, + PolicyTest +] + Promise.all([ Migration({ ...COMMON_CONNECTION_CONFIG, @@ -88,7 +108,7 @@ Promise.all([ useUnifiedTopology: true }, ensureIndexes: true, - entities + entities: necessaryEntity }, [ 'v2-4-0', 'v2-7-0', @@ -112,9 +132,10 @@ Promise.all([ `nats://${process.env.MQ_ADDRESS}:4222` ] }, - }) + }), + mongoForLoggingInitialization() ]).then(async values => { - const [db, cn, app] = values; + const [db, cn, app, loggerMongo] = values; app.listen(); @@ -129,7 +150,8 @@ Promise.all([ new GuardiansService().setConnection(cn).init(); const channel = new MessageBrokerChannel(cn, 'guardians'); - await new Logger().setConnection(cn); + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); + const state = new ApplicationState(); await state.setServiceName('GUARDIAN_SERVICE').setConnection(cn).init(); const secretManager = SecretManager.New(); @@ -163,34 +185,35 @@ Promise.all([ const brandingRepository = new DataBaseHelper(Branding); try { - await configAPI(settingsRepository, topicRepository); - await schemaAPI(); - await tokenAPI(tokenRepository); - await loaderAPI(didDocumentRepository, schemaRepository); - await profileAPI(); + await configAPI(settingsRepository, topicRepository, logger); + await schemaAPI(logger); + await tokenAPI(tokenRepository, logger); + await loaderAPI(didDocumentRepository, schemaRepository, logger); + await profileAPI(logger); await documentsAPI(didDocumentRepository, vcDocumentRepository, vpDocumentRepository, policyRepository); - await demoAPI(settingsRepository); - await trustChainAPI(didDocumentRepository, vcDocumentRepository, vpDocumentRepository); - await artifactAPI(); + await demoAPI(settingsRepository, logger); + await trustChainAPI(didDocumentRepository, vcDocumentRepository, vpDocumentRepository, logger); + await artifactAPI(logger); await contractAPI(contractRepository, wipeRequestRepository, retirePoolRepository, retireRequestRepository, - vcDocumentRepository + vcDocumentRepository, + logger ); - await modulesAPI(); - await toolsAPI(); - await tagsAPI(); - await analyticsAPI(); - await mapAPI(); - await themeAPI(); - await wizardAPI(); - await recordAPI(); + await modulesAPI(logger); + await toolsAPI(logger); + await tagsAPI(logger); + await analyticsAPI(logger); + await mapAPI(logger); + await themeAPI(logger); + await wizardAPI(logger); + await recordAPI(logger); await brandingAPI(brandingRepository); await suggestionsAPI(); - await projectsAPI(); - await AssignedEntityAPI() - await permissionAPI(); + await projectsAPI(logger); + await AssignedEntityAPI(logger) + await permissionAPI(logger); } catch (error) { console.error(error.message); process.exit(0); @@ -204,7 +227,7 @@ Promise.all([ const nodes = JSON.parse(process.env.HEDERA_CUSTOM_NODES); Environment.setNodes(nodes); } catch (error) { - await new Logger().warn( + await logger.warn( 'HEDERA_CUSTOM_NODES field in settings: ' + error.message, ['GUARDIAN_SERVICE'] ); @@ -218,7 +241,7 @@ Promise.all([ ); Environment.setMirrorNodes(mirrorNodes); } catch (error) { - await new Logger().warn( + await logger.warn( 'HEDERA_CUSTOM_MIRROR_NODES field in settings: ' + error.message, ['GUARDIAN_SERVICE'] @@ -232,6 +255,7 @@ Promise.all([ new ExternalEventChannel().setChannel(channel); await new Users().setConnection(cn).init(); + await new Wallet().setConnection(cn).init(); const workersHelper = new Workers(); await workersHelper.setConnection(cn).init(); workersHelper.initListeners(); @@ -248,14 +272,14 @@ Promise.all([ } AccountId.fromString(OPERATOR_ID); } catch (error) { - await new Logger().error('OPERATOR_ID field in settings: ' + error.message, ['GUARDIAN_SERVICE']); + await logger.error('OPERATOR_ID field in settings: ' + error.message, ['GUARDIAN_SERVICE']); return false; // process.exit(0); } try { PrivateKey.fromString(OPERATOR_KEY); } catch (error) { - await new Logger().error('OPERATOR_KEY field in .env file: ' + error.message, ['GUARDIAN_SERVICE']); + await logger.error('OPERATOR_KEY field in .env file: ' + error.message, ['GUARDIAN_SERVICE']); return false; } try { @@ -266,7 +290,7 @@ Promise.all([ TopicId.fromString(process.env.INITIALIZATION_TOPIC_ID); } } catch (error) { - await new Logger().error('INITIALIZATION_TOPIC_ID field in .env file: ' + error.message, ['GUARDIAN_SERVICE']); + await logger.error('INITIALIZATION_TOPIC_ID field in .env file: ' + error.message, ['GUARDIAN_SERVICE']); return false; // process.exit(0); } @@ -275,7 +299,7 @@ Promise.all([ PrivateKey.fromString(process.env.INITIALIZATION_TOPIC_KEY); } } catch (error) { - await new Logger().error('INITIALIZATION_TOPIC_KEY field in .env file: ' + error.message, ['GUARDIAN_SERVICE']); + await logger.error('INITIALIZATION_TOPIC_KEY field in .env file: ' + error.message, ['GUARDIAN_SERVICE']); return false; // process.exit(0); } @@ -299,11 +323,11 @@ Promise.all([ state.updateState(ApplicationStates.INITIALIZING); try { - policyEngine = new PolicyEngine(); + policyEngine = new PolicyEngine(logger); await policyEngine.setConnection(cn).init(); - const policyService = new PolicyEngineService(cn); + const policyService = new PolicyEngineService(cn, logger); await policyService.init(); - policyService.registerListeners(); + policyService.registerListeners(logger); await policyEngine.init(); } catch (error) { console.error(error.message); @@ -318,7 +342,7 @@ Promise.all([ } try { - await ipfsAPI(); + await ipfsAPI(logger); } catch (error) { console.error(error.message); } @@ -328,13 +352,13 @@ Promise.all([ new LargePayloadContainer().runServer(); } - await new Logger().info('guardian service started', ['GUARDIAN_SERVICE']); + await logger.info('guardian service started', ['GUARDIAN_SERVICE']); await state.updateState(ApplicationStates.READY); try { if (process.env.SEND_KEYS_TO_VAULT?.toLowerCase() === 'true') { - await sendKeysToVault(db.em); + await sendKeysToVault(db.em, logger); } } catch (error) { console.error(error.message); @@ -360,7 +384,8 @@ Promise.all([ users ), process.env.RETIRE_CONTRACT_SYNC_MASK || '* * * * *', - channel + channel, + logger ); retireSync.start(); const wipeSync = new SynchronizationTask( @@ -374,7 +399,8 @@ Promise.all([ users ), process.env.WIPE_CONTRACT_SYNC_MASK || '* * * * *', - channel + channel, + logger ); wipeSync.start(); const policyDiscontinueTask = new SynchronizationTask( @@ -394,7 +420,8 @@ Promise.all([ )); }, '0 * * * *', - channel + channel, + logger ); policyDiscontinueTask.start(true); const clearPolicyCache = new SynchronizationTask( @@ -409,7 +436,8 @@ Promise.all([ } }, process.env.CLEAR_POLICY_CACHE_INTERVAL || '0 * * * *', - channel + channel, + logger ); clearPolicyCache.start(true); diff --git a/guardian-service/src/config.ts b/guardian-service/src/config.ts index a0846fb26a..503cbb6404 100644 --- a/guardian-service/src/config.ts +++ b/guardian-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false'){ } } } -console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/guardian-service/src/helpers/notifier.ts b/guardian-service/src/helpers/notifier.ts index d4de419ed8..de99e036d1 100644 --- a/guardian-service/src/helpers/notifier.ts +++ b/guardian-service/src/helpers/notifier.ts @@ -164,6 +164,8 @@ function getNotificationResultTitle(action: TaskAction, result: any) { function getNotificationResult(action: TaskAction, result: any) { switch (action) { + case TaskAction.CREATE_RANDOM_KEY: + return; case TaskAction.CREATE_TOOL: case TaskAction.CREATE_POLICY: case TaskAction.CLONE_POLICY: diff --git a/guardian-service/src/helpers/restore-data-from-hedera.ts b/guardian-service/src/helpers/restore-data-from-hedera.ts index 35a3f87969..b36bb25f46 100644 --- a/guardian-service/src/helpers/restore-data-from-hedera.ts +++ b/guardian-service/src/helpers/restore-data-from-hedera.ts @@ -34,7 +34,7 @@ import { UrlType, RoleMessage, GuardianRoleMessage, - UserPermissionsMessage + UserPermissionsMessage, PinoLogger, } from '@guardian/common'; import { DidDocumentStatus, @@ -318,6 +318,7 @@ export class RestoreDataFromHedera { * @param user * @param hederaAccountID * @param hederaAccountKey + * @param logger * @private */ private async restorePolicy( @@ -325,7 +326,8 @@ export class RestoreDataFromHedera { owner: string, user: IAuthUser, hederaAccountID: string, - hederaAccountKey: string + hederaAccountKey: string, + logger: PinoLogger ): Promise { try { const policyMessages = await this.readTopicMessages(policyTopicId); @@ -430,7 +432,7 @@ export class RestoreDataFromHedera { hederaAccountKey ); - await new PolicyEngine().generateModel(r.id.toString()); + await new PolicyEngine(logger).generateModel(r.id.toString()); // await new BlockTreeGenerator().generate(r.id.toString()); } } catch (e) { @@ -539,13 +541,16 @@ export class RestoreDataFromHedera { * @param hederaAccountID * @param hederaAccountKey * @param registrantTopicId + * @param didDocument + * @param logger */ async restoreRootAuthority( username: string, hederaAccountID: string, hederaAccountKey: string, registrantTopicId: string, - didDocument: CommonDidDocument + didDocument: CommonDidDocument, + logger: PinoLogger ): Promise { const did = didDocument.getDid(); const user = await this.users.getUser(username); @@ -654,7 +659,8 @@ export class RestoreDataFromHedera { did, user, hederaAccountID, - hederaAccountKey + hederaAccountKey, + logger ); } } @@ -691,7 +697,7 @@ export class RestoreDataFromHedera { } } - const _owner = EntityOwner.sr(parentDid); + const _owner = EntityOwner.sr(parent.id?.toString(), parentDid); const _roleMap = new Map(); for (const message of _guardianRoles.values()) { await this.loadIPFS(message); diff --git a/guardian-service/src/helpers/send-keys-to-vault.ts b/guardian-service/src/helpers/send-keys-to-vault.ts index 73e9aa9d3e..d683ab4960 100644 --- a/guardian-service/src/helpers/send-keys-to-vault.ts +++ b/guardian-service/src/helpers/send-keys-to-vault.ts @@ -1,12 +1,11 @@ -import { KeyType, Logger, Wallet } from '@guardian/common'; +import { KeyType, PinoLogger, Wallet } from '@guardian/common'; import { MongoEntityManager } from '@mikro-orm/mongodb'; /** * Migration function * @constructor */ -export async function sendKeysToVault(em: MongoEntityManager): Promise { - const logger = new Logger(); +export async function sendKeysToVault(em: MongoEntityManager, logger: PinoLogger): Promise { const wallet = new Wallet(); try { logger.info('Start send keys to vault', ['GUARDIAN_SERVICE']); @@ -95,7 +94,7 @@ export async function sendKeysToVault(em: MongoEntityManager): Promise { ); updatedTokens++; } - logger.info(`Updated ${updatedTokens} tokens`, ['GUARDIAN_SERVICE']); + await logger.info(`Updated ${updatedTokens} tokens`, ['GUARDIAN_SERVICE']); const topicCollection = em.getCollection('Topic'); const topics = topicCollection.find(); diff --git a/guardian-service/src/helpers/synchronization-task.ts b/guardian-service/src/helpers/synchronization-task.ts index 062ffeb402..189b912b2c 100644 --- a/guardian-service/src/helpers/synchronization-task.ts +++ b/guardian-service/src/helpers/synchronization-task.ts @@ -1,4 +1,4 @@ -import { Logger, MessageBrokerChannel } from '@guardian/common'; +import { MessageBrokerChannel, PinoLogger } from '@guardian/common'; import { CronJob } from 'cron'; /** @@ -21,12 +21,14 @@ export class SynchronizationTask { * @param fn Function * @param mask Mask * @param channel Channel + * @param logger Channel */ constructor( private readonly _name: string, private readonly _fn: () => void, private readonly _mask: string, - private readonly _channel: MessageBrokerChannel + private readonly _channel: MessageBrokerChannel, + private readonly logger: PinoLogger ) {} /** @@ -71,7 +73,7 @@ export class SynchronizationTask { } } catch (error) { isTaskRunning = false; - new Logger().error(error, ['GUARDIAN_SERVICE']); + await this.logger.error(error, ['GUARDIAN_SERVICE']); } } this._job = new CronJob(this._mask, taskExecution); diff --git a/guardian-service/src/policy-engine/block-about.ts b/guardian-service/src/policy-engine/block-about.ts index 34a8242e74..8fcfd8bf3f 100644 --- a/guardian-service/src/policy-engine/block-about.ts +++ b/guardian-service/src/policy-engine/block-about.ts @@ -184,12 +184,20 @@ export const BlockAbout = { 'ErrorEvent' ], 'defaultEvent': true, - 'properties': [{ - 'name': 'unsigned', - 'label': 'Unsigned VC', - 'title': 'Unsigned document', - 'type': 'Checkbox' - }] + 'properties': [ + { + 'name': 'unsigned', + 'label': 'Unsigned VC', + 'title': 'Unsigned document', + 'type': 'Checkbox' + }, + { + 'name': 'passOriginal', + 'label': 'Pass original', + 'title': 'Pass original document', + 'type': 'Checkbox' + } + ] }, 'documentsSourceAddon': { 'label': 'Source', diff --git a/guardian-service/src/policy-engine/helpers/policy-data-migrator.ts b/guardian-service/src/policy-engine/helpers/policy-data-migrator.ts index 7356affd7a..96f7b4caec 100644 --- a/guardian-service/src/policy-engine/helpers/policy-data-migrator.ts +++ b/guardian-service/src/policy-engine/helpers/policy-data-migrator.ts @@ -40,12 +40,12 @@ import { ContractType, DocumentStatus, MigrationConfig, - PolicyType, Schema, SchemaCategory, SchemaHelper, TopicType, ISignOptions, + PolicyHelper, } from '@guardian/interfaces'; import { INotifier } from '../../helpers/notifier.js'; import { @@ -291,18 +291,19 @@ export class PolicyDataMigrator { if (!srcModel) { throw new Error(`Can't find source policy`); } + const srcModelDryRun = PolicyHelper.isDryRunMode(srcModel); policyUsers = await users.getUsersBySrId(owner); policyRoles = await new RolesLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(); policyStates = await new BlockStateLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(); srcSystemSchemas = await DatabaseServer.getSchemas({ category: SchemaCategory.SYSTEM, @@ -312,7 +313,7 @@ export class PolicyDataMigrator { srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get({ id: { $in: vcs }, }); @@ -320,7 +321,7 @@ export class PolicyDataMigrator { srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get({ schema: '#UserRole', }); @@ -328,7 +329,7 @@ export class PolicyDataMigrator { srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get({ id: { $in: vps }, }); @@ -336,49 +337,49 @@ export class PolicyDataMigrator { srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(); srcMintRequests = await new MintRequestLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(srcVPs.map((item) => item.messageId)); srcMintTransactions = await new MintTransactionLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(srcMintRequests.map((item) => item.id)); srcMultiDocuments = await new MultiSignDocumentLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(vcs); srcAggregateVCs = await new AggregateVCLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(); srcSplitDocuments = await new SplitDocumentLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(); srcDocumentStates = await new DocumentStateLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(vcs); srcTokens = await new TokensLoader( srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get(); const policyTokens = findAllEntities(srcModel.config, [ 'tokenId', @@ -387,7 +388,7 @@ export class PolicyDataMigrator { srcModel.id, srcModel.topicId, srcModel.instanceTopicId, - srcModel.status === PolicyType.DRY_RUN + srcModelDryRun ).get( srcTokens.map((token) => token.tokenId).concat(policyTokens) ); @@ -400,7 +401,7 @@ export class PolicyDataMigrator { if (!dstModel) { throw new Error(`Can't find destination policy`); } - + const dstModelDryRun = PolicyHelper.isDryRunMode(dstModel); const dstSystemSchemas = await DatabaseServer.getSchemas({ category: SchemaCategory.SYSTEM, topicId: dstModel.topicId, @@ -424,13 +425,10 @@ export class PolicyDataMigrator { const signOptions = await wallet.getUserSignOptions(root); const instanceTopicConfig = await TopicConfig.fromObject( - await new DatabaseServer( - dstModel.status === PolicyType.DRY_RUN - ? dstModel.id - : undefined - ).getTopic({ - topicId: dstModel.instanceTopicId, - }) + await new DatabaseServer(dstModelDryRun ? dstModel.id : undefined) + .getTopic({ + topicId: dstModel.instanceTopicId, + }) ); const policyDataMigrator = new PolicyDataMigrator( @@ -454,7 +452,7 @@ export class PolicyDataMigrator { tokensMap || {}, editedVCs || {}, srcDids, - dstModel.status === PolicyType.DRY_RUN ? dstModel.id : null, + dstModelDryRun ? dstModel.id : null, notifier ); const migrationErrors = await policyDataMigrator._migrateData( @@ -937,7 +935,8 @@ export class PolicyDataMigrator { user.username, user.did, user.hederaAccountId, - null + null, + false ); } } diff --git a/guardian-service/src/policy-engine/helpers/policy-data/policy-data-import-export.ts b/guardian-service/src/policy-engine/helpers/policy-data/policy-data-import-export.ts index 7d1470799e..b9bd735d54 100644 --- a/guardian-service/src/policy-engine/helpers/policy-data/policy-data-import-export.ts +++ b/guardian-service/src/policy-engine/helpers/policy-data/policy-data-import-export.ts @@ -17,7 +17,7 @@ import { RetirePoolLoader } from './loaders/index.js'; import { GuardiansService } from '../../../helpers/guardians.js'; -import { IOwner, PolicyEvents, PolicyType, TopicType } from '@guardian/interfaces'; +import { IOwner, PolicyEvents, PolicyHelper, TopicType } from '@guardian/interfaces'; import { DatabaseServer, DidDocument, @@ -76,7 +76,7 @@ export class PolicyDataImportExport { private readonly _loaderInstances = new Map(); constructor(private readonly _policy: Policy) { - this._isDryRun = _policy.status === PolicyType.DRY_RUN; + this._isDryRun = PolicyHelper.isDryRunMode(_policy); for (const [name, Loader] of PolicyDataImportExport._loaders) { if ( ![ diff --git a/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts b/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts index 0831e5efca..48671f947c 100644 --- a/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts +++ b/guardian-service/src/policy-engine/helpers/policy-import-export-helper.ts @@ -1,134 +1,158 @@ -import { BlockType, ConfigType, GenerateUUIDv4, IOwner, ModuleStatus, PolicyToolMetadata, PolicyType, SchemaCategory, SchemaEntity, TagType, TopicType } from '@guardian/interfaces'; -import { publishSystemSchemas } from '../../api/helpers/schema-publish-helper.js'; +import { BlockType, ConfigType, GenerateUUIDv4, IOwner, IRootConfig, ModuleStatus, PolicyTestStatus, PolicyToolMetadata, PolicyType, SchemaCategory, SchemaEntity, TagType, TopicType } from '@guardian/interfaces'; +import { DataBaseHelper, DatabaseServer, IPolicyComponents, PinoLogger, MessageAction, MessageServer, MessageType, Policy, PolicyMessage, PolicyTool, RecordImportExport, regenerateIds, replaceAllEntities, replaceAllVariables, replaceArtifactProperties, Schema, SchemaFields, Tag, Token, Topic, TopicConfig, TopicHelper, Users } from '@guardian/common'; +import { ImportArtifactResult, ImportTokenMap, ImportTokenResult, ImportToolMap, ImportToolResults, ImportSchemaMap, ImportSchemaResult, importArtifactsByFiles, importSubTools, importTokensByFiles, publishSystemSchemas, importTag, SchemaImportExportHelper } from '../../api/helpers/index.js'; import { PolicyConverterUtils } from '../policy-converter-utils.js'; -import { INotifier } from '../../helpers/notifier.js'; -import { DataBaseHelper, DatabaseServer, IPolicyComponents, Logger, MessageAction, MessageServer, MessageType, Policy, PolicyMessage, regenerateIds, replaceAllEntities, replaceAllVariables, replaceArtifactProperties, Schema, SchemaFields, Topic, TopicConfig, TopicHelper, Users } from '@guardian/common'; -import { importTag } from '../../api/helpers/tag-import-export-helper.js'; -import { SchemaImportResult } from '../../api/helpers/schema-helper.js'; +import { INotifier, emptyNotifier } from '../../helpers/notifier.js'; import { HashComparator, PolicyLoader } from '../../analytics/index.js'; -import { importArtifactsByFiles, importSchemaByFiles, importSubTools, importTokensByFiles } from '../../api/helpers/index.js'; -/** - * Policy import export helper - */ -export class PolicyImportExportHelper { +export interface ImportPolicyError { /** - * Get system schemas - * - * @returns Array of schemas + * Entity type */ - public static async getSystemSchemas(): Promise { - const schemas = await Promise.all([ - DatabaseServer.getSystemSchema(SchemaEntity.POLICY), - DatabaseServer.getSystemSchema(SchemaEntity.MINT_TOKEN), - DatabaseServer.getSystemSchema(SchemaEntity.MINT_NFTOKEN), - DatabaseServer.getSystemSchema(SchemaEntity.WIPE_TOKEN), - DatabaseServer.getSystemSchema(SchemaEntity.ISSUER), - DatabaseServer.getSystemSchema(SchemaEntity.USER_ROLE), - DatabaseServer.getSystemSchema(SchemaEntity.CHUNK), - DatabaseServer.getSystemSchema(SchemaEntity.ACTIVITY_IMPACT), - DatabaseServer.getSystemSchema(SchemaEntity.TOKEN_DATA_SOURCE) - ]); + type?: string; + /** + * Schema uuid + */ + uuid?: string; + /** + * Schema name + */ + name?: string; + /** + * Error message + */ + error?: string; +} - for (const schema of schemas) { - if (!schema) { - throw new Error('One of system schemas is not exist'); - } - } - return schemas; - } +export interface ImportPolicyResult { + /** + * New Policy + */ + policy: Policy, + /** + * Errors + */ + errors: ImportPolicyError[] +} +export interface ImportTestResult { /** - * Import policy - * @param policyToImport - * @param policyOwner - * @param versionOfTopicId - * @param notifier - * @param additionalPolicyConfig - * - * @returns Policies by owner + * New schema uuid */ - public static async importPolicy( - policyToImport: IPolicyComponents, - user: IOwner, - versionOfTopicId: string, - notifier: INotifier, - additionalPolicyConfig?: Partial, - metadata?: PolicyToolMetadata, - ): Promise<{ - /** - * New Policy - */ - policy: Policy, - /** - * Errors - */ - errors: any[] - }> { - const { - policy, - tokens, - schemas, - artifacts, - tags, - tools - } = policyToImport; + testsMap: Map; + /** + * Errors + */ + errors: any[]; + /** + * Errors + */ + files: [any, Buffer][]; +} +export class PolicyImport { + private readonly demo: boolean; + private readonly notifier: INotifier; + + private root: IRootConfig; + private owner: IOwner; + private topicHelper: TopicHelper; + private messageServer: MessageServer; + private parentTopic: TopicConfig; + private topicRow: TopicConfig; + private toolsResult: ImportToolResults; + private toolsMapping: ImportToolMap[] + private tokensResult: ImportTokenResult; + private tokenMapping: ImportTokenMap[]; + private artifactsResult: ImportArtifactResult; + private artifactsMapping: Map; + private schemasResult: ImportSchemaResult; + private schemasMapping: ImportSchemaMap[]; + private testsResult: ImportTestResult; + // tslint:disable-next-line:no-unused-variable + private testsMapping: Map; + // tslint:disable-next-line:no-unused-variable + private topicId: string; + + constructor(demo: boolean, notifier: INotifier) { + this.demo = demo; + this.notifier = notifier; + } + + private async resolveAccount(user: IOwner): Promise { + this.notifier.start('Resolve Hedera account'); const users = new Users(); - notifier.start('Resolve Hedera account'); - const root = await users.getHederaAccount(user.creator); - - const toolsMapping: { - oldMessageId: string; - messageId: string; - oldHash: string; - newHash?: string; - }[] = []; - if (metadata?.tools) { - for (const tool of tools) { - if ( - metadata.tools[tool.messageId] && - tool.messageId !== metadata.tools[tool.messageId] - ) { - toolsMapping.push({ - oldMessageId: tool.messageId, - messageId: metadata.tools[tool.messageId], - oldHash: tool.hash, - }); - tool.messageId = metadata.tools[tool.messageId]; - } - } - } + this.root = await users.getHederaAccount(user.creator); + this.topicHelper = new TopicHelper( + this.root.hederaAccountId, + this.root.hederaAccountKey, + this.root.signOptions + ); + this.messageServer = new MessageServer( + this.root.hederaAccountId, + this.root.hederaAccountKey, + this.root.signOptions + ); + this.owner = user; + return this.root; + } + private async dataPreparation( + policy: Policy, + user: IOwner, + additionalPolicyConfig: Partial | null + ): Promise { delete policy._id; delete policy.id; delete policy.messageId; delete policy.version; delete policy.previousVersion; delete policy.createDate; - - policy.policyTag = additionalPolicyConfig?.policyTag || 'Tag_' + Date.now(); policy.uuid = GenerateUUIDv4(); policy.creator = user.creator; policy.owner = user.owner; - policy.status = PolicyType.DRAFT; + policy.status = this.demo ? PolicyType.DEMO : PolicyType.DRAFT; policy.instanceTopicId = null; policy.synchronizationTopicId = null; policy.name = additionalPolicyConfig?.name || policy.name; policy.topicDescription = additionalPolicyConfig?.topicDescription || policy.topicDescription; policy.description = additionalPolicyConfig?.description || policy.description; + policy.policyTag = additionalPolicyConfig?.policyTag || 'Tag_' + Date.now(); + return policy; + } - notifier.completedAndStart('Resolve topic'); - const parent = await TopicConfig.fromObject( + private async createPolicyTopic(policy: Policy, versionOfTopicId: string, user: IOwner) { + this.notifier.completedAndStart('Resolve topic'); + this.parentTopic = await TopicConfig.fromObject( await DatabaseServer.getTopicByType(user.creator, TopicType.UserTopic), true ); - const topicHelper = new TopicHelper(root.hederaAccountId, root.hederaAccountKey, root.signOptions); - let topicRow: TopicConfig; - if (versionOfTopicId) { - topicRow = await TopicConfig.fromObject(await DatabaseServer.getTopicById(versionOfTopicId), true); + if (this.demo) { + this.topicRow = new TopicConfig({ + type: TopicType.PolicyTopic, + name: policy.name || TopicType.PolicyTopic, + description: policy.topicDescription || TopicType.PolicyTopic, + owner: user.creator, + policyId: null, + policyUUID: null, + topicId: `0.0.${Date.now()}${(Math.random()*1000).toFixed(0)}` + }, null, null); + await DatabaseServer.saveTopic(this.topicRow.toObject()); + } else if (versionOfTopicId) { + this.topicRow = await TopicConfig.fromObject( + await DatabaseServer.getTopicById(versionOfTopicId), true + ); + this.notifier.completedAndStart('Skip publishing policy in Hedera'); } else { - topicRow = await topicHelper.create({ + this.notifier.completedAndStart('Publish Policy in Hedera'); + const message = new PolicyMessage(MessageType.Policy, MessageAction.CreatePolicy); + message.setDocument(policy); + const createPolicyMessage = await this.messageServer + .setTopicObject(this.parentTopic) + .sendMessage(message); + + this.notifier.completedAndStart('Create policy topic'); + this.topicRow = await this.topicHelper.create({ type: TopicType.PolicyTopic, name: policy.name || TopicType.PolicyTopic, description: policy.topicDescription || TopicType.PolicyTopic, @@ -136,160 +160,357 @@ export class PolicyImportExportHelper { policyId: null, policyUUID: null }); - await topicRow.saveKeys(); - await DatabaseServer.saveTopic(topicRow.toObject()); + await this.topicRow.saveKeys(); + await DatabaseServer.saveTopic(this.topicRow.toObject()); + + this.notifier.completedAndStart('Link topic and policy'); + await this.topicHelper.twoWayLink( + this.topicRow, + this.parentTopic, + createPolicyMessage.getId(), + this.owner.id + ); } - policy.topicId = topicRow.topicId; - - if (!versionOfTopicId) { - notifier.completedAndStart('Publish Policy in Hedera'); - const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions); - const message = new PolicyMessage(MessageType.Policy, MessageAction.CreatePolicy); - message.setDocument(policy); - const messageStatus = await messageServer - .setTopicObject(parent) - .sendMessage(message); - notifier.completedAndStart('Link topic and policy'); - await topicHelper.twoWayLink( - topicRow, - parent, - messageStatus.getId() - ); + policy.topicId = this.topicRow.topicId; + this.topicId = policy.topicId; + } - notifier.completedAndStart('Publishing schemas'); + private async publishSystemSchemas(versionOfTopicId: string, user: IOwner) { + if (this.demo) { const systemSchemas = await PolicyImportExportHelper.getSystemSchemas(); - notifier.info(`Found ${systemSchemas.length} schemas`); - messageServer.setTopicObject(topicRow); - await publishSystemSchemas(systemSchemas, messageServer, user, notifier); + this.schemasResult = await SchemaImportExportHelper.importSystemSchema( + systemSchemas, + user, + { + category: SchemaCategory.POLICY, + topicId: this.topicRow.topicId, + skipGenerateId: false, + demo: this.demo + }, + this.notifier + ); + } else if (versionOfTopicId) { + this.notifier.completedAndStart('Skip publishing schemas'); } else { - notifier.completedAndStart('Skip publishing policy in Hedera'); - notifier.completedAndStart('Skip publishing schemas'); + this.notifier.completedAndStart('Publishing schemas'); + const systemSchemas = await PolicyImportExportHelper.getSystemSchemas(); + this.notifier.info(`Found ${systemSchemas.length} schemas`); + this.messageServer.setTopicObject(this.topicRow); + await publishSystemSchemas(systemSchemas, this.messageServer, user, this.notifier); } + } + + private async importTools( + tools: PolicyTool[], + metadata: PolicyToolMetadata | null, + user: IOwner + ) { + this.notifier.completedAndStart('Import tools'); + this.notifier.sub(true); - notifier.completed(); + this.toolsMapping = []; + if (metadata?.tools) { + for (const tool of tools) { + if ( + metadata.tools[tool.messageId] && + tool.messageId !== metadata.tools[tool.messageId] + ) { + this.toolsMapping.push({ + oldMessageId: tool.messageId, + messageId: metadata.tools[tool.messageId], + oldHash: tool.hash, + }); + tool.messageId = metadata.tools[tool.messageId]; + } + } + } - // Import Tools - notifier.completedAndStart('Import tools'); - notifier.sub(true); - const toolsResult = await importSubTools(root, tools, user, notifier); - notifier.sub(false); + this.toolsResult = await importSubTools(this.root, tools, user, this.notifier); - for (const toolMapping of toolsMapping) { - const toolByMessageId = toolsResult.tools.find( - // tslint:disable-next-line:no-shadowed-variable - (tool) => tool.messageId === toolMapping.messageId - ); + for (const toolMapping of this.toolsMapping) { + const toolByMessageId = this.toolsResult.tools.find((tool) => tool.messageId === toolMapping.messageId); toolMapping.newHash = toolByMessageId?.hash; } - // Import Tokens - const tokensResult = await importTokensByFiles(user, tokens, notifier); - const tokenMap = tokensResult.tokenMap; + this.notifier.sub(false); + } + private async importTokens(tokens: Token[], user: IOwner) { + this.tokensResult = await importTokensByFiles(user, tokens, this.notifier); + this.tokenMapping = this.tokensResult.tokenMap; + } + + private async importSchemas(schemas: Schema[], user: IOwner) { + const topicIds = this.toolsResult.tools.map((tool) => tool.topicId); const toolsSchemas = (await DatabaseServer.getSchemas( { category: SchemaCategory.TOOL, - topicId: { $in: toolsResult.tools.map((tool) => tool.topicId) }, + topicId: { $in: topicIds } }, { fields: ['name', 'iri'], } )) as { name: string; iri: string }[]; - - // Import Schemas - const schemasResult = await importSchemaByFiles( - SchemaCategory.POLICY, - user, + this.schemasResult = await SchemaImportExportHelper.importSchemaByFiles( schemas, - topicRow.topicId, - notifier, - false, - toolsSchemas + user, + { + category: SchemaCategory.POLICY, + topicId: this.topicRow.topicId, + skipGenerateId: false, + outerSchemas: toolsSchemas, + demo: this.demo + }, + this.notifier ); - const schemasMap = schemasResult.schemasMap; + this.schemasMapping = this.schemasResult.schemasMap; + } + + private async importArtifacts(artifacts: any[], user: IOwner) { + this.artifactsResult = await importArtifactsByFiles(user, artifacts, this.notifier); + this.artifactsMapping = this.artifactsResult.artifactsMap; + } - // Import Artifacts - const artifactsResult = await importArtifactsByFiles(user, artifacts, notifier); - const artifactsMap = artifactsResult.artifactsMap; + private async importTests(tests: any[], user: IOwner) { + this.notifier.completedAndStart('Import tests'); - notifier.completedAndStart('Saving in DB'); + const testsMap = new Map(); + const errors: any[] = []; + const files: [any, Buffer][] = []; + for (const test of tests) { + const oldUUID = test.uuid; + const newUUID = GenerateUUIDv4(); + try { + const recordToImport = await RecordImportExport.parseZipFile(test.data); + files.push([{ + uuid: newUUID, + owner: user.creator, + status: PolicyTestStatus.New, + duration: recordToImport.duration, + progress: 0, + date: null, + result: null, + error: null, + resultId: null, + }, test.data]) + testsMap.set(oldUUID, newUUID); + } catch (error) { + errors.push({ + type: 'test', + uuid: oldUUID, + name: oldUUID, + error: error.toString(), + }) + } + } - // Replace id + this.testsResult = { testsMap, errors, files }; + this.testsMapping = testsMap; + } + + private async updateUUIDs(policy: Policy): Promise { await PolicyImportExportHelper.replaceConfig( policy, - schemasMap, - artifactsMap, - tokenMap, - toolsMapping + this.schemasMapping, + this.artifactsMapping, + this.tokenMapping, + this.toolsMapping ); + return policy; + } - // Save + private async savePolicy(policy: Policy): Promise { + this.notifier.completedAndStart('Saving policy in DB'); const model = new DataBaseHelper(Policy).create(policy as Policy); - const result = await new DataBaseHelper(Policy).save(model); - - if (tags) { - notifier.start('Import tags'); - const policyTags = tags.filter((t: any) => t.entity === TagType.Policy); - const tokenTags = tags.filter((t: any) => t.entity === TagType.Token); - const schemaTags = tags.filter((t: any) => t.entity === TagType.Schema); - await importTag(policyTags, result.id.toString()); - const tokenIdMap: Map = new Map(); - for (const item of tokenMap) { - tokenIdMap.set(item.oldID, item.newID); - tokenIdMap.set(item.oldTokenID, item.newID); - } - await importTag(tokenTags, tokenIdMap); - const schemaIdMap: Map = new Map(); - for (const item of schemasMap) { - schemaIdMap.set(item.oldID, item.newID); - schemaIdMap.set(item.oldMessageID, item.newID); - } - await importTag(schemaTags, schemaIdMap); - notifier.completed(); - } + return await new DataBaseHelper(Policy).save(model); + } - const _topicRow = await new DataBaseHelper(Topic).findOne({ topicId: topicRow.topicId }) - _topicRow.policyId = result.id.toString(); - _topicRow.policyUUID = result.uuid; - await new DataBaseHelper(Topic).update(_topicRow); + private async saveTopic(policy: Policy) { + this.notifier.completedAndStart('Saving topic in DB'); + const row = await new DataBaseHelper(Topic).findOne({ topicId: this.topicRow.topicId }) + row.policyId = policy.id.toString(); + row.policyUUID = policy.uuid; + await new DataBaseHelper(Topic).update(row); + } - for (const addedArtifact of artifactsResult.artifacts) { - addedArtifact.policyId = result.id; + private async saveArtifacts(policy: Policy) { + this.notifier.completedAndStart('Saving artifacts in DB'); + for (const addedArtifact of this.artifactsResult.artifacts) { + addedArtifact.policyId = policy.id; await DatabaseServer.saveArtifact(addedArtifact); } + } + + private async saveTests(policy: Policy) { + this.notifier.completedAndStart('Saving tests in DB'); + for (const [test, data] of this.testsResult.files) { + test.policyId = policy.id; + await DatabaseServer.createPolicyTest(test, data); + } + } + private async saveHash(policy: Policy, logger: PinoLogger) { + this.notifier.completedAndStart('Updating hash'); + await PolicyImportExportHelper.updatePolicyComponents(policy, logger); + } + + private async setSuggestionsConfig(policy: Policy, user: IOwner) { const suggestionsConfig = await DatabaseServer.getSuggestionsConfig(user.creator); if (!suggestionsConfig) { await DatabaseServer.setSuggestionsConfig({ user: user.creator, items: [ { - id: result.id, + id: policy.id, type: ConfigType.POLICY, index: 0, }, ], }); } + } - notifier.completedAndStart('Updating hash'); - await PolicyImportExportHelper.updatePolicyComponents(result); + private async importTags(policy: Policy, tags: Tag[]) { + this.notifier.completedAndStart('Import tags'); + if (!tags || !tags.length) { + return; + } - const errors: any[] = []; - if (schemasResult.errors) { - for (const error of schemasResult.errors) { + const policyTags = tags.filter((t: any) => t.entity === TagType.Policy); + const tokenTags = tags.filter((t: any) => t.entity === TagType.Token); + const schemaTags = tags.filter((t: any) => t.entity === TagType.Schema); + await importTag(policyTags, policy.id.toString()); + const tokenIdMap: Map = new Map(); + for (const item of this.tokenMapping) { + tokenIdMap.set(item.oldID, item.newID); + tokenIdMap.set(item.oldTokenID, item.newID); + } + await importTag(tokenTags, tokenIdMap); + const schemaIdMap: Map = new Map(); + for (const item of this.schemasMapping) { + schemaIdMap.set(item.oldID, item.newID); + schemaIdMap.set(item.oldMessageID, item.newID); + } + await importTag(schemaTags, schemaIdMap); + this.notifier.completed(); + } + + private async getErrors(): Promise { + const errors: ImportPolicyError[] = []; + if (this.schemasResult.errors) { + for (const error of this.schemasResult.errors) { errors.push(error); } } - if (toolsResult.errors) { - for (const error of toolsResult.errors) { + if (this.toolsResult.errors) { + for (const error of this.toolsResult.errors) { errors.push(error); } } + if (this.testsResult.errors) { + for (const error of this.testsResult.errors) { + errors.push(error); + } + } + return errors; + } + + public async import( + policyComponents: IPolicyComponents, + user: IOwner, + versionOfTopicId: string, + additionalPolicyConfig: Partial | null, + metadata: PolicyToolMetadata | null, + logger: PinoLogger, + ): Promise { + const { policy, tokens, schemas, artifacts, tags, tools, tests } = policyComponents; + await this.resolveAccount(user); + await this.dataPreparation(policy, user, additionalPolicyConfig); + await this.createPolicyTopic(policy, versionOfTopicId, user); + await this.publishSystemSchemas(versionOfTopicId, user); + await this.importTools(tools, metadata, user); + await this.importTokens(tokens, user); + await this.importSchemas(schemas, user); + await this.importArtifacts(artifacts, user); + await this.importTests(tests, user); + await this.updateUUIDs(policy); + + const row = await this.savePolicy(policy); + await this.saveTopic(row); + await this.saveArtifacts(row); + await this.saveTests(row); + await this.saveHash(row, logger); + await this.setSuggestionsConfig(row, user); + await this.importTags(row, tags); + + const errors = await this.getErrors(); + return { policy: row, errors }; + } +} + +/** + * Policy import export helper + */ +export class PolicyImportExportHelper { + /** + * Get system schemas + * + * @returns Array of schemas + */ + public static async getSystemSchemas(): Promise { + const schemas = await Promise.all([ + DatabaseServer.getSystemSchema(SchemaEntity.POLICY), + DatabaseServer.getSystemSchema(SchemaEntity.MINT_TOKEN), + DatabaseServer.getSystemSchema(SchemaEntity.MINT_NFTOKEN), + DatabaseServer.getSystemSchema(SchemaEntity.WIPE_TOKEN), + DatabaseServer.getSystemSchema(SchemaEntity.ISSUER), + DatabaseServer.getSystemSchema(SchemaEntity.USER_ROLE), + DatabaseServer.getSystemSchema(SchemaEntity.CHUNK), + DatabaseServer.getSystemSchema(SchemaEntity.ACTIVITY_IMPACT), + DatabaseServer.getSystemSchema(SchemaEntity.TOKEN_DATA_SOURCE) + ]); + + for (const schema of schemas) { + if (!schema) { + throw new Error('One of system schemas is not exist'); + } + } + return schemas; + } - notifier.completed(); - return { policy: result, errors }; + /** + * Import policy + * @param policyToImport + * @param user + * @param versionOfTopicId + * @param additionalPolicyConfig + * @param metadata + * @param demo + * @param notifier + * @param logger + * + * @returns import result + */ + public static async importPolicy( + policyToImport: IPolicyComponents, + user: IOwner, + versionOfTopicId: string, + logger: PinoLogger, + additionalPolicyConfig: Partial = null, + metadata: PolicyToolMetadata = null, + demo: boolean = false, + notifier: INotifier = emptyNotifier(), + ): Promise { + const helper = new PolicyImport(demo, notifier); + return helper.import( + policyToImport, + user, + versionOfTopicId, + additionalPolicyConfig, + metadata, + logger + ) } /** @@ -299,7 +520,7 @@ export class PolicyImportExportHelper { */ public static async replaceConfig( policy: Policy, - schemasMap: SchemaImportResult[], + schemasMap: ImportSchemaMap[], artifactsMap: Map, tokenMap: any[], tools: { oldMessageId: string, messageId: string, oldHash: string, newHash?: string }[] @@ -342,7 +563,7 @@ export class PolicyImportExportHelper { * Convert errors to string * @param errors */ - public static errorsMessage(errors: any[]): string { + public static errorsMessage(errors: ImportPolicyError[]): string { const schemas: string[] = []; const tools: string[] = []; const others: string[] = [] @@ -388,8 +609,9 @@ export class PolicyImportExportHelper { /** * Update policy components * @param policy + * @param logger */ - public static async updatePolicyComponents(policy: Policy): Promise { + public static async updatePolicyComponents(policy: Policy, logger: PinoLogger): Promise { try { const raw = await PolicyLoader.load(policy.id.toString()); const compareModel = await PolicyLoader.create(raw, HashComparator.options); @@ -397,7 +619,7 @@ export class PolicyImportExportHelper { policy.hash = hash; policy.hashMap = hashMap; } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE, HASH']); + await logger.error(error, ['GUARDIAN_SERVICE, HASH']); } const toolIds = new Set() PolicyImportExportHelper.findTools(policy.config, toolIds); diff --git a/guardian-service/src/policy-engine/policy-components-utils.ts b/guardian-service/src/policy-engine/policy-components-utils.ts index 021c7ba05d..4eb1c91f71 100644 --- a/guardian-service/src/policy-engine/policy-components-utils.ts +++ b/guardian-service/src/policy-engine/policy-components-utils.ts @@ -1,4 +1,4 @@ -import { PolicyType } from '@guardian/interfaces'; +import { PolicyHelper, PolicyType } from '@guardian/interfaces'; import { DatabaseServer, Policy } from '@guardian/common'; import { IPolicyUser } from './policy-user.js'; import { ExternalEvent } from './interfaces/external-event.js'; @@ -41,15 +41,18 @@ export class PolicyComponentsUtils { * @param did */ public static async GetPolicyInfo(policy: Policy, did: string): Promise { + if (!policy) { + return policy; + } const result: any = policy; - if (policy && did) { + const policyId = policy.id.toString(); + if (did) { result.userRoles = []; result.userGroups = []; result.userRole = null; result.userGroup = null; - const policyId = policy.id.toString(); - if (policy.status === PolicyType.DRY_RUN) { + if (PolicyHelper.isDryRunMode(policy)) { const activeUser = await DatabaseServer.getVirtualUser(policyId); if (activeUser) { did = activeUser.did; @@ -61,7 +64,7 @@ export class PolicyComponentsUtils { result.userRole = 'Administrator'; } - const dryRun = policy.status === PolicyType.DRY_RUN ? policyId : null; + const dryRun = PolicyHelper.isDryRunMode(policy) ? policyId : null; const db = new DatabaseServer(dryRun); const groups = await db.getGroupsByUser(policyId, did, { fields: ['uuid', 'role', 'groupLabel', 'groupName', 'active'] @@ -74,6 +77,11 @@ export class PolicyComponentsUtils { } } + if (!result.userRole) { + result.userRoles = ['No role']; + result.userRole = 'No role'; + } + result.userGroups = groups; if (policy.status === PolicyType.PUBLISH || policy.status === PolicyType.DISCONTINUED) { const multiPolicy = await DatabaseServer.getMultiPolicy(policy.instanceTopicId, did); @@ -86,10 +94,7 @@ export class PolicyComponentsUtils { result.userGroup = null; } - if (!result.userRole) { - result.userRoles = ['No role']; - result.userRole = 'No role'; - } + result.tests = await DatabaseServer.getPolicyTests(policyId); return result; } diff --git a/guardian-service/src/policy-engine/policy-engine.service.ts b/guardian-service/src/policy-engine/policy-engine.service.ts index 70ae09ed1d..bb6021a82b 100644 --- a/guardian-service/src/policy-engine/policy-engine.service.ts +++ b/guardian-service/src/policy-engine/policy-engine.service.ts @@ -1,14 +1,18 @@ import { DocumentCategoryType, DocumentType, + EntityOwner, ExternalMessageEvents, GenerateUUIDv4, IOwner, PolicyEngineEvents, - PolicyEvents, PolicyType, + PolicyEvents, + PolicyType, Schema, SchemaField, - TopicType + TopicType, + PolicyTestStatus, + PolicyHelper } from '@guardian/interfaces'; import { BinaryMessageResponse, @@ -18,23 +22,23 @@ import { IAuthUser, IMessageResponse, JsonToXlsx, - Logger, MessageAction, MessageError, MessageResponse, MessageServer, MessageType, - NatsService, + NatsService, PinoLogger, Policy, PolicyImportExport, PolicyMessage, + RecordImportExport, RunFunctionAsync, Schema as SchemaCollection, Singleton, TopicConfig, Users, VcHelper, - XlsxToJson + XlsxToJson, } from '@guardian/common'; import { PolicyImportExportHelper } from './helpers/policy-import-export-helper.js'; import { PolicyComponentsUtils } from './policy-components-utils.js'; @@ -46,11 +50,12 @@ import { NatsConnection } from 'nats'; import { GuardiansService } from '../helpers/guardians.js'; import { BlockAboutString } from './block-about.js'; import { HashComparator } from '../analytics/index.js'; -import { getSchemaCategory, importSchemaByFiles, importSubTools, previewToolByMessage } from '../api/helpers/index.js'; +import { getSchemaCategory, SchemaImportExportHelper, importSubTools, previewToolByMessage } from '../api/helpers/index.js'; import { PolicyDataMigrator } from './helpers/policy-data-migrator.js'; import { Inject } from '../helpers/decorators/inject.js'; import { PolicyDataImportExport } from './helpers/policy-data/policy-data-import-export.js'; import { VpDocumentLoader, VcDocumentLoader, PolicyDataLoader } from './helpers/policy-data/loaders/index.js'; +import { compareResults, getDetails } from '../api/record.service.js'; /** * PolicyEngineChannel @@ -102,10 +107,10 @@ export class PolicyEngineService { */ private readonly policyEngine: PolicyEngine; - constructor(cn: NatsConnection) { + constructor(cn: NatsConnection, logger: PinoLogger) { this.channel = new PolicyEngineChannel(); this.channel.setConnection(cn) - this.policyEngine = new PolicyEngine() + this.policyEngine = new PolicyEngine(logger) } /** @@ -181,13 +186,13 @@ export class PolicyEngineService { }); } - private async createHashByFile(file: any): Promise { + private async createHashByFile(file: any, logger: PinoLogger): Promise { try { const compareModel = await HashComparator.createModelByFile(file); const hash = HashComparator.createHash(compareModel); return hash } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE, HASH']); + await logger.error(error, ['GUARDIAN_SERVICE, HASH']); return null; } } @@ -196,7 +201,7 @@ export class PolicyEngineService { * Register endpoints for policy engine * @private */ - public registerListeners(): void { + public registerListeners(logger: PinoLogger): void { PolicyComponentsUtils.BlockUpdateFn = async (...args: any[]) => { await this.stateChangeCb.apply(this, args); }; @@ -217,10 +222,10 @@ export class PolicyEngineService { } }; + //#region Block endpoints this.channel.getMessages(PolicyEvents.BLOCK_UPDATE_BROADCAST, (msg: { type: string, data: any[] }) => { const { type, data } = msg; - switch (type) { case 'update': { const [blocks, user] = data; @@ -247,92 +252,383 @@ export class PolicyEngineService { } }) - this.channel.getMessages(PolicyEvents.RECORD_UPDATE_BROADCAST, async (msg: any) => { - const policy = await DatabaseServer.getPolicyById(msg?.policyId); - if (policy) { - msg.user = { did: policy.owner }; - this.channel.publish('update-record', msg); - } - }) - - this.channel.getMessages('mrv-data', async (msg) => { - // await PolicyComponentsUtils.ReceiveExternalData(msg); - - const policy = await DatabaseServer.getPolicyByTag(msg?.policyTag); - if (policy) { - const policyId = policy.id.toString(); - await new GuardiansService().sendPolicyMessage(PolicyEvents.MRV_DATA, policyId, { - policyId, - data: msg - }); - } - - return new MessageResponse({}) - }); + this.channel.getMessages(PolicyEvents.RECORD_UPDATE_BROADCAST, + async (msg: { + id: string, + type: string, + policyId: string, + status: string, + index: number, + error: string, + count: number, + }) => { + const policy = await DatabaseServer.getPolicyById(msg.policyId); + if (policy) { + const evert = { ...msg, user: { did: policy.owner } }; + this.channel.publish('update-record', evert); + } + }) - this.channel.getMessages(PolicyEngineEvents.GET_POLICY, + this.channel.getMessages(PolicyEvents.TEST_UPDATE_BROADCAST, async (msg: { - options: { filters: any, userDid: string }, - owner: IOwner + id: string, + type: string, + policyId: string, + status: string, + index: number, + error: string, + count: number, + result: any }) => { - const { options, owner } = msg; - const { filters, userDid } = options; - const policy = await DatabaseServer.getPolicy(filters); - await this.policyEngine.accessPolicy(policy, owner, 'read'); + if (!msg.id) { + return; + } + const test = await DatabaseServer.getPolicyTestByRecord(msg.id); + if (test) { + const { status, index, count, error, result } = msg; + switch (status) { + case 'Running': { + test.status = PolicyTestStatus.Running; + test.progress = Math.floor(index / count * 100); + test.result = null; + test.error = null; + break; + } + case 'Stopped': { + test.result = await getDetails(result); + if (test.result?.total === 100) { + test.status = PolicyTestStatus.Success; + } else { + test.status = PolicyTestStatus.Failure; + } + test.progress = null; + test.error = null; + test.resultId = null; + break; + } + case 'Error': { + test.status = PolicyTestStatus.Failure; + test.result = null; + test.progress = null; + test.error = error; + test.resultId = null; + break; + } + case 'Finished': { + if (test.status === PolicyTestStatus.Running) { + test.status = PolicyTestStatus.Stopped; + test.result = null; + test.progress = null; + test.error = null; + test.resultId = null; + break; + } else { + return; + } + } + default: { + return; + } + } + await DatabaseServer.updatePolicyTest(test); + const evert = { + id: test.id, + policyId: test.policyId, + date: test.date, + progress: test.progress, + status: test.status, + user: { did: test.owner } + }; + this.channel.publish('update-test', evert); + } + }) - const result: any = policy; + this.channel.getMessages('mrv-data', + async (msg: any) => { + // await PolicyComponentsUtils.ReceiveExternalData(msg); + const policy = await DatabaseServer.getPolicyByTag(msg?.policyTag); if (policy) { - await PolicyComponentsUtils.GetPolicyInfo(policy, userDid); + const policyId = policy.id.toString(); + await new GuardiansService() + .sendPolicyMessage(PolicyEvents.MRV_DATA, policyId, { + policyId, + data: msg + }); } - - return new MessageResponse(result); + return new MessageResponse({}) }); - this.channel.getMessages(PolicyEngineEvents.ACCESS_POLICY, - async (msg: { policyId: string, owner: IOwner, action: string }) => { + this.channel.getMessages(PolicyEngineEvents.POLICY_BLOCKS, + async (msg: { policyId: string, user: IAuthUser }): Promise> => { try { - const { policyId, owner, action } = msg; + const { user, policyId } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); - const code = await this.policyEngine.accessPolicyCode(policy, owner); - if (code === 1) { - return new MessageError('Policy does not exist.', 404); - } - if (code === 2) { - return new MessageError(`Insufficient permissions to ${action} the policy.`, 403); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + + const error = new PolicyEngine(logger).getPolicyError(policyId); + + if (error) { + throw new Error(error); } - return new MessageResponse(policy); - } catch (error: any) { - return new MessageError(error, 500); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.GET_ROOT_BLOCK_DATA, policyId, { + user, + policyId + }) as any; + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_TOKENS_MAP, - async (msg: { owner: IOwner, status: string }) => { + this.channel.getMessages(PolicyEngineEvents.GET_BLOCK_DATA, + async (msg: { user: IAuthUser, blockId: string, policyId: string, params: any }): Promise> => { try { - const { owner, status } = msg; - const filters: any = {}; - if (status) { - filters.status = status; - } - await this.policyEngine.addAccessFilters(filters, owner); - const policies = await DatabaseServer.getPolicies(filters); - const map: any = []; - for (const policyObject of policies) { - const tokenIds = findAllEntities(policyObject.config, ['tokenId']); - map.push({ - tokenIds, - name: policyObject.name, - version: policyObject.version, - id: policyObject.id, - status: policyObject.status + const { user, blockId, policyId, params } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.GET_BLOCK_DATA, policyId, { + user, + blockId, + policyId, + params + }) as any + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.GET_BLOCK_DATA_BY_TAG, + async (msg: { user: IAuthUser, tag: string, policyId: string, params: any }): Promise> => { + try { + const { user, tag, policyId, params } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.GET_BLOCK_DATA_BY_TAG, policyId, { + user, + tag, + policyId, + params + }) as any + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.SET_BLOCK_DATA, + async (msg: { user: IAuthUser, blockId: string, policyId: string, data: any }): Promise> => { + try { + const { user, blockId, policyId, data } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.SET_BLOCK_DATA, policyId, { + user, + blockId, + policyId, + data + }) as any; + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.SET_BLOCK_DATA_BY_TAG, + async (msg: { user: IAuthUser, tag: string, policyId: string, data: any }): Promise> => { + try { + const { user, tag, policyId, data } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.SET_BLOCK_DATA_BY_TAG, policyId, { + user, + tag, + policyId, + data + }) as any + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.BLOCK_BY_TAG, + async (msg: { user: IAuthUser, tag: string, policyId: string }): Promise> => { + try { + const { user, tag, policyId } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.BLOCK_BY_TAG, policyId, { + tag, + policyId, + }) as any + return new MessageResponse(blockData); + } catch (error) { + return new MessageError('The policy does not exist, or is not published, or tag was not registered in policy', 404); + } + }); + + this.channel.getMessages(PolicyEngineEvents.GET_BLOCK_PARENTS, + async (msg: { user: IAuthUser, blockId: string, policyId: string }): Promise> => { + try { + const { user, blockId, policyId } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.GET_BLOCK_PARENTS, policyId, { blockId }); + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.GET_POLICY_NAVIGATION, + async (msg: { user: IAuthUser, policyId: string }): Promise> => { + try { + const { user, policyId } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const navigationData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.GET_POLICY_NAVIGATION, policyId, { + user + }) as any; + return new MessageResponse(navigationData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.GET_POLICY_GROUPS, + async (msg: { user: IAuthUser, policyId: string }): Promise> => { + try { + const { user, policyId } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.GET_POLICY_GROUPS, policyId, { + user, + policyId + }) as any; + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.SELECT_POLICY_GROUP, + async (msg: { user: IAuthUser, policyId: string, uuid: string }): Promise> => { + try { + const { user, policyId, uuid } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, new EntityOwner(user), 'execute'); + const blockData = await new GuardiansService() + .sendPolicyMessage(PolicyEvents.SELECT_POLICY_GROUP, policyId, { + user, + policyId, + uuid + }) as any; + return new MessageResponse(blockData); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.RECEIVE_EXTERNAL_DATA, + async (msg: any) => { + try { + const policy = await DatabaseServer.getPolicyByTag(msg?.policyTag); + if (policy) { + const policyId = policy.id.toString(); + new GuardiansService().sendPolicyMessage(PolicyEvents.MRV_DATA, policyId, { + policyId, + data: msg }); } - return new MessageResponse(map); + return new MessageResponse(true); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.GET_TAG_BLOCK_MAP, + async (msg: { policyId: string, owner: IOwner }) => { + try { + const { policyId, owner } = msg; + const userPolicy = await DatabaseServer.getPolicyCache({ + id: policyId, + userId: owner.creator + }); + if (userPolicy) { + return new MessageResponse(userPolicy.blocks); + } + + const policy = await DatabaseServer.getPolicy({ + id: policyId, + status: { + $in: [ + PolicyType.DRY_RUN, + PolicyType.PUBLISH, + PolicyType.DISCONTINUED, + ], + }, + }); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + + const blocks = + await new GuardiansService().sendPolicyMessage( + PolicyEvents.GET_TAG_BLOCK_MAP, + policyId, + null + ); + return new MessageResponse(blocks); } catch (error) { return new MessageError(error); } }); + this.channel.getMessages(PolicyEngineEvents.BLOCK_ABOUT, async () => { + try { + return new MessageResponse(BlockAboutString); + } catch (error) { + return new MessageError(error); + } + }); + //#endregion + + //#region Policy endpoints + this.channel.getMessages(PolicyEngineEvents.GET_POLICY, + async (msg: { + options: { filters: any, userDid: string }, + owner: IOwner + }) => { + const { options, owner } = msg; + const { filters, userDid } = options; + const policy = await DatabaseServer.getPolicy(filters); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + const result: any = policy; + if (policy) { + await PolicyComponentsUtils.GetPolicyInfo(policy, userDid); + } + return new MessageResponse(result); + }); + this.channel.getMessages(PolicyEngineEvents.GET_POLICIES, async (msg: { options: any, owner: IOwner }) => { try { @@ -417,288 +713,13 @@ export class PolicyEngineService { } }); - this.channel.getMessages(PolicyEngineEvents.CREATE_POLICIES, - async (msg: { model: Policy, owner: IOwner }): Promise> => { - try { - const { model, owner } = msg; - let policy = await this.policyEngine.createPolicy(model, owner, emptyNotifier()); - policy = await PolicyImportExportHelper.updatePolicyComponents(policy); - return new MessageResponse(policy); - } catch (error) { - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.CREATE_POLICIES_ASYNC, - async (msg: { model: Policy, owner: IOwner, task: any }): Promise> => { - const { model, owner, task } = msg; - const notifier = await initNotifier(task); - RunFunctionAsync(async () => { - let policy = await this.policyEngine.createPolicy(model, owner, notifier); - policy = await PolicyImportExportHelper.updatePolicyComponents(policy); - notifier.result(policy.id); - }, async (error) => { - notifier.error(error); - }); - return new MessageResponse(task); - }); - - this.channel.getMessages(PolicyEngineEvents.CLONE_POLICY_ASYNC, - async (msg: { policyId: string, model: Policy, owner: IOwner, task: any }): Promise> => { - const { policyId, model, owner, task } = msg; - const notifier = await initNotifier(task); - RunFunctionAsync(async () => { - const result = await this.policyEngine.clonePolicy(policyId, model, owner, notifier); - if (result?.errors?.length) { - const message = `Failed to clone schemas: ${JSON.stringify(result.errors.map(e => e.name))}`; - notifier.error(message); - new Logger().warn(message, ['GUARDIAN_SERVICE']); - return; - } - notifier.result(result.policy.id); - }, async (error) => { - notifier.error(error); - }); - return new MessageResponse(task); - }); - - this.channel.getMessages(PolicyEngineEvents.DELETE_POLICY_ASYNC, - async (msg: { policyId: string, owner: IOwner, task: any }): Promise> => { - const { policyId, owner, task } = msg; - const notifier = await initNotifier(task); - RunFunctionAsync(async () => { - notifier.result(await this.policyEngine.deletePolicy(policyId, owner, notifier)); - }, async (error) => { - notifier.error(error); - }); - return new MessageResponse(task); - }); - - this.channel.getMessages(PolicyEngineEvents.SAVE_POLICIES, - async (msg: { policyId: string, model: Policy, owner: IOwner }): Promise> => { - try { - const { policyId, model, owner } = msg; - const policy = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(policy, owner, 'update'); - - if (policy.status !== PolicyType.DRAFT) { - throw new Error('Policy is not in draft status.'); - } - let result = await DatabaseServer.updatePolicyConfig(policyId, model); - result = await PolicyImportExportHelper.updatePolicyComponents(result); - return new MessageResponse(result); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.PUBLISH_POLICIES, - async (msg: { policyId: string, model: any, owner: IOwner }): Promise> => { - try { - const { model, policyId, owner } = msg; - if (!model || !model.policyVersion) { - throw new Error('Policy version in body is empty'); - } - const result = await this.policyEngine.validateAndPublishPolicy(model, policyId, owner, emptyNotifier()); - return new MessageResponse({ - isValid: result.isValid, - errors: result.errors, - }); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.PUBLISH_POLICIES_ASYNC, - async (msg: { policyId: string, model: any, owner: IOwner, task: any }): Promise> => { - const { model, policyId, owner, task } = msg; - const notifier = await initNotifier(task); - - RunFunctionAsync(async () => { - if (!model || !model.policyVersion) { - throw new Error('Policy version in body is empty'); - } - const result = await this.policyEngine.validateAndPublishPolicy(model, policyId, owner, notifier); - notifier.result(result); - }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); - notifier.error(error); - }); - - return new MessageResponse(task); - }); - - this.channel.getMessages(PolicyEngineEvents.DRY_RUN_POLICIES, - async (msg: { policyId: string, owner: IOwner }): Promise> => { - try { - const { policyId, owner } = msg; - - const model = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(model, owner, 'publish'); - - if (!model.config) { - throw new Error('The policy is empty'); - } - if (model.status === PolicyType.PUBLISH) { - throw new Error(`Policy published`); - } - if (model.status === PolicyType.DISCONTINUED) { - throw new Error(`Policy is discontinued`); - } - if (model.status === PolicyType.DRY_RUN) { - throw new Error(`Policy already in Dry Run`); - } - if (model.status === PolicyType.PUBLISH_ERROR) { - throw new Error(`Failed policy cannot be started in dry run mode`); - } - - const errors = await this.policyEngine.validateModel(policyId); - const isValid = !errors.blocks.some(block => !block.isValid); - - if (isValid) { - const newPolicy = await this.policyEngine.dryRunPolicy(model, owner, 'Dry Run'); - await this.policyEngine.generateModel(newPolicy.id.toString()); - } - return new MessageResponse({ - isValid, - errors - }); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.DISCONTINUE_POLICY, - async (msg: { policyId: string, owner: IOwner, date: any }): Promise> => { - try { - const { policyId, owner, date } = msg; - - const model = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(model, owner, 'discontinue'); - - if (model.status !== PolicyType.PUBLISH) { - throw new Error(`Policy is not published`); - } - - const root = await this.users.getHederaAccount(owner.creator); - const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions); - let message: PolicyMessage; - if (date) { - const _date = new Date(date); - _date.setHours(0, 0, 0, 0); - const now = new Date(); - if (_date.getTime() < now.getTime()) { - throw new Error('Date must be more than today'); - } - model.discontinuedDate = _date; - message = new PolicyMessage(MessageType.Policy, MessageAction.DeferredDiscontinuePolicy); - } else { - model.status = PolicyType.DISCONTINUED; - model.discontinuedDate = new Date(); - message = new PolicyMessage(MessageType.Policy, MessageAction.DiscontinuePolicy); - } - message.setDocument(model); - const topic = await TopicConfig.fromObject(await DatabaseServer.getTopicById(model.topicId), true); - await messageServer - .setTopicObject(topic) - .sendMessage(message); - await DatabaseServer.updatePolicy(model); - - await new GuardiansService().sendPolicyMessage(PolicyEvents.REFRESH_MODEL, policyId, {}); - - return new MessageResponse(true); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.DRAFT_POLICIES, - async (msg: { policyId: string, owner: IOwner }): Promise> => { - try { - const { policyId, owner } = msg; - - const model = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(model, owner, 'edit'); - - if (!model.config) { - throw new Error('The policy is empty'); - } - if (model.status === PolicyType.PUBLISH) { - throw new Error(`Policy published`); - } - if (model.status === PolicyType.DISCONTINUED) { - throw new Error(`Policy is discontinued`); - } - if (model.status === PolicyType.DRAFT) { - throw new Error(`Policy already in draft`); - } - - model.status = PolicyType.DRAFT; - model.version = ''; - - let retVal = await DatabaseServer.updatePolicy(model); - retVal = await PolicyImportExportHelper.updatePolicyComponents(retVal); - - await this.policyEngine.destroyModel(model.id.toString()); - - const databaseServer = new DatabaseServer(model.id.toString()); - await databaseServer.clearDryRun(); - - return new MessageResponse(true); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.VALIDATE_POLICIES, - async (msg: { policyId: string, model: Policy, owner: IOwner }): Promise> => { - try { - const { model } = msg; - const results = await this.policyEngine.validateModel(model); - return new MessageResponse({ - results, - policy: model - }); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.POLICY_BLOCKS, - async (msg: { policyId: string, user: IAuthUser }): Promise> => { - try { - const { user, policyId } = msg; - - const error = new PolicyEngine().getPolicyError(policyId); - if (error) { - throw new Error(error); - } - - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.GET_ROOT_BLOCK_DATA, policyId, { - user, - policyId - }) as any; - return new MessageResponse(blockData); - - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - this.channel.getMessages(PolicyEngineEvents.GET_PUBLISH_POLICIES, async (): Promise> => { try { const publishPolicies = await DatabaseServer.getPublishPolicies(); return new MessageResponse(publishPolicies); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -708,17 +729,12 @@ export class PolicyEngineService { try { const { policiesData } = msg; const policySchemas = []; - for (const policy of policiesData) { const policyId = policy.policyId; const topicId = policy.topicId; - const dbSchemas = await DatabaseServer.getSchemas({ topicId }); - const schemas = dbSchemas.map((schema: SchemaCollection) => new Schema(schema)); - const nonSystemSchemas = schemas.filter(schema => !schema.system); - const policyDescriptions: string[] = []; for (const schema of nonSystemSchemas) { const fields = schema?.fields; @@ -730,10 +746,9 @@ export class PolicyEngineService { descriptions: Array.from(new Set(policyDescriptions)) }); } - return new MessageResponse(policySchemas); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -745,151 +760,375 @@ export class PolicyEngineService { const resultPolicies = await DatabaseServer.getFilteredPolicies(categoryIds, text); return new MessageResponse(resultPolicies); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_BLOCK_DATA, - async (msg: { user: IAuthUser, blockId: string, policyId: string }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.GET_MULTI_POLICY, + async (msg: { owner: IOwner, policyId: string }) => { try { - const { user, blockId, policyId } = msg; - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.GET_BLOCK_DATA, policyId, { - user, - blockId, - policyId - }) as any - return new MessageResponse(blockData); + const { owner, policyId } = msg; + + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + + const item = await DatabaseServer.getMultiPolicy(policy.instanceTopicId, owner.creator); + if (item) { + return new MessageResponse(item); + } else { + return new MessageResponse({ + uuid: null, + instanceTopicId: policy.instanceTopicId, + mainPolicyTopicId: policy.instanceTopicId, + synchronizationTopicId: policy.synchronizationTopicId, + owner: owner.creator, + type: null + }); + } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_BLOCK_DATA_BY_TAG, - async (msg: { user: IAuthUser, tag: string, policyId: string }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.SET_MULTI_POLICY, + async (msg: { owner: IOwner, policyId: string, data: any }) => { try { - const { user, tag, policyId } = msg; - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.GET_BLOCK_DATA_BY_TAG, policyId, { - user, - tag, - policyId - }) as any - return new MessageResponse(blockData); + const { owner, policyId, data } = msg; + + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + + const item = await DatabaseServer.getMultiPolicy(policy.instanceTopicId, owner.creator); + const userAccount = await this.users.getHederaAccount(owner.creator); + if (item) { + return new MessageError(new Error('Policy is already bound')); + } else { + const root = await this.users.getHederaAccount(policy.creator); + const result = await this.policyEngine.createMultiPolicy(policy, userAccount, root, data); + return new MessageResponse(result); + } } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.SET_BLOCK_DATA, - async (msg: { user: IAuthUser, blockId: string, policyId: string, data: any }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.GET_TOKENS_MAP, + async (msg: { owner: IOwner, status: string }) => { try { - const { user, blockId, policyId, data } = msg; + const { owner, status } = msg; + const filters: any = {}; + if (status) { + filters.status = status; + } + await this.policyEngine.addAccessFilters(filters, owner); + const policies = await DatabaseServer.getPolicies(filters); + const map: any = []; + for (const policyObject of policies) { + const tokenIds = findAllEntities(policyObject.config, ['tokenId']); + map.push({ + tokenIds, + name: policyObject.name, + version: policyObject.version, + id: policyObject.id, + status: policyObject.status + }); + } + return new MessageResponse(map); + } catch (error) { + return new MessageError(error); + } + }); - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.SET_BLOCK_DATA, policyId, { - user, - blockId, - policyId, - data - }) as any; - return new MessageResponse(blockData); + this.channel.getMessages(PolicyEngineEvents.ACCESS_POLICY, + async (msg: { policyId: string, owner: IOwner, action: string }) => { + try { + const { policyId, owner, action } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + const code = await this.policyEngine.accessPolicyCode(policy, owner); + if (code === 1) { + return new MessageError('Policy does not exist.', 404); + } + if (code === 2) { + return new MessageError(`Insufficient permissions to ${action} the policy.`, 403); + } + return new MessageResponse(policy); + } catch (error: any) { + return new MessageError(error, 500); + } + }); + //#endregion + + //#region Actions endpoints + this.channel.getMessages(PolicyEngineEvents.CREATE_POLICIES, + async (msg: { model: Policy, owner: IOwner }): Promise> => { + try { + const { model, owner } = msg; + let policy = await this.policyEngine.createPolicy(model, owner, emptyNotifier(), logger); + policy = await PolicyImportExportHelper.updatePolicyComponents(policy, logger); + return new MessageResponse(policy); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.SET_BLOCK_DATA_BY_TAG, - async (msg: { user: IAuthUser, tag: string, policyId: string, data: any }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.CREATE_POLICIES_ASYNC, + async (msg: { model: Policy, owner: IOwner, task: any }): Promise> => { + const { model, owner, task } = msg; + const notifier = await initNotifier(task); + RunFunctionAsync(async () => { + let policy = await this.policyEngine.createPolicy(model, owner, notifier, logger); + policy = await PolicyImportExportHelper.updatePolicyComponents(policy, logger); + notifier.result(policy.id); + }, async (error) => { + notifier.error(error); + }); + return new MessageResponse(task); + }); + + this.channel.getMessages(PolicyEngineEvents.CLONE_POLICY_ASYNC, + async (msg: { policyId: string, model: Policy, owner: IOwner, task: any }): Promise> => { + const { policyId, model, owner, task } = msg; + const notifier = await initNotifier(task); + RunFunctionAsync(async () => { + const result = await this.policyEngine.clonePolicy(policyId, model, owner, notifier, logger); + if (result?.errors?.length) { + const message = `Failed to clone schemas: ${JSON.stringify(result.errors.map(e => e.name))}`; + notifier.error(message); + await logger.warn(message, ['GUARDIAN_SERVICE']); + return; + } + notifier.result(result.policy.id); + }, async (error) => { + notifier.error(error); + }); + return new MessageResponse(task); + }); + + this.channel.getMessages(PolicyEngineEvents.DELETE_POLICY_ASYNC, + async (msg: { policyId: string, owner: IOwner, task: any }): Promise> => { + const { policyId, owner, task } = msg; + const notifier = await initNotifier(task); + RunFunctionAsync(async () => { + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'delete'); + if (policy.status === PolicyType.DEMO) { + notifier.result(await this.policyEngine.deleteDemoPolicy(policy, owner, notifier, logger)); + } else { + notifier.result(await this.policyEngine.deletePolicy(policy, owner, notifier, logger)); + } + }, async (error) => { + notifier.error(error); + }); + return new MessageResponse(task); + }); + + this.channel.getMessages(PolicyEngineEvents.SAVE_POLICIES, + async (msg: { policyId: string, model: Policy, owner: IOwner }): Promise> => { try { - const { user, tag, policyId, data } = msg; - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.SET_BLOCK_DATA_BY_TAG, policyId, { - user, - tag, - policyId, - data - }) as any - return new MessageResponse(blockData); + const { policyId, model, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'update'); + + if (policy.status !== PolicyType.DRAFT) { + throw new Error('Policy is not in draft status.'); + } + let result = await DatabaseServer.updatePolicyConfig(policyId, model); + result = await PolicyImportExportHelper.updatePolicyComponents(result, logger); + return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.BLOCK_BY_TAG, - async (msg: { user: IAuthUser, tag: string, policyId: string }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.PUBLISH_POLICIES, + async (msg: { policyId: string, model: any, owner: IOwner }): Promise> => { try { - const { tag, policyId } = msg; - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.BLOCK_BY_TAG, policyId, { - tag, - policyId, - }) as any - return new MessageResponse(blockData); + const { model, policyId, owner } = msg; + if (!model || !model.policyVersion) { + throw new Error('Policy version in body is empty'); + } + const result = await this.policyEngine.validateAndPublishPolicy(model, policyId, owner, emptyNotifier(), logger); + return new MessageResponse({ + isValid: result.isValid, + errors: result.errors, + }); } catch (error) { - return new MessageError('The policy does not exist, or is not published, or tag was not registered in policy', 404); + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_BLOCK_PARENTS, - async (msg: { user: IAuthUser, blockId: string, policyId: string }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.PUBLISH_POLICIES_ASYNC, + async (msg: { policyId: string, model: any, owner: IOwner, task: any }): Promise> => { + const { model, policyId, owner, task } = msg; + const notifier = await initNotifier(task); + + RunFunctionAsync(async () => { + if (!model || !model.policyVersion) { + throw new Error('Policy version in body is empty'); + } + const result = await this.policyEngine.validateAndPublishPolicy(model, policyId, owner, notifier, logger); + notifier.result(result); + }, async (error) => { + await logger.error(error, ['GUARDIAN_SERVICE']); + notifier.error(error); + }); + + return new MessageResponse(task); + }); + + this.channel.getMessages(PolicyEngineEvents.DRY_RUN_POLICIES, + async (msg: { policyId: string, owner: IOwner }): Promise> => { try { - const { blockId, policyId } = msg; - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.GET_BLOCK_PARENTS, policyId, { blockId }); - return new MessageResponse(blockData); + const { policyId, owner } = msg; + + const model = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(model, owner, 'publish'); + + if (!model.config) { + throw new Error('The policy is empty'); + } + if (model.status === PolicyType.PUBLISH) { + throw new Error(`Policy published`); + } + if (model.status === PolicyType.DISCONTINUED) { + throw new Error(`Policy is discontinued`); + } + if (model.status === PolicyType.DRY_RUN) { + throw new Error(`Policy already in Dry Run`); + } + if (model.status === PolicyType.PUBLISH_ERROR) { + throw new Error(`Failed policy cannot be started in dry run mode`); + } + if (model.status === PolicyType.DEMO) { + throw new Error(`Policy imported in demo mode`); + } + + const errors = await this.policyEngine.validateModel(policyId); + const isValid = !errors.blocks.some(block => !block.isValid); + if (isValid) { + const newPolicy = await this.policyEngine.dryRunPolicy(model, owner, 'Dry Run', false, logger); + await this.policyEngine.generateModel(newPolicy.id.toString()); + } + + return new MessageResponse({ + isValid, + errors + }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_POLICY_NAVIGATION, - async (msg: { user: IAuthUser, policyId: string }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.DISCONTINUE_POLICY, + async (msg: { policyId: string, owner: IOwner, date: any }): Promise> => { try { - const { user, policyId } = msg; + const { policyId, owner, date } = msg; - const navigationData = await new GuardiansService().sendPolicyMessage(PolicyEvents.GET_POLICY_NAVIGATION, policyId, { - user - }) as any; - return new MessageResponse(navigationData); + const model = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(model, owner, 'discontinue'); + + if (model.status !== PolicyType.PUBLISH) { + throw new Error(`Policy is not published`); + } + + const root = await this.users.getHederaAccount(owner.creator); + const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions); + let message: PolicyMessage; + if (date) { + const _date = new Date(date); + _date.setHours(0, 0, 0, 0); + const now = new Date(); + if (_date.getTime() < now.getTime()) { + throw new Error('Date must be more than today'); + } + model.discontinuedDate = _date; + message = new PolicyMessage(MessageType.Policy, MessageAction.DeferredDiscontinuePolicy); + } else { + model.status = PolicyType.DISCONTINUED; + model.discontinuedDate = new Date(); + message = new PolicyMessage(MessageType.Policy, MessageAction.DiscontinuePolicy); + } + message.setDocument(model); + const topic = await TopicConfig.fromObject(await DatabaseServer.getTopicById(model.topicId), true); + await messageServer + .setTopicObject(topic) + .sendMessage(message); + await DatabaseServer.updatePolicy(model); + + await new GuardiansService().sendPolicyMessage(PolicyEvents.REFRESH_MODEL, policyId, {}); + + return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_POLICY_GROUPS, - async (msg: { user: IAuthUser, policyId: string }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.DRAFT_POLICIES, + async (msg: { policyId: string, owner: IOwner }): Promise> => { try { - const { user, policyId } = msg; + const { policyId, owner } = msg; - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.GET_POLICY_GROUPS, policyId, { - user, - policyId - }) as any; - return new MessageResponse(blockData); + const model = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(model, owner, 'edit'); + + if (!model.config) { + throw new Error('The policy is empty'); + } + if (model.status === PolicyType.PUBLISH) { + throw new Error(`Policy published`); + } + if (model.status === PolicyType.DISCONTINUED) { + throw new Error(`Policy is discontinued`); + } + if (model.status === PolicyType.DRAFT) { + throw new Error(`Policy already in draft`); + } + if (model.status === PolicyType.DEMO) { + throw new Error(`Policy imported in demo mode`); + } + + model.status = PolicyType.DRAFT; + model.version = ''; + + let retVal = await DatabaseServer.updatePolicy(model); + retVal = await PolicyImportExportHelper.updatePolicyComponents(retVal, logger); + + await this.policyEngine.destroyModel(model.id.toString()); + + const databaseServer = new DatabaseServer(model.id.toString()); + await databaseServer.clear(true); + + return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.SELECT_POLICY_GROUP, - async (msg: { user: IAuthUser, policyId: string, uuid: string }): Promise> => { + this.channel.getMessages(PolicyEngineEvents.VALIDATE_POLICIES, + async (msg: { policyId: string, model: Policy, owner: IOwner }): Promise> => { try { - const { user, policyId, uuid } = msg; - const blockData = await new GuardiansService().sendPolicyMessage(PolicyEvents.SELECT_POLICY_GROUP, policyId, { - user, - policyId, - uuid - }) as any; - return new MessageResponse(blockData); + const { model } = msg; + const results = await this.policyEngine.validateModel(model); + return new MessageResponse({ + results, + policy: model + }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); + //#endregion + //#region Export endpoints this.channel.getMessages(PolicyEngineEvents.POLICY_EXPORT_FILE, async (msg: { policyId: string, owner: IOwner }): Promise> => { try { @@ -907,7 +1146,7 @@ export class PolicyEngineService { console.log('File size: ' + file.byteLength); return new BinaryMessageResponse(file); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -927,7 +1166,7 @@ export class PolicyEngineService { owner: policy.owner }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -942,12 +1181,14 @@ export class PolicyEngineService { const buffer = await JsonToXlsx.generate(schemas, tools, toolSchemas); return new BinaryMessageResponse(buffer); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); console.error(error); return new MessageError(error); } }); + //#endregion + //#region Import endpoints this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_FILE_PREVIEW, async (msg: { zip: any, owner: IOwner }): Promise> => { try { @@ -955,58 +1196,74 @@ export class PolicyEngineService { if (!zip) { throw new Error('file in body is empty'); } - const policyToImport: any = await PolicyImportExport.parseZipFile(Buffer.from(zip.data), true); - const hash = await this.createHashByFile(policyToImport); - + const policyToImport = await PolicyImportExport.parseZipFile(Buffer.from(zip.data), true); + const hash = await this.createHashByFile(policyToImport, logger); const filters = await this.policyEngine.addAccessFilters({ hash }, owner); const similarPolicies = await DatabaseServer.getListOfPolicies(filters); - policyToImport.similar = similarPolicies; + (policyToImport as any).similar = similarPolicies; return new MessageResponse(policyToImport); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_FILE, - async (msg: { zip: any, owner: IOwner, versionOfTopicId: string, metadata: any }): Promise> => { + async (msg: { + zip: any, + owner: IOwner, + versionOfTopicId: string, + metadata: any, + demo: boolean + }): Promise> => { try { - const { zip, owner, versionOfTopicId, metadata } = msg; + const { zip, owner, versionOfTopicId, metadata, demo } = msg; if (!zip) { throw new Error('file in body is empty'); } - new Logger().info(`Import policy by file`, ['GUARDIAN_SERVICE']); + await logger.info(`Import policy by file`, ['GUARDIAN_SERVICE']); const policyToImport = await PolicyImportExport.parseZipFile(Buffer.from(zip.data), true); const result = await PolicyImportExportHelper.importPolicy( policyToImport, owner, versionOfTopicId, - emptyNotifier(), - undefined, - metadata + logger, + null, + metadata, + demo ); if (result?.errors?.length) { const message = PolicyImportExportHelper.errorsMessage(result.errors); - new Logger().warn(message, ['GUARDIAN_SERVICE']); + await logger.warn(message, ['GUARDIAN_SERVICE']); return new MessageError(message); } + if (demo) { + await this.policyEngine.startDemo(result.policy, owner, logger); + } return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_FILE_ASYNC, - async (msg: { zip: any, owner: IOwner, versionOfTopicId: string, metadata: any, task: any }): Promise> => { - const { zip, owner, versionOfTopicId, task, metadata } = msg; + async (msg: { + zip: any, + owner: IOwner, + versionOfTopicId: string, + metadata: any, + demo: boolean, + task: any + }): Promise> => { + const { zip, owner, versionOfTopicId, task, metadata, demo } = msg; const notifier = await initNotifier(task); RunFunctionAsync(async () => { if (!zip) { throw new Error('file in body is empty'); } - new Logger().info(`Import policy by file`, ['GUARDIAN_SERVICE']); + await logger.info(`Import policy by file`, ['GUARDIAN_SERVICE']); notifier.start('File parsing'); const policyToImport = await PolicyImportExport.parseZipFile(Buffer.from(zip.data), true); notifier.completed(); @@ -1014,25 +1271,143 @@ export class PolicyEngineService { policyToImport, owner, versionOfTopicId, - notifier, - undefined, - metadata + logger, + null, + metadata, + demo, + notifier ); if (result?.errors?.length) { const message = PolicyImportExportHelper.errorsMessage(result.errors); notifier.error(message); - new Logger().warn(message, ['GUARDIAN_SERVICE']); + await logger.warn(message, ['GUARDIAN_SERVICE']); return; } - notifier.result({ - policyId: result.policy.id, - errors: result.errors - }); - }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); - notifier.error(error); + if (demo) { + await this.policyEngine.startDemo(result.policy, owner, logger, notifier); + } + notifier.result({ + policyId: result.policy.id, + errors: result.errors + }); + }, async (error) => { + await logger.error(error, ['GUARDIAN_SERVICE']); + notifier.error(error); + }); + return new MessageResponse(task); + }); + + this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE_PREVIEW, + async (msg: { messageId: string, owner: IOwner }): Promise> => { + try { + const { messageId, owner } = msg; + const policyToImport = await this.policyEngine + .preparePolicyPreviewMessage(messageId, owner, emptyNotifier(), logger); + const hash = await this.createHashByFile(policyToImport, logger); + const filters = await this.policyEngine.addAccessFilters({ hash }, owner); + const similarPolicies = await DatabaseServer.getListOfPolicies(filters); + policyToImport.similar = similarPolicies; + return new MessageResponse(policyToImport); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE_PREVIEW_ASYNC, + async (msg: { + messageId: string, + owner: IOwner, + task: any + }): Promise> => { + const { messageId, owner, task } = msg; + const notifier = await initNotifier(task); + + RunFunctionAsync(async () => { + const policyToImport = await this.policyEngine.preparePolicyPreviewMessage(messageId, owner, notifier, logger); + const hash = await this.createHashByFile(policyToImport, logger); + const filters = await this.policyEngine.addAccessFilters({ hash }, owner); + const similarPolicies = await DatabaseServer.getListOfPolicies(filters); + policyToImport.similar = similarPolicies; + notifier.result(policyToImport); + }, async (error) => { + await logger.error(error, ['GUARDIAN_SERVICE']); + notifier.error(error); + }); + return new MessageResponse(task); + }); + + this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE, + async (msg: { + messageId: string, + owner: IOwner, + versionOfTopicId: string, + metadata: any, + demo: boolean + }): Promise> => { + try { + const { messageId, owner, versionOfTopicId, metadata, demo } = msg; + if (!messageId) { + throw new Error('Policy ID in body is empty'); + } + const root = await this.users.getHederaAccount(owner.creator); + const result = await this.policyEngine + .importPolicyMessage(messageId, owner, root, versionOfTopicId, logger, metadata, demo); + if (result?.errors?.length) { + const message = PolicyImportExportHelper.errorsMessage(result.errors); + await logger.warn(message, ['GUARDIAN_SERVICE']); + return new MessageError(message); + } + if (demo) { + await this.policyEngine.startDemo(result.policy, owner, logger); + } + return new MessageResponse(true); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE_ASYNC, + async (msg: { + messageId: string, + owner: IOwner, + versionOfTopicId: string, + metadata: any, + demo: boolean, + task: any + }): Promise> => { + const { messageId, owner, versionOfTopicId, task, metadata, demo } = msg; + const notifier = await initNotifier(task); + + RunFunctionAsync(async () => { + try { + if (!messageId) { + throw new Error('Policy ID in body is empty'); + } + notifier.start('Resolve Hedera account'); + const root = await this.users.getHederaAccount(owner.creator); + notifier.completed(); + const result = await this.policyEngine + .importPolicyMessage(messageId, owner, root, versionOfTopicId, logger, metadata, demo, notifier); + if (result?.errors?.length) { + const message = PolicyImportExportHelper.errorsMessage(result.errors); + notifier.error(message); + await logger.warn(message, ['GUARDIAN_SERVICE']); + return; + } + if (demo) { + await this.policyEngine.startDemo(result.policy, owner, logger, notifier); + } + notifier.result({ + policyId: result.policy.id, + errors: result.errors + }); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + notifier.error(error); + } }); - return new MessageResponse(task); }); @@ -1060,7 +1435,7 @@ export class PolicyEngineService { GenerateBlocks.generate(xlsxResult); return new MessageResponse(xlsxResult.toJson()); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); @@ -1076,7 +1451,6 @@ export class PolicyEngineService { throw new Error('file in body is empty'); } const root = await this.users.getHederaAccount(owner.creator); - const xlsxResult = await XlsxToJson.parse(Buffer.from(xlsx.data)); const { tools, errors } = await importSubTools(root, xlsxResult.getToolIds(), owner, notifier); for (const tool of tools) { @@ -1088,27 +1462,34 @@ export class PolicyEngineService { xlsxResult.addErrors(errors); GenerateBlocks.generate(xlsxResult); const category = await getSchemaCategory(policy.topicId); - const result = await importSchemaByFiles( - category, - owner, + const result = await SchemaImportExportHelper.importSchemaByFiles( xlsxResult.schemas, - policy.topicId, - notifier, - true + owner, + { + category, + topicId: policy.topicId, + skipGenerateId: true + }, + notifier ); - await PolicyImportExportHelper.updatePolicyComponents(policy); + await PolicyImportExportHelper.updatePolicyComponents(policy, logger); return new MessageResponse({ policyId: policy.id, errors: result.errors }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_XLSX_ASYNC, - async (msg: { xlsx: any, policyId: string, owner: IOwner, task: any }): Promise> => { + async (msg: { + xlsx: any, + policyId: string, + owner: IOwner, + task: any + }): Promise> => { const { xlsx, policyId, owner, task } = msg; const notifier = await initNotifier(task); @@ -1118,10 +1499,9 @@ export class PolicyEngineService { if (!xlsx) { throw new Error('file in body is empty'); } - new Logger().info(`Import policy by xlsx`, ['GUARDIAN_SERVICE']); + await logger.info(`Import policy by xlsx`, ['GUARDIAN_SERVICE']); const root = await this.users.getHederaAccount(owner.creator); notifier.start('File parsing'); - const xlsxResult = await XlsxToJson.parse(Buffer.from(xlsx.data)); const { tools, errors } = await importSubTools(root, xlsxResult.getToolIds(), owner, notifier); for (const tool of tools) { @@ -1133,159 +1513,39 @@ export class PolicyEngineService { xlsxResult.addErrors(errors); GenerateBlocks.generate(xlsxResult); const category = await getSchemaCategory(policy.topicId); - const result = await importSchemaByFiles( - category, - owner, + const result = await SchemaImportExportHelper.importSchemaByFiles( xlsxResult.schemas, - policy.topicId, - notifier, - true + owner, + { + category, + topicId: policy.topicId, + skipGenerateId: true + }, + notifier ); - await PolicyImportExportHelper.updatePolicyComponents(policy); - + await PolicyImportExportHelper.updatePolicyComponents(policy, logger); notifier.result({ policyId: policy.id, errors: result.errors }); }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); - notifier.error(error); - }); - - return new MessageResponse(task); - }); - - this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE_PREVIEW, - async (msg: { messageId: string, owner: IOwner }): Promise> => { - try { - const { messageId, owner } = msg; - const policyToImport = await this.policyEngine.preparePolicyPreviewMessage(messageId, owner, emptyNotifier()); - const hash = await this.createHashByFile(policyToImport); - - const filters = await this.policyEngine.addAccessFilters({ hash }, owner); - const similarPolicies = await DatabaseServer.getListOfPolicies(filters); - policyToImport.similar = similarPolicies; - return new MessageResponse(policyToImport); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE_PREVIEW_ASYNC, - async (msg: { messageId: string, owner: IOwner, task: any }): Promise> => { - const { messageId, owner, task } = msg; - const notifier = await initNotifier(task); - - RunFunctionAsync(async () => { - const policyToImport = await this.policyEngine.preparePolicyPreviewMessage(messageId, owner, notifier); - const hash = await this.createHashByFile(policyToImport); - - const filters = await this.policyEngine.addAccessFilters({ hash }, owner); - const similarPolicies = await DatabaseServer.getListOfPolicies(filters); - policyToImport.similar = similarPolicies; - notifier.result(policyToImport); - }, async (error) => { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); notifier.error(error); }); - - return new MessageResponse(task); - }); - - this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE, - async (msg: { messageId: string, owner: IOwner, versionOfTopicId: string, metadata: any }): Promise> => { - try { - const { messageId, owner, versionOfTopicId, metadata } = msg; - if (!messageId) { - throw new Error('Policy ID in body is empty'); - } - - const root = await this.users.getHederaAccount(owner.creator); - const result = await this.policyEngine.importPolicyMessage(messageId, owner, root, versionOfTopicId, emptyNotifier(), metadata); - if (result?.errors?.length) { - const message = PolicyImportExportHelper.errorsMessage(result.errors); - new Logger().warn(message, ['GUARDIAN_SERVICE']); - return new MessageError(message); - } - return new MessageResponse(true); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.POLICY_IMPORT_MESSAGE_ASYNC, - async (msg: { messageId: string, owner: IOwner, versionOfTopicId: string, metadata: any, task: any }): Promise> => { - const { messageId, owner, versionOfTopicId, task, metadata } = msg; - const notifier = await initNotifier(task); - - RunFunctionAsync(async () => { - try { - if (!messageId) { - throw new Error('Policy ID in body is empty'); - } - notifier.start('Resolve Hedera account'); - const root = await this.users.getHederaAccount(owner.creator); - notifier.completed(); - const result = await this.policyEngine.importPolicyMessage(messageId, owner, root, versionOfTopicId, notifier, metadata); - if (result?.errors?.length) { - const message = PolicyImportExportHelper.errorsMessage(result.errors); - notifier.error(message); - new Logger().warn(message, ['GUARDIAN_SERVICE']); - return; - } - notifier.result({ - policyId: result.policy.id, - errors: result.errors - }); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - notifier.error(error); - } - }); - return new MessageResponse(task); }); + //#endregion - this.channel.getMessages(PolicyEngineEvents.RECEIVE_EXTERNAL_DATA, - async (msg: any) => { - try { - const policy = await DatabaseServer.getPolicyByTag(msg?.policyTag); - if (policy) { - const policyId = policy.id.toString(); - - new GuardiansService().sendPolicyMessage(PolicyEvents.MRV_DATA, policyId, { - policyId, - data: msg - }); - } - return new MessageResponse(true); - } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); - return new MessageError(error); - } - }); - - this.channel.getMessages(PolicyEngineEvents.BLOCK_ABOUT, async () => { - try { - return new MessageResponse(BlockAboutString); - } catch (error) { - return new MessageError(error); - } - }); - + //#region DRY RUN endpoints this.channel.getMessages(PolicyEngineEvents.GET_VIRTUAL_USERS, async (msg: { policyId: string, owner: IOwner }) => { try { const { policyId, owner } = msg; - const model = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(model, owner, 'read'); - if (model.status !== PolicyType.DRY_RUN) { + if (!PolicyHelper.isDryRunMode(model)) { throw new Error(`Policy is not in Dry Run`); } - const users = await DatabaseServer.getVirtualUsers(policyId); return new MessageResponse(users); } catch (error) { @@ -1300,7 +1560,7 @@ export class PolicyEngineService { const model = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(model, owner, 'read'); - if (model.status !== PolicyType.DRY_RUN) { + if (!PolicyHelper.isDryRunMode(model)) { throw new Error(`Policy is not in Dry Run`); } @@ -1321,7 +1581,8 @@ export class PolicyEngineService { username, did, newAccountId.toString(), - newPrivateKey.toString() + newPrivateKey.toString(), + false ); const instanceDB = new DatabaseServer(policyId); @@ -1358,7 +1619,7 @@ export class PolicyEngineService { const model = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(model, owner, 'read'); - if (model.status !== PolicyType.DRY_RUN) { + if (!PolicyHelper.isDryRunMode(model)) { throw new Error(`Policy is not in Dry Run`); } @@ -1378,44 +1639,210 @@ export class PolicyEngineService { async (msg: { policyId: string, owner: IOwner }) => { try { const { policyId, owner } = msg; - const model = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(model, owner, 'read'); - if (!model.config) { + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + if (!policy.config) { throw new Error('The policy is empty'); } - if (model.status !== PolicyType.DRY_RUN) { + if (!PolicyHelper.isDryRunMode(policy)) { throw new Error(`Policy is not in Dry Run`); } - await this.policyEngine.destroyModel(model.id.toString()); - const databaseServer = new DatabaseServer(model.id.toString()); - await databaseServer.clearDryRun(); - - const newPolicy = await this.policyEngine.dryRunPolicy(model, owner, 'Dry Run'); - await this.policyEngine.generateModel(newPolicy.id.toString()); - + await DatabaseServer.clearDryRun(policyId, false); + const users = await DatabaseServer.getVirtualUsers(policyId); + await DatabaseServer.setVirtualUser(policyId, users[0]?.did); const filters = await this.policyEngine.addAccessFilters({}, owner); const policies = (await DatabaseServer.getListOfPolicies(filters)); return new MessageResponse({ policies }); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.GET_VIRTUAL_DOCUMENTS, + async (msg: { + policyId: string, + type: string, + owner: IOwner, + pageIndex: string, + pageSize: string + }) => { + try { + const { policyId, type, owner, pageIndex, pageSize } = msg; + const model = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(model, owner, 'read'); + if (!PolicyHelper.isDryRunMode(model)) { + throw new Error(`Policy is not in Dry Run`); + } + const documents = await DatabaseServer + .getVirtualDocuments(policyId, type, pageIndex, pageSize); + return new MessageResponse(documents); + } catch (error) { + return new MessageError(error); + } + }); + //#endregion + + //#region Migrate data endpoints + this.channel.getMessages(PolicyEngineEvents.MIGRATE_DATA, + async (msg: { migrationConfig: any, owner: IOwner }) => { + try { + const { migrationConfig, owner } = msg; + const migrationErrors = await PolicyDataMigrator.migrate( + owner.owner, + migrationConfig, + emptyNotifier() + ); + await this.policyEngine.regenerateModel( + migrationConfig.policies.dst + ); + if (migrationErrors.length > 0) { + await logger.warn( + migrationErrors + .map((error) => `${error.id}: ${error.message}`) + .join('\r\n'), + ['GUARDIAN_SERVICE'] + ); + } + return new MessageResponse(migrationErrors); + } catch (error) { + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.MIGRATE_DATA_ASYNC, + async (msg: { migrationConfig: any, owner: IOwner, task: any }) => { + try { + const { migrationConfig, owner, task } = msg; + const notifier = await initNotifier(task); + RunFunctionAsync( + async () => { + const migrationErrors = + await PolicyDataMigrator.migrate( + owner.owner, + migrationConfig, + notifier + ); + await this.policyEngine.regenerateModel( + migrationConfig.policies.dst + ); + if (migrationErrors.length > 0) { + await logger.warn( + migrationErrors + .map( + (error) => + `${error.id}: ${error.message}` + ) + .join('\r\n'), + ['GUARDIAN_SERVICE'] + ); + } + notifier.result(migrationErrors); + }, + async (error) => { + notifier.error(error); + } + ); + } catch (error) { + await logger.error(error, ['GUARDIAN_SERVICE']); + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.DOWNLOAD_VIRTUAL_KEYS, + async (msg: { policyId: string, owner: IOwner }) => { + try { + const { policyId, owner } = msg; + const policy = await DatabaseServer.getPolicy({ + id: policyId, + status: { + $in: [ + PolicyType.DRY_RUN, + PolicyType.DEMO + ] + } + }); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + const zip = await PolicyDataImportExport.exportVirtualKeys(owner, policy.id); + const zippedData = await zip.generateAsync({ + type: 'arraybuffer', + compression: 'DEFLATE', + compressionOptions: { + level: 3, + }, + }); + return new BinaryMessageResponse(zippedData); + } catch (error) { + return new MessageError(error); + } + }); + + this.channel.getMessages(PolicyEngineEvents.UPLOAD_VIRTUAL_KEYS, + async (msg: { policyId: string, data: any, owner: IOwner }) => { + try { + const { policyId, data, owner } = msg; + const policy = await DatabaseServer.getPolicy({ + id: policyId, + status: { + $in: [ + PolicyType.DRY_RUN, + PolicyType.DEMO + ] + } + }); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + await PolicyDataImportExport.importVirtualKeys( + Buffer.from(data), + policy.id + ); + return new MessageResponse(null); + } catch (error) { return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_VIRTUAL_DOCUMENTS, - async (msg: { policyId: string, type: string, owner: IOwner, pageIndex: string, pageSize: string }) => { + this.channel.getMessages(PolicyEngineEvents.DOWNLOAD_POLICY_DATA, + async (msg: { policyId: string, owner: IOwner }) => { try { - const { policyId, type, owner, pageIndex, pageSize } = msg; + const { policyId, owner } = msg; + const policy = await DatabaseServer.getPolicy({ + id: policyId, + status: { + $in: [ + PolicyType.DRY_RUN, + PolicyType.PUBLISH, + PolicyType.DISCONTINUED, + PolicyType.DEMO + ] + }, + }); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + const policyDataExportHelper = new PolicyDataImportExport(policy); + const zip = await policyDataExportHelper.exportData(); + const zippedData = await zip.generateAsync({ + type: 'arraybuffer', + compression: 'DEFLATE', + compressionOptions: { + level: 3, + }, + }); + return new BinaryMessageResponse(zippedData); + } catch (error) { + return new MessageError(error); + } + }); - const model = await DatabaseServer.getPolicyById(policyId); - await this.policyEngine.accessPolicy(model, owner, 'read'); - if (model.status !== PolicyType.DRY_RUN) { - throw new Error(`Policy is not in Dry Run`); + this.channel.getMessages(PolicyEngineEvents.UPLOAD_POLICY_DATA, + async (msg: { data: any, owner: IOwner }) => { + try { + const { data, owner } = msg; + if (!data) { + throw new Error('Invalid policy data'); } - - const documents = await DatabaseServer.getVirtualDocuments(policyId, type, pageIndex, pageSize); - return new MessageResponse(documents); + return new MessageResponse( + await PolicyDataImportExport.importData(owner.owner, Buffer.from(msg?.data)) + ); } catch (error) { return new MessageError(error); } @@ -1495,13 +1922,7 @@ export class PolicyEngineService { const model = await DatabaseServer.getPolicy({ id: policyId }); await this.policyEngine.accessPolicy(model, owner, 'read'); - if ( - ![ - PolicyType.DISCONTINUED, - PolicyType.PUBLISH, - PolicyType.DRY_RUN, - ].includes(model.status) - ) { + if (!PolicyHelper.isRun(model)) { throw new Error(`Policy is not running`); } @@ -1520,14 +1941,14 @@ export class PolicyEngineService { model.id, model.topicId, model.instanceTopicId, - model.status === PolicyType.DRY_RUN + PolicyHelper.isDryRunMode(model) ); } else if (type === DocumentType.VP) { loader = new VpDocumentLoader( model.id, model.topicId, model.instanceTopicId, - model.status === PolicyType.DRY_RUN + PolicyHelper.isDryRunMode(model) ); } else { throw new Error(`Unknown type: ${type}`); @@ -1540,255 +1961,174 @@ export class PolicyEngineService { return new MessageError(error); } }); + //#endregion - this.channel.getMessages(PolicyEngineEvents.GET_TAG_BLOCK_MAP, - async (msg: { policyId: string, owner: IOwner }) => { + //#region Tests + this.channel.getMessages(PolicyEngineEvents.ADD_POLICY_TEST, + async (msg: { policyId: string, file: any, owner: IOwner }) => { try { - const { policyId, owner } = msg; - const userPolicy = await DatabaseServer.getPolicyCache({ - id: policyId, - userId: owner.creator - }); - if (userPolicy) { - return new MessageResponse(userPolicy.blocks); - } - - const policy = await DatabaseServer.getPolicy({ - id: policyId, - status: { - $in: [ - PolicyType.DRY_RUN, - PolicyType.PUBLISH, - PolicyType.DISCONTINUED, - ], - }, - }); + const { policyId, file, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(policy, owner, 'read'); - - const blocks = - await new GuardiansService().sendPolicyMessage( - PolicyEvents.GET_TAG_BLOCK_MAP, + if (PolicyHelper.isPublishMode(policy)) { + throw new Error(`Policy is published`); + } + const buffer = Buffer.from(file.buffer); + const recordToImport = await RecordImportExport.parseZipFile(buffer); + const test = await DatabaseServer.createPolicyTest( + { + uuid: GenerateUUIDv4(), + name: file.filename.split('.')[0], policyId, - null - ); - return new MessageResponse(blocks); + owner: owner.creator, + status: PolicyTestStatus.New, + duration: recordToImport.duration, + progress: 0, + date: null, + result: null, + error: null, + resultId: null + }, + buffer + ); + return new MessageResponse(test); } catch (error) { return new MessageError(error); } - } - ); + }); - this.channel.getMessages(PolicyEngineEvents.DOWNLOAD_VIRTUAL_KEYS, - async (msg: { policyId: string, owner: IOwner }) => { + this.channel.getMessages(PolicyEngineEvents.GET_POLICY_TEST, + async (msg: { policyId: string, testId: string, owner: IOwner }) => { try { - const { policyId, owner } = msg; - const policy = await DatabaseServer.getPolicy({ - id: policyId, - status: PolicyType.DRY_RUN, - }); + const { policyId, testId, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(policy, owner, 'read'); - const zip = await PolicyDataImportExport.exportVirtualKeys(owner, policy.id); - const zippedData = await zip.generateAsync({ - type: 'arraybuffer', - compression: 'DEFLATE', - compressionOptions: { - level: 3, - }, - }); - return new BinaryMessageResponse(zippedData); + const test = await DatabaseServer.getPolicyTest(policyId, testId); + if (!test) { + return new MessageError('Policy test does not exist.', 404); + } + return new MessageResponse(test); } catch (error) { return new MessageError(error); } - } - ); + }); - this.channel.getMessages(PolicyEngineEvents.DOWNLOAD_POLICY_DATA, - async (msg: { policyId: string, owner: IOwner }) => { + this.channel.getMessages(PolicyEngineEvents.START_POLICY_TEST, + async (msg: { policyId: string, testId: string, owner: IOwner }) => { try { - const { policyId, owner } = msg; - const policy = await DatabaseServer.getPolicy({ - id: policyId, - status: { - $in: [ - PolicyType.DRY_RUN, - PolicyType.PUBLISH, - PolicyType.DISCONTINUED, - ], - }, - }); + const { policyId, testId, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(policy, owner, 'read'); - // if (!policy) { - // throw new Error(`Policy doesn't exist`); - // } - const policyDataExportHelper = new PolicyDataImportExport( - policy - ); - const zip = await policyDataExportHelper.exportData(); - const zippedData = await zip.generateAsync({ - type: 'arraybuffer', - compression: 'DEFLATE', - compressionOptions: { - level: 3, - }, - }); - return new BinaryMessageResponse(zippedData); - } catch (error) { - return new MessageError(error); - } - } - ); + if (!PolicyHelper.isDryRunMode(policy)) { + throw new Error(`Policy is not in Dry Run`); + } + const test = await DatabaseServer.getPolicyTest(policyId, testId); + if (!test) { + return new MessageError('Policy test does not exist.', 404); + } + const zip = await DatabaseServer.loadFile(test.file); + if (!zip) { + return new MessageError('Policy test does not exist.', 404); + } + const active = await DatabaseServer.getPolicyTestsByStatus(policyId, PolicyTestStatus.Running); + if (active.length) { + return new MessageError('Policy test is already running.', 500); + } - this.channel.getMessages(PolicyEngineEvents.UPLOAD_POLICY_DATA, - async (msg: { data: any, owner: IOwner }) => { - try { - const { data, owner } = msg; - if (!data) { - throw new Error('Invalid policy data'); + await DatabaseServer.clearDryRun(policyId, false); + const users = await DatabaseServer.getVirtualUsers(policyId); + await DatabaseServer.setVirtualUser(policyId, users[0]?.did); + + const options = { mode: 'test' }; + const recordToImport = await RecordImportExport.parseZipFile(Buffer.from(zip)); + const guardiansService = new GuardiansService(); + const recordId: string = await guardiansService + .sendPolicyMessage(PolicyEvents.RUN_RECORD, policyId, { + records: recordToImport.records, + results: recordToImport.results, + options + }); + if (recordId) { + test.resultId = recordId; + test.duration = recordToImport.duration; + test.date = (new Date()).toISOString(); + test.status = PolicyTestStatus.Running; + test.progress = 0; + test.result = null; + test.error = null; + await DatabaseServer.updatePolicyTest(test); } - return new MessageResponse( - await PolicyDataImportExport.importData(owner.owner, Buffer.from(msg?.data)) - ); - } catch (error) { - return new MessageError(error); - } - } - ); - this.channel.getMessages( - PolicyEngineEvents.UPLOAD_VIRTUAL_KEYS, - async (msg: { policyId: string, data: any, owner: IOwner }) => { - try { - const { policyId, data, owner } = msg; - const policy = await DatabaseServer.getPolicy({ - id: policyId, - status: PolicyType.DRY_RUN, - }); - await this.policyEngine.accessPolicy(policy, owner, 'read'); - await PolicyDataImportExport.importVirtualKeys( - Buffer.from(data), - policy.id - ); - return new MessageResponse(null); + return new MessageResponse(test); } catch (error) { return new MessageError(error); } - } - ); + }); - this.channel.getMessages(PolicyEngineEvents.MIGRATE_DATA, - async (msg: { migrationConfig: any, owner: IOwner }) => { + this.channel.getMessages(PolicyEngineEvents.STOP_POLICY_TEST, + async (msg: { policyId: string, testId: string, owner: IOwner }) => { try { - const { migrationConfig, owner } = msg; - const migrationErrors = await PolicyDataMigrator.migrate( - owner.owner, - migrationConfig, - emptyNotifier() - ); - await this.policyEngine.regenerateModel( - migrationConfig.policies.dst - ); - if (migrationErrors.length > 0) { - new Logger().warn( - migrationErrors - .map((error) => `${error.id}: ${error.message}`) - .join('\r\n'), - ['GUARDIAN_SERVICE'] - ); + const { policyId, testId, owner } = msg; + const policy = await DatabaseServer.getPolicyById(policyId); + await this.policyEngine.accessPolicy(policy, owner, 'read'); + if (!PolicyHelper.isDryRunMode(policy)) { + throw new Error(`Policy is not in Dry Run`); + } + const test = await DatabaseServer.getPolicyTest(policyId, testId); + if (test.status !== PolicyTestStatus.Running) { + return new MessageError('Policy test not started.', 500); } - return new MessageResponse(migrationErrors); - } catch (error) { - return new MessageError(error); - } - } - ); - this.channel.getMessages(PolicyEngineEvents.MIGRATE_DATA_ASYNC, - async (msg: { migrationConfig: any, owner: IOwner, task: any }) => { - try { - const { migrationConfig, owner, task } = msg; - const notifier = await initNotifier(task); - RunFunctionAsync( - async () => { - const migrationErrors = - await PolicyDataMigrator.migrate( - owner.owner, - migrationConfig, - notifier - ); - await this.policyEngine.regenerateModel( - migrationConfig.policies.dst - ); - if (migrationErrors.length > 0) { - new Logger().warn( - migrationErrors - .map( - (error) => - `${error.id}: ${error.message}` - ) - .join('\r\n'), - ['GUARDIAN_SERVICE'] - ); - } - notifier.result(migrationErrors); - }, - async (error) => { - notifier.error(error); - } - ); + const guardiansService = new GuardiansService(); + const result: string = await guardiansService + .sendPolicyMessage(PolicyEvents.STOP_RUNNING, policyId, null); + if (result) { + test.status = PolicyTestStatus.Stopped; + test.progress = 0; + test.result = null; + test.error = null; + test.resultId = null; + await DatabaseServer.updatePolicyTest(test); + } + return new MessageResponse(test); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.GET_MULTI_POLICY, - async (msg: { owner: IOwner, policyId: string }) => { + this.channel.getMessages(PolicyEngineEvents.DELETE_POLICY_TEST, + async (msg: { policyId: string, testId: string, owner: IOwner }) => { try { - const { owner, policyId } = msg; - + const { policyId, testId, owner } = msg; const policy = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(policy, owner, 'read'); - - const item = await DatabaseServer.getMultiPolicy(policy.instanceTopicId, owner.creator); - if (item) { - return new MessageResponse(item); - } else { - return new MessageResponse({ - uuid: null, - instanceTopicId: policy.instanceTopicId, - mainPolicyTopicId: policy.instanceTopicId, - synchronizationTopicId: policy.synchronizationTopicId, - owner: owner.creator, - type: null - }); + if (PolicyHelper.isPublishMode(policy)) { + throw new Error(`Policy is published`); } + await DatabaseServer.deletePolicyTest(policyId, testId); + return new MessageResponse(true); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); - this.channel.getMessages(PolicyEngineEvents.SET_MULTI_POLICY, - async (msg: { owner: IOwner, policyId: string, data: any }) => { + this.channel.getMessages(PolicyEngineEvents.GET_POLICY_TEST_DETAILS, + async (msg: { policyId: string, testId: string, owner: IOwner }) => { try { - const { owner, policyId, data } = msg; - + const { policyId, testId, owner } = msg; const policy = await DatabaseServer.getPolicyById(policyId); await this.policyEngine.accessPolicy(policy, owner, 'read'); - - const item = await DatabaseServer.getMultiPolicy(policy.instanceTopicId, owner.creator); - const userAccount = await this.users.getHederaAccount(owner.creator); - if (item) { - return new MessageError(new Error('Policy is already bound')); - } else { - const root = await this.users.getHederaAccount(policy.creator); - const result = await this.policyEngine.createMultiPolicy(policy, userAccount, root, data); - return new MessageResponse(result); + const test = await DatabaseServer.getPolicyTest(policyId, testId); + if (!test || !test.result) { + return new MessageError('Policy test does not exist.', 404); } + const result = await compareResults(test.result.details); + return new MessageResponse(result); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await logger.error(error, ['GUARDIAN_SERVICE']); return new MessageError(error); } }); + //#endregion } } diff --git a/guardian-service/src/policy-engine/policy-engine.ts b/guardian-service/src/policy-engine/policy-engine.ts index 622b33c544..7889eef148 100644 --- a/guardian-service/src/policy-engine/policy-engine.ts +++ b/guardian-service/src/policy-engine/policy-engine.ts @@ -5,13 +5,12 @@ import { DatabaseServer, findAllEntities, getArtifactType, - Logger, MessageAction, MessageServer, MessageType, MultiPolicy, NatsService, - NotificationHelper, + NotificationHelper, PinoLogger, Policy, PolicyImportExport, PolicyMessage, @@ -41,7 +40,7 @@ import { importTag } from '../api/helpers/tag-import-export-helper.js'; import { createHederaToken } from '../api/token.service.js'; import { GuardiansService } from '../helpers/guardians.js'; import { findAndDryRunSchema, findAndPublishSchema, publishSystemSchemas } from '../api/helpers/schema-publish-helper.js'; -import { deleteSchema, incrementSchemaVersion, sendSchemaMessage } from '../api/helpers/schema-helper.js'; +import { deleteDemoSchema, deleteSchema, incrementSchemaVersion, sendSchemaMessage } from '../api/helpers/schema-helper.js'; import { AISuggestionsService } from '../helpers/ai-suggestions.js'; /** @@ -67,15 +66,19 @@ interface IPublishResult { */ @Singleton export class PolicyEngine extends NatsService { + constructor(private readonly logger: PinoLogger) { + super(); + } /** * Run ready event * @param policyId * @param data + * @param logger * @param error */ - public static runReadyEvent(policyId: string, data: any, error?: any): void { - new PolicyEngine().runReadyEvent(policyId, data, error); + public static runReadyEvent(policyId: string, data: any, logger: PinoLogger, error?: any): void { + new PolicyEngine(logger).runReadyEvent(policyId, data, error); } /** @@ -116,22 +119,26 @@ export class PolicyEngine extends NatsService { this.users = new Users() this.subscribe(PolicyEvents.POLICY_READY, (msg: any) => { - PolicyEngine.runReadyEvent(msg.policyId, msg.data, msg.error); + PolicyEngine.runReadyEvent(msg.policyId, msg.data, this.logger, msg.error); }); const policies = await DatabaseServer.getPolicies({ - where: { - status: { $in: [PolicyType.PUBLISH, PolicyType.DRY_RUN, PolicyType.DISCONTINUED] } + status: { + $in: [ + PolicyType.PUBLISH, + PolicyType.DRY_RUN, + PolicyType.DISCONTINUED, + PolicyType.DEMO, + ] } }); await Promise.all(policies.map(async (policy) => { try { await this.generateModel(policy.id.toString()); } catch (error) { - new Logger().error(error, ['GUARDIAN_SERVICE']); + await this.logger.error(error, ['GUARDIAN_SERVICE']); } })); - } /** @@ -293,6 +300,7 @@ export class PolicyEngine extends NatsService { for (const dependencySchema of dependencySchemas) { dependencySchema.topicId = policyTopicId; await sendSchemaMessage( + owner, root, topic, MessageAction.CreateSchema, @@ -301,6 +309,7 @@ export class PolicyEngine extends NatsService { } await DatabaseServer.updateSchemas(dependencySchemas); await sendSchemaMessage( + owner, root, topic, MessageAction.CreateSchema, @@ -315,14 +324,15 @@ export class PolicyEngine extends NatsService { * @param data * @param owner * @param notifier + * @param logger */ // tslint:disable-next-line:completed-docs public async createPolicy( data: Policy & { policySchemas?: string[] }, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { - const logger = new Logger(); logger.info('Create Policy', ['GUARDIAN_SERVICE']); notifier.start('Save in DB'); if (data) { @@ -439,7 +449,7 @@ export class PolicyEngine extends NatsService { } notifier.completedAndStart('Updating hash'); - policy = await PolicyImportExportHelper.updatePolicyComponents(policy); + policy = await PolicyImportExportHelper.updatePolicyComponents(policy, logger); notifier.completed(); return policy; @@ -451,12 +461,14 @@ export class PolicyEngine extends NatsService { * @param data * @param owner * @param notifier + * @param logger */ public async clonePolicy( policyId: string, data: any, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise<{ /** * New Policy @@ -467,8 +479,7 @@ export class PolicyEngine extends NatsService { */ errors: any[]; }> { - const logger = new Logger(); - logger.info('Create Policy', ['GUARDIAN_SERVICE']); + await logger.info('Create Policy', ['GUARDIAN_SERVICE']); const policy = await DatabaseServer.getPolicyById(policyId); await this.accessPolicy(policy, user, 'create'); @@ -501,14 +512,18 @@ export class PolicyEngine extends NatsService { tokens, artifacts, tools, - tags + tags, + tests: [] }; return await PolicyImportExportHelper.importPolicy( dataToCreate, user, null, - notifier, - data + logger, + data, + null, + false, + notifier ); } @@ -517,20 +532,70 @@ export class PolicyEngine extends NatsService { * @param policyId Policy ID * @param owner User * @param notifier Notifier + * @param logger Notifier + * @returns Result + */ + public async deleteDemoPolicy( + policyToDelete: Policy, + user: IOwner, + notifier: INotifier, + logger: PinoLogger + ): Promise { + await logger.info('Delete Policy', ['GUARDIAN_SERVICE']); + + if ((policyToDelete.status !== PolicyType.DEMO)) { + throw new Error('Policy is not in demo status'); + } + + notifier.start('Delete policy instance'); + await this.destroyModel(policyToDelete.id.toString()); + const databaseServer = new DatabaseServer(policyToDelete.id.toString()); + await databaseServer.clear(true); + + notifier.start('Delete schemas'); + const schemasToDelete = await DatabaseServer.getSchemas({ + topicId: policyToDelete.topicId + }); + for (const schema of schemasToDelete) { + await deleteDemoSchema(schema.id, user, notifier); + } + + notifier.completedAndStart('Delete artifacts'); + const artifactsToDelete = await new DataBaseHelper(Artifact).find({ + policyId: policyToDelete.id + }); + for (const artifact of artifactsToDelete) { + await DatabaseServer.removeArtifact(artifact); + } + + notifier.completedAndStart('Delete tests'); + await DatabaseServer.deletePolicyTests(policyToDelete.id); + + notifier.completedAndStart('Delete policy from DB'); + await DatabaseServer.deletePolicy(policyToDelete.id); + + notifier.completed(); + return true; + } + + /** + * Delete policy + * @param policyId Policy ID + * @param owner User + * @param notifier Notifier + * @param logger Notifier + * * @returns Result */ public async deletePolicy( - policyId: string, + policyToDelete: Policy, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { - const logger = new Logger(); logger.info('Delete Policy', ['GUARDIAN_SERVICE']); - const policyToDelete = await DatabaseServer.getPolicyById(policyId); - await this.accessPolicy(policyToDelete, user, 'delete'); - - if (policyToDelete.status !== PolicyType.DRAFT) { + if ((policyToDelete.status !== PolicyType.DRAFT)) { throw new Error('Policy is not in draft status'); } @@ -552,6 +617,9 @@ export class PolicyEngine extends NatsService { await DatabaseServer.removeArtifact(artifact); } + notifier.completedAndStart('Delete tests'); + await DatabaseServer.deletePolicyTests(policyToDelete.id); + notifier.completedAndStart('Publishing delete policy message'); const topic = await TopicConfig.fromObject(await DatabaseServer.getTopicById(policyToDelete.topicId), true); const users = new Users(); @@ -563,7 +631,7 @@ export class PolicyEngine extends NatsService { .sendMessage(message); notifier.completedAndStart('Delete policy from DB'); - await DatabaseServer.deletePolicy(policyId); + await DatabaseServer.deletePolicy(policyToDelete.id); notifier.completed(); return true; } @@ -574,14 +642,12 @@ export class PolicyEngine extends NatsService { * @param user * @param root * @param notifier - * @param userId */ public async publishSchemas( model: Policy, user: IOwner, root: IRootConfig, - notifier: INotifier, - userId?: string + notifier: INotifier ): Promise { const schemas = await DatabaseServer.getSchemas({ topicId: model.topicId }); notifier.info(`Found ${schemas.length} schemas`); @@ -599,8 +665,7 @@ export class PolicyEngine extends NatsService { schema.version, user, root, - emptyNotifier(), - userId + emptyNotifier() ); replaceAllEntities(model.config, SchemaFields, schemaIRI, newSchema.iri); replaceAllVariables(model.config, 'Schema', schemaIRI, newSchema.iri); @@ -645,19 +710,19 @@ export class PolicyEngine extends NatsService { * @param user * @param version * @param notifier + * @param logger */ public async publishPolicy( model: Policy, user: IOwner, version: string, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { - const logger = new Logger(); - logger.info('Publish Policy', ['GUARDIAN_SERVICE']); + await logger.info('Publish Policy', ['GUARDIAN_SERVICE']); notifier.start('Resolve Hedera account'); const root = await this.users.getHederaAccount(user.creator); - const userAccount = await this.users.getUser(user.username); - const userId = userAccount.id.toString(); + notifier.completedAndStart('Find topic'); model.version = version; @@ -668,7 +733,7 @@ export class PolicyEngine extends NatsService { notifier.completedAndStart('Publish schemas'); try { - model = await this.publishSchemas(model, user, root, notifier, userId); + model = await this.publishSchemas(model, user, root, notifier); } catch (error) { model.status = PolicyType.PUBLISH_ERROR; model.version = ''; @@ -699,7 +764,7 @@ export class PolicyEngine extends NatsService { const tokenMessage = new TokenMessage(MessageAction.UseToken); tokenMessage.setDocument(_token); await messageServer - .sendMessage(tokenMessage, true, null, userId); + .sendMessage(tokenMessage, true, null, user.id); } const topicHelper = new TopicHelper(root.hederaAccountId, root.hederaAccountKey, root.signOptions); @@ -766,11 +831,11 @@ export class PolicyEngine extends NatsService { const message = new PolicyMessage(MessageType.InstancePolicy, MessageAction.PublishPolicy); message.setDocument(model, buffer); const result = await messageServer - .sendMessage(message, true, null, userId); + .sendMessage(message, true, null, user.id); model.messageId = result.getId(); notifier.completedAndStart('Link topic and policy'); - await topicHelper.twoWayLink(rootTopic, topic, result.getId(), userId); + await topicHelper.twoWayLink(rootTopic, topic, result.getId(), user.id); notifier.completedAndStart('Create VC'); const messageId = result.getId(); @@ -816,7 +881,7 @@ export class PolicyEngine extends NatsService { notifier.completedAndStart('Publish tags'); try { - await publishPolicyTags(model, root); + await publishPolicyTags(model, user, root); } catch (error) { logger.error(error, ['GUARDIAN_SERVICE, TAGS']); } @@ -826,7 +891,7 @@ export class PolicyEngine extends NatsService { let retVal = await DatabaseServer.updatePolicy(model); notifier.completedAndStart('Updating hash'); - retVal = await PolicyImportExportHelper.updatePolicyComponents(retVal); + retVal = await PolicyImportExportHelper.updatePolicyComponents(retVal, logger); notifier.completed(); return retVal @@ -837,41 +902,55 @@ export class PolicyEngine extends NatsService { * @param model * @param user * @param version + * @param demo + * @param logger */ public async dryRunPolicy( model: Policy, user: IOwner, - version: string + version: string, + demo: boolean, + logger: PinoLogger ): Promise { - const logger = new Logger(); - logger.info('Dry-run Policy', ['GUARDIAN_SERVICE']); + if (demo) { + logger.info('Demo Policy', ['GUARDIAN_SERVICE']); + } else { + logger.info('Dry-run Policy', ['GUARDIAN_SERVICE']); + } - const root = await this.users.getHederaAccount(user.creator); - const topic = await TopicConfig.fromObject(await DatabaseServer.getTopicById(model.topicId), true); const dryRunId = model.id.toString(); - const messageServer = new MessageServer(root.hederaAccountId, root.hederaAccountKey, root.signOptions, dryRunId) - .setTopicObject(topic); - const topicHelper = new TopicHelper(root.hederaAccountId, root.hederaAccountKey, root.signOptions, dryRunId); const databaseServer = new DatabaseServer(dryRunId); + //Create Services + const root = await this.users.getHederaAccount(user.creator); + const topic = await TopicConfig.fromObject( + await DatabaseServer.getTopicById(model.topicId), !demo + ); + const messageServer = new MessageServer( + root.hederaAccountId, root.hederaAccountKey, root.signOptions, dryRunId + ).setTopicObject(topic); + const topicHelper = new TopicHelper(root.hederaAccountId, root.hederaAccountKey, root.signOptions, dryRunId); + + //'Publish' policy schemas model = await this.dryRunSchemas(model, user); - model.status = PolicyType.DRY_RUN; + model.status = demo ? PolicyType.DEMO : PolicyType.DRY_RUN; model.version = version; - this.regenerateIds(model.config); + //Create instance topic const rootTopic = await topicHelper.create({ type: TopicType.InstancePolicyTopic, name: model.name || TopicType.InstancePolicyTopic, description: model.topicDescription || TopicType.InstancePolicyTopic, owner: user.creator, - policyId: model.id.toString(), + policyId: dryRunId, policyUUID: model.uuid }); await rootTopic.saveKeys(); await databaseServer.saveTopic(rootTopic.toObject()); model.instanceTopicId = rootTopic.topicId; + //Send Message const zip = await PolicyImportExport.generate(model); const buffer = await zip.generateAsync({ type: 'arraybuffer', @@ -880,17 +959,16 @@ export class PolicyEngine extends NatsService { level: 3 } }); - const message = new PolicyMessage(MessageType.InstancePolicy, MessageAction.PublishPolicy); message.setDocument(model, buffer); const result = await messageServer.sendMessage(message); + //Link topic and message await topicHelper.twoWayLink(rootTopic, topic, result.getId()); + //Create Policy VC const messageId = result.getId(); const url = result.getUrl(); - - const vcHelper = new VcHelper(); let credentialSubject: any = { id: messageId, name: model.name || '', @@ -904,16 +982,14 @@ export class PolicyEngine extends NatsService { uuid: model.uuid || '', operation: 'PUBLISH' } - const policySchema = await DatabaseServer.getSchemaByType(model.topicId, SchemaEntity.POLICY); if (policySchema) { const schemaObject = new Schema(policySchema); credentialSubject = SchemaHelper.updateObjectContext(schemaObject, credentialSubject); } - + const vcHelper = new VcHelper(); const didDocument = await vcHelper.loadDidDocument(user.creator); const vc = await vcHelper.createVerifiableCredential(credentialSubject, didDocument, null, null); - await databaseServer.saveVC({ hash: vc.toCredentialHash(), owner: user.creator, @@ -922,8 +998,8 @@ export class PolicyEngine extends NatsService { policyId: `${model.id}` }); - await DatabaseServer.createVirtualUser( - model.id.toString(), + //Create default user + await databaseServer.createVirtualUser( 'Administrator', root.did, root.hederaAccountId, @@ -931,10 +1007,14 @@ export class PolicyEngine extends NatsService { true ); - logger.info('Published Policy', ['GUARDIAN_SERVICE']); + //Update dry-run table (mark readonly rows) + await DatabaseServer.setSystemMode(dryRunId, true); + //Update Policy hash and status let retVal = await DatabaseServer.updatePolicy(model); - retVal = await PolicyImportExportHelper.updatePolicyComponents(retVal); + retVal = await PolicyImportExportHelper.updatePolicyComponents(retVal, logger); + + logger.info('Run Policy', ['GUARDIAN_SERVICE']); return retVal; } @@ -945,12 +1025,14 @@ export class PolicyEngine extends NatsService { * @param policyId * @param owner * @param notifier + * @param logger */ public async validateAndPublishPolicy( model: any, policyId: string, owner: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { const version = model.policyVersion; @@ -967,6 +1049,9 @@ export class PolicyEngine extends NatsService { if (policy.status === PolicyType.DISCONTINUED) { throw new Error(`Policy is discontinued`); } + if (policy.status === PolicyType.DEMO) { + throw new Error(`Policy imported in demo mode`); + } if (!ModelHelper.checkVersionFormat(version)) { throw new Error('Invalid version format'); } @@ -988,9 +1073,9 @@ export class PolicyEngine extends NatsService { if (isValid) { if (policy.status === PolicyType.DRY_RUN) { await this.destroyModel(policyId); - await DatabaseServer.clearDryRun(policy.id.toString()); + await DatabaseServer.clearDryRun(policy.id.toString(), true); } - const newPolicy = await this.publishPolicy(policy, owner, version, notifier); + const newPolicy = await this.publishPolicy(policy, owner, version, notifier, logger); if (newPolicy.status === PolicyType.PUBLISH) { new AISuggestionsService().rebuildAIVector().then(); @@ -1031,18 +1116,20 @@ export class PolicyEngine extends NatsService { * @param messageId * @param user * @param notifier + * @param logger */ public async preparePolicyPreviewMessage( messageId: string, user: IOwner, - notifier: INotifier + notifier: INotifier, + logger: PinoLogger ): Promise { notifier.start('Resolve Hedera account'); if (!messageId) { throw new Error('Policy ID in body is empty'); } - new Logger().info(`Import policy by message`, ['GUARDIAN_SERVICE']); + await logger.info(`Import policy by message`, ['GUARDIAN_SERVICE']); const root = await this.users.getHederaAccount(user.creator); @@ -1091,6 +1178,7 @@ export class PolicyEngine extends NatsService { * @param user * @param hederaAccount * @param versionOfTopicId + * @param logger * @param notifier * @param metadata */ @@ -1099,8 +1187,10 @@ export class PolicyEngine extends NatsService { user: IOwner, hederaAccount: IRootConfig, versionOfTopicId: string, - notifier: INotifier, - metadata?: PolicyToolMetadata + logger: PinoLogger, + metadata: PolicyToolMetadata = null, + demo: boolean = false, + notifier: INotifier = emptyNotifier() ): Promise<{ /** * New Policy @@ -1154,9 +1244,11 @@ export class PolicyEngine extends NatsService { policyToImport, user, versionOfTopicId, - notifier, - undefined, - metadata + logger, + null, + metadata, + demo, + notifier ); } @@ -1304,4 +1396,34 @@ export class PolicyEngine extends NatsService { } return null; } + + public async startDemo( + policy: Policy, + owner: IOwner, + logger: PinoLogger, + notifier: INotifier = emptyNotifier(), + ): Promise { + notifier.completedAndStart('Validate policy'); + const blockErrors = await this.validateModel(policy.id); + const errors = blockErrors.blocks + .filter((block) => !block.isValid && block.errors) + .map((block) => { + return { + type: 'Block', + uuid: block.id, + name: block.name, + error: JSON.stringify(block.errors) + } + }) + if (errors.length) { + const message = PolicyImportExportHelper.errorsMessage(errors); + throw new Error(message); + } + + notifier.completedAndStart('Update policy model'); + const model = await DatabaseServer.getPolicyById(policy.id); + const newPolicy = await this.dryRunPolicy(model, owner, 'Demo', true, logger); + notifier.completedAndStart('Run policy'); + await this.generateModel(newPolicy.id.toString()); + } } diff --git a/indexer-api-gateway/environments/environment.prod.ts b/indexer-api-gateway/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/indexer-api-gateway/environments/environment.prod.ts +++ b/indexer-api-gateway/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/indexer-api-gateway/package.json b/indexer-api-gateway/package.json index 5aaa644f95..22f7e5bc46 100644 --- a/indexer-api-gateway/package.json +++ b/indexer-api-gateway/package.json @@ -1,10 +1,12 @@ { "packageManager": "yarn@1.22.21", - "_moduleAliases": { - "@api": "dist/api", - "@helpers": "dist/helpers", - "@auth": "dist/auth", - "@subscribers": "dist/subscribers" + "imports": { + "#api": "./dist/api", + "#helpers": "./dist/helpers", + "#auth": "./dist/auth", + "#subscribers": "./dist/subscribers", + "#dto": "./dist/dto/index.js", + "#decorators": "./dist/decorators/index.js" }, "resolutions": { "@azure/core-rest-pipeline": "1.12.1", @@ -12,8 +14,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@indexer/interfaces": "^2.26.2", - "@indexer/common": "^2.26.2", + "@indexer/interfaces": "^2.27.0", + "@indexer/common": "^2.27.0", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/microservices": "^9.4.1", @@ -83,5 +85,5 @@ "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/indexer-api-gateway/src/api/_dev/services/elastic.ts b/indexer-api-gateway/src/api/_dev/services/elastic.ts index 142747f4d7..bb6af62a6b 100644 --- a/indexer-api-gateway/src/api/_dev/services/elastic.ts +++ b/indexer-api-gateway/src/api/_dev/services/elastic.ts @@ -1,17 +1,18 @@ import { Controller, HttpCode, HttpStatus, Post } from '@nestjs/common'; -import { InternalServerErrorDTO, PageDTO } from '../../../middlewares/validation/schemas/index.js'; import { ApiInternalServerErrorResponse, ApiForbiddenResponse, ApiOkResponse, ApiOperation, ApiTags, + ApiExcludeController, } from '@nestjs/swagger'; -import { IPage, IndexerMessageAPI } from '@indexer/common'; +import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../../api-client.js'; @Controller('elastic') @ApiTags('elastic') +@ApiExcludeController() export class ElasticApi extends ApiClient { /** * Get @@ -22,18 +23,13 @@ export class ElasticApi extends ApiClient { description: '.' }) @ApiOkResponse({ - description: 'Successful operation.', - type: PageDTO + description: 'Successful operation.' }) @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getAllMessages(): Promise { - return await this.send>(IndexerMessageAPI.ELASTIC_UPDATE_DATA, {}); + return await this.send(IndexerMessageAPI.ELASTIC_UPDATE_DATA, {}); } } diff --git a/indexer-api-gateway/src/api/_dev/services/logs.ts b/indexer-api-gateway/src/api/_dev/services/logs.ts index c280ca4d77..dd7420f37b 100644 --- a/indexer-api-gateway/src/api/_dev/services/logs.ts +++ b/indexer-api-gateway/src/api/_dev/services/logs.ts @@ -1,18 +1,18 @@ import { Controller, HttpCode, HttpStatus, Get, Query } from '@nestjs/common'; -import { InternalServerErrorDTO, PageDTO } from '../../../middlewares/validation/schemas/index.js'; import { - ApiInternalServerErrorResponse, ApiForbiddenResponse, ApiOkResponse, ApiOperation, ApiTags, - ApiQuery + ApiQuery, + ApiExcludeController, } from '@nestjs/swagger'; -import { IPage, IndexerMessageAPI } from '@indexer/common'; +import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../../api-client.js'; @Controller('logs') @ApiTags('logs') +@ApiExcludeController() export class LogsApi extends ApiClient { /** * Get @@ -20,55 +20,50 @@ export class LogsApi extends ApiClient { @Get('/messages') @ApiOperation({ summary: '.', - description: '.' + description: '.', }) @ApiQuery({ name: 'type', description: 'Document type.', type: String, - example: 'type' + example: 'type', }) @ApiQuery({ name: 'status', description: 'Document status.', type: String, - example: 'status' + example: 'status', }) @ApiQuery({ name: 'pageIndex', description: 'Page index.', type: Number, - example: 0 + example: 0, }) @ApiQuery({ name: 'pageSize', description: 'Page size.', type: Number, - example: 20 + example: 20, }) @ApiQuery({ name: 'orderField', description: 'Order field.', type: String, - example: 'topicId' + example: 'topicId', }) @ApiQuery({ name: 'orderDir', description: 'Order direction.', type: String, - example: 'DESC' + example: 'DESC', }) @ApiOkResponse({ description: 'Successful operation.', - type: PageDTO }) @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getAllMessages( @Query('timestamp') timestamp?: string, @@ -77,20 +72,17 @@ export class LogsApi extends ApiClient { @Query('pageIndex') pageIndex?: number, @Query('pageSize') pageSize?: number, @Query('orderField') orderField?: string, - @Query('orderDir') orderDir?: string, - + @Query('orderDir') orderDir?: string ): Promise { - return await this.send>(IndexerMessageAPI.GET_LOG_MESSAGES, - { - timestamp, - type, - status, - pageIndex, - pageSize, - orderField, - orderDir - } - ); + return await this.send(IndexerMessageAPI.GET_LOG_MESSAGES, { + timestamp, + type, + status, + pageIndex, + pageSize, + orderField, + orderDir, + }); } /** @@ -99,59 +91,51 @@ export class LogsApi extends ApiClient { @Get('/topics') @ApiOperation({ summary: '.', - description: '.' + description: '.', }) @ApiQuery({ name: 'pageIndex', description: 'Page index.', type: Number, - example: 0 + example: 0, }) @ApiQuery({ name: 'pageSize', description: 'Page size.', type: Number, - example: 20 + example: 20, }) @ApiQuery({ name: 'orderField', description: 'Order field.', type: String, - example: 'topicId' + example: 'topicId', }) @ApiQuery({ name: 'orderDir', description: 'Order direction.', type: String, - example: 'DESC' + example: 'DESC', }) @ApiOkResponse({ description: 'Successful operation.', - type: PageDTO }) @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getAllTopics( @Query('pageIndex') pageIndex?: number, @Query('pageSize') pageSize?: number, @Query('orderField') orderField?: string, - @Query('orderDir') orderDir?: string, - + @Query('orderDir') orderDir?: string ): Promise { - return await this.send>(IndexerMessageAPI.GET_LOG_TOPICS, - { - pageIndex, - pageSize, - orderField, - orderDir - } - ); + return await this.send(IndexerMessageAPI.GET_LOG_TOPICS, { + pageIndex, + pageSize, + orderField, + orderDir, + }); } /** @@ -160,43 +144,38 @@ export class LogsApi extends ApiClient { @Get('/documents') @ApiOperation({ summary: '.', - description: '.' + description: '.', }) @ApiQuery({ name: 'pageIndex', description: 'Page index.', type: Number, - example: 0 + example: 0, }) @ApiQuery({ name: 'pageSize', description: 'Page size.', type: Number, - example: 20 + example: 20, }) @ApiQuery({ name: 'orderField', description: 'Order field.', type: String, - example: 'topicId' + example: 'topicId', }) @ApiQuery({ name: 'orderDir', description: 'Order direction.', type: String, - example: 'DESC' + example: 'DESC', }) @ApiOkResponse({ description: 'Successful operation.', - type: PageDTO }) @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getAllDocuments( @Query('timestamp') timestamp?: string, @@ -206,21 +185,18 @@ export class LogsApi extends ApiClient { @Query('pageIndex') pageIndex?: number, @Query('pageSize') pageSize?: number, @Query('orderField') orderField?: string, - @Query('orderDir') orderDir?: string, - + @Query('orderDir') orderDir?: string ): Promise { - return await this.send>(IndexerMessageAPI.GET_LOG_DOCUMENTS, - { - timestamp, - type, - status, - action, - pageIndex, - pageSize, - orderField, - orderDir - } - ); + return await this.send(IndexerMessageAPI.GET_LOG_DOCUMENTS, { + timestamp, + type, + status, + action, + pageIndex, + pageSize, + orderField, + orderDir, + }); } /** @@ -229,22 +205,17 @@ export class LogsApi extends ApiClient { @Get('/documents/filters') @ApiOperation({ summary: '.', - description: '.' + description: '.', }) @ApiOkResponse({ description: 'Successful operation.', - type: PageDTO }) @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getDocumentFilters(): Promise { - return await this.send>(IndexerMessageAPI.GET_LOG_DOCUMENT_FILTERS, {}); + return await this.send(IndexerMessageAPI.GET_LOG_DOCUMENT_FILTERS, {}); } /** @@ -253,43 +224,38 @@ export class LogsApi extends ApiClient { @Get('/tokens') @ApiOperation({ summary: '.', - description: '.' + description: '.', }) @ApiQuery({ name: 'pageIndex', description: 'Page index.', type: Number, - example: 0 + example: 0, }) @ApiQuery({ name: 'pageSize', description: 'Page size.', type: Number, - example: 20 + example: 20, }) @ApiQuery({ name: 'orderField', description: 'Order field.', type: String, - example: 'topicId' + example: 'topicId', }) @ApiQuery({ name: 'orderDir', description: 'Order direction.', type: String, - example: 'DESC' + example: 'DESC', }) @ApiOkResponse({ description: 'Successful operation.', - type: PageDTO }) @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getAllTokens( @Query('pageIndex') pageIndex?: number, @@ -298,18 +264,15 @@ export class LogsApi extends ApiClient { @Query('orderDir') orderDir?: string, @Query('type') type?: string, @Query('tokenId') tokenId?: string - ): Promise { - return await this.send>(IndexerMessageAPI.GET_LOG_TOKENS, - { - pageIndex, - pageSize, - orderField, - orderDir, - type, - tokenId - } - ); + return await this.send(IndexerMessageAPI.GET_LOG_TOKENS, { + pageIndex, + pageSize, + orderField, + orderDir, + type, + tokenId, + }); } /** @@ -318,43 +281,38 @@ export class LogsApi extends ApiClient { @Get('/nfts') @ApiOperation({ summary: '.', - description: '.' + description: '.', }) @ApiQuery({ name: 'pageIndex', description: 'Page index.', type: Number, - example: 0 + example: 0, }) @ApiQuery({ name: 'pageSize', description: 'Page size.', type: Number, - example: 20 + example: 20, }) @ApiQuery({ name: 'orderField', description: 'Order field.', type: String, - example: 'topicId' + example: 'topicId', }) @ApiQuery({ name: 'orderDir', description: 'Order direction.', type: String, - example: 'DESC' + example: 'DESC', }) @ApiOkResponse({ description: 'Successful operation.', - type: PageDTO }) @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getAllNfts( @Query('pageIndex') pageIndex?: number, @@ -364,18 +322,15 @@ export class LogsApi extends ApiClient { @Query('tokenId') tokenId?: string, @Query('serialNumber') serialNumber?: number, @Query('metadata') metadata?: string - ): Promise { - return await this.send>(IndexerMessageAPI.GET_LOG_NFTS, - { - pageIndex, - pageSize, - orderField, - orderDir, - tokenId, - serialNumber, - metadata - } - ); + return await this.send(IndexerMessageAPI.GET_LOG_NFTS, { + pageIndex, + pageSize, + orderField, + orderDir, + tokenId, + serialNumber, + metadata, + }); } } diff --git a/indexer-api-gateway/src/api/_dev/services/status.ts b/indexer-api-gateway/src/api/_dev/services/status.ts index 5224da2b47..06a3803d7d 100644 --- a/indexer-api-gateway/src/api/_dev/services/status.ts +++ b/indexer-api-gateway/src/api/_dev/services/status.ts @@ -1,17 +1,18 @@ import { Controller, HttpCode, HttpStatus, Get, Inject } from '@nestjs/common'; import { ClientProxy, EventPattern } from '@nestjs/microservices'; -import { InternalServerErrorDTO } from '../../../middlewares/validation/schemas/index.js'; import { ApiInternalServerErrorResponse, ApiForbiddenResponse, ApiOkResponse, ApiOperation, - ApiTags + ApiTags, + ApiExcludeController } from '@nestjs/swagger'; import { IndexerMessageAPI } from '@indexer/common'; @Controller('status') @ApiTags('status') +@ApiExcludeController() export class StatusApi { private readonly workers: Map; private readonly indexers: Map; @@ -52,10 +53,6 @@ export class StatusApi { @ApiForbiddenResponse({ description: 'Forbidden.', }) - @ApiInternalServerErrorResponse({ - description: 'Internal server error.', - type: InternalServerErrorDTO - }) @HttpCode(HttpStatus.OK) async getStatus(): Promise { const workers = []; diff --git a/indexer-api-gateway/src/api/services/analytics.ts b/indexer-api-gateway/src/api/services/analytics.ts index dc193b5626..cb8dce1c45 100644 --- a/indexer-api-gateway/src/api/services/analytics.ts +++ b/indexer-api-gateway/src/api/services/analytics.ts @@ -1,23 +1,48 @@ import { Controller, HttpCode, HttpStatus, Body, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { + ApiBody, + ApiInternalServerErrorResponse, + ApiOkResponse, + ApiOperation, + ApiTags, + ApiUnprocessableEntityResponse, +} from '@nestjs/swagger'; import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../api-client.js'; +import { + InternalServerErrorDTO, + SearchPolicyParamsDTO, + SearchPolicyResultDTO, +} from '#dto'; @Controller('analytics') @ApiTags('analytics') export class AnalyticsApi extends ApiClient { + @ApiOperation({ + summary: 'Search policy', + description: 'Returns search policy result', + }) + @ApiBody({ + description: 'Search policy parameters', + type: SearchPolicyParamsDTO, + }) + @ApiOkResponse({ + description: 'Search policy result', + type: [SearchPolicyResultDTO], + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO, + }) + @ApiUnprocessableEntityResponse({ + description: 'Unprocessable entity', + }) @Post('/search/policy') @HttpCode(HttpStatus.OK) - async search( - @Body() body: { - text: string; - minVcCount?: number; - minVpCount?: number; - minTokensCount?: number; - owner?: string; - block?: any; - } - ) { - return await this.send(IndexerMessageAPI.GET_ANALYTICS_SEARCH_POLICY, body); + async search(@Body() body: SearchPolicyParamsDTO) { + return await this.send( + IndexerMessageAPI.GET_ANALYTICS_SEARCH_POLICY, + body + ); } -} \ No newline at end of file +} diff --git a/indexer-api-gateway/src/api/services/entities.ts b/indexer-api-gateway/src/api/services/entities.ts index e93a8c9c36..8e04bf252c 100644 --- a/indexer-api-gateway/src/api/services/entities.ts +++ b/indexer-api-gateway/src/api/services/entities.ts @@ -6,15 +6,98 @@ import { Param, Query, } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { + ApiInternalServerErrorResponse, + ApiOkResponse, + ApiOperation, + ApiParam, + ApiQuery, + ApiTags, +} from '@nestjs/swagger'; import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../api-client.js'; +import { ApiPaginatedRequest, ApiPaginatedResponse } from '#decorators'; +import { + RegistryDTO, + NFTDetailsDTO, + NFTDTO, + TokenDTO, + TokenDetailsDTO, + ContractDTO, + ContractDetailsDTO, + TopicDTO, + VCGridDTO, + VPGridDTO, + DIDGridDTO, + RoleDTO, + SchemaGridDTO, + ModuleDTO, + ToolDTO, + PolicyDTO, + RegistryUserGridDTO, + TopicDetailsDTO, + VCDetailsDTO, + VPDetailsDTO, + DIDDetailsDTO, + RoleDetailsDTO, + SchemaDetailsDTO, + ModuleDetailsDTO, + ToolDetailsDTO, + PolicyDetailsDTO, + RegistryUserDetailsDTO, + RegistryDetailsDTO, + RelationshipsDTO, + SchemaTreeDTO, + InternalServerErrorDTO +} from '#dto'; + @Controller('entities') @ApiTags('entities') export class EntityApi extends ApiClient { //#region ACCOUNTS //#region STANDARD REGISTRIES + @ApiOperation({ + summary: 'Get standard registries', + description: 'Returns standard registries', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Registries', RegistryDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/registries') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search registries, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Global topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'options.did', + description: 'Registry did', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @ApiQuery({ + name: 'options.registrantTopicId', + description: 'Registry user topic identifier', + example: '0.0.4481265', + required: false, + }) @HttpCode(HttpStatus.OK) async getRegistries( @Query('pageIndex') pageIndex?: number, @@ -38,16 +121,63 @@ export class EntityApi extends ApiClient { }); } + @ApiOperation({ + summary: 'Get registry', + description: 'Returns registry', + }) + @ApiOkResponse({ + description: 'Registry details', + type: RegistryDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/registries/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) - async getRegistry(@Param('messageId') messageId: string) { + async getRegistry( + @Param('messageId') messageId: string + ): Promise { return await this.send(IndexerMessageAPI.GET_REGISTRY, { messageId, }); } //#endregion //#region REGISTRY USERS + @ApiOperation({ + summary: 'Get registry users', + description: 'Returns registry users', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Registry users', RegistryUserGridDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/registry-users') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search registry users, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'User topic identifier', + example: '0.0.1960', + required: false, + }) @HttpCode(HttpStatus.OK) async getRegistryUsers( @Query('pageIndex') pageIndex?: string, @@ -66,7 +196,25 @@ export class EntityApi extends ApiClient { topicId, }); } + + @ApiOperation({ + summary: 'Get registry user', + description: 'Returns registry user', + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/registry-users/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) + @ApiOkResponse({ + description: 'Registry user details', + type: RegistryUserDetailsDTO, + }) @HttpCode(HttpStatus.OK) async getRegistryUser(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_REGISTRY_USER, { @@ -78,7 +226,48 @@ export class EntityApi extends ApiClient { //#region METHODOLOGIES //#region POLICIES + @ApiOperation({ + summary: 'Get policies', + description: 'Returns policies', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Policies', PolicyDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/policies') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search policies, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Policy topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'options.owner', + description: 'Policy owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @ApiQuery({ + name: 'analytics.tools', + description: 'Tool', + example: '1706823227.586179534', + required: false, + }) @HttpCode(HttpStatus.OK) async getPolicies( @Query('pageIndex') pageIndex?: string, @@ -101,7 +290,25 @@ export class EntityApi extends ApiClient { 'analytics.tools': tool, }); } + + @ApiOperation({ + summary: 'Get policy', + description: 'Returns policy', + }) + @ApiOkResponse({ + description: 'Policy details', + type: PolicyDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/policies/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getPolicy(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_POLICY, { @@ -110,7 +317,42 @@ export class EntityApi extends ApiClient { } //#endregion //#region TOOLS + @ApiOperation({ + summary: 'Get tools', + description: 'Returns tools', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Tools', ToolDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/tools') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search tools, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'options.owner', + description: 'Tool owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Topic identifier', + example: '0.0.1960', + required: false, + }) @HttpCode(HttpStatus.OK) async getTools( @Query('pageIndex') pageIndex?: string, @@ -131,7 +373,25 @@ export class EntityApi extends ApiClient { 'options.owner': owner, }); } + + @ApiOperation({ + summary: 'Get tool', + description: 'Returns tool', + }) + @ApiOkResponse({ + description: 'Tool details', + type: ToolDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/tools/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getTool(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_TOOL, { @@ -140,7 +400,42 @@ export class EntityApi extends ApiClient { } //#endregion //#region MODULES + @ApiOperation({ + summary: 'Get modules', + description: 'Returns modules', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Modules', ModuleDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/modules') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search modules, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'options.owner', + description: 'Module owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Topic identifier', + example: '0.0.1960', + required: false, + }) @HttpCode(HttpStatus.OK) async getModules( @Query('pageIndex') pageIndex?: string, @@ -161,7 +456,25 @@ export class EntityApi extends ApiClient { 'options.owner': owner, }); } + + @ApiOperation({ + summary: 'Get module', + description: 'Returns module', + }) + @ApiOkResponse({ + description: 'Module details', + type: ModuleDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/modules/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getModule(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_MODULE, { @@ -170,7 +483,42 @@ export class EntityApi extends ApiClient { } //#endregion //#region SCHEMAS + @ApiOperation({ + summary: 'Get schemas', + description: 'Returns schemas', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Schemas', SchemaGridDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/schemas') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search schemas, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Policy topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'options.owner', + description: 'Schema owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) @HttpCode(HttpStatus.OK) async getSchemas( @Query('pageIndex') pageIndex?: string, @@ -191,14 +539,50 @@ export class EntityApi extends ApiClient { 'options.owner': owner, }); } + + @ApiOperation({ + summary: 'Get schema', + description: 'Returns schema', + }) + @ApiOkResponse({ + description: 'Schema details', + type: SchemaDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/schemas/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getSchema(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_SCHEMA, { messageId, }); } + + @ApiOperation({ + summary: 'Get schema tree', + description: 'Returns schema tree', + }) + @ApiOkResponse({ + description: 'Schema tree', + type: SchemaTreeDTO + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/schemas/:messageId/tree') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getSchemaTree(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_SCHEMA_TREE, { @@ -207,7 +591,29 @@ export class EntityApi extends ApiClient { } //#endregion //#region TOKENS + @ApiOperation({ + summary: 'Get tokens', + description: 'Returns tokens', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Tokens', TokenDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/tokens') + @ApiQuery({ + name: 'tokenId', + description: 'Token identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'treasury', + description: 'Treasury', + example: '0.0.1960', + required: false, + }) @HttpCode(HttpStatus.OK) async getTokens( @Query('pageIndex') pageIndex?: number, @@ -226,7 +632,25 @@ export class EntityApi extends ApiClient { treasury, }); } + + @ApiOperation({ + summary: 'Get token', + description: 'Returns token', + }) + @ApiOkResponse({ + description: 'Token details', + type: TokenDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/tokens/:tokenId') + @ApiParam({ + name: 'tokenId', + description: 'Token identifier', + example: '0.0.1960', + }) @HttpCode(HttpStatus.OK) async getToken(@Param('tokenId') tokenId: string) { return await this.send(IndexerMessageAPI.GET_TOKEN, { @@ -235,7 +659,48 @@ export class EntityApi extends ApiClient { } //#endregion //#region ROLES + @ApiOperation({ + summary: 'Get roles', + description: 'Returns roles', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Roles', RoleDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/roles') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search roles, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'options.issuer', + description: 'Issuer', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'analytics.policyId', + description: 'Policy identifier', + example: '1706823227.586179534', + required: false, + }) @HttpCode(HttpStatus.OK) async getRoles( @Query('pageIndex') pageIndex?: string, @@ -258,7 +723,25 @@ export class EntityApi extends ApiClient { 'analytics.policyId': policyId, }); } + + @ApiOperation({ + summary: 'Get role', + description: 'Returns role', + }) + @ApiOkResponse({ + description: 'Role details', + type: RoleDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/roles/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getRole(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_ROLE, { @@ -270,7 +753,42 @@ export class EntityApi extends ApiClient { //#region DOCUMENTS //#region DIDS + @ApiOperation({ + summary: 'Get DIDs', + description: 'Returns DIDs', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('DIDs', DIDGridDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/did-documents') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search DIDs, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'options.did', + description: 'DID', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) @HttpCode(HttpStatus.OK) async getDidDocuments( @Query('pageIndex') pageIndex?: number, @@ -291,14 +809,50 @@ export class EntityApi extends ApiClient { 'options.did': did, }); } + + @ApiOperation({ + summary: 'Get DID', + description: 'Returns DID', + }) + @ApiOkResponse({ + description: 'DID details', + type: DIDDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/did-documents/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getDidDocument(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_DID_DOCUMENT, { messageId, }); } + + @ApiOperation({ + summary: 'Get DID relationships', + description: 'Returns DID relationships', + }) + @ApiOkResponse({ + description: 'DID relationships', + type: RelationshipsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/did-documents/:messageId/relationships') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getDidRelationships(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_DID_RELATIONSHIPS, { @@ -307,7 +861,54 @@ export class EntityApi extends ApiClient { } //#endregion //#region VP DOCUMENTS + @ApiOperation({ + summary: 'Get VPs', + description: 'Returns VPs', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('VPs', VPGridDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/vp-documents') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search VPs, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'options.issuer', + description: 'Issuer', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @ApiQuery({ + name: 'analytics.policyId', + description: 'Policy identifier', + example: '1706823227.586179534', + required: false, + }) + @ApiQuery({ + name: 'analytics.schemaIds', + description: 'Schema identifier', + example: '1706823227.586179534', + required: false, + }) @HttpCode(HttpStatus.OK) async getVpDocuments( @Query('pageIndex') pageIndex?: number, @@ -332,14 +933,50 @@ export class EntityApi extends ApiClient { 'analytics.schemaIds': schemaId, }); } + + @ApiOperation({ + summary: 'Get VP', + description: 'Returns VP', + }) + @ApiOkResponse({ + description: 'VP details', + type: VPDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/vp-documents/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getVpDocument(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_VP_DOCUMENT, { messageId, }); } + + @ApiOperation({ + summary: 'Get VP relationships', + description: 'Returns VP relationships', + }) + @ApiOkResponse({ + description: 'VP relationships', + type: RelationshipsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/vp-documents/:messageId/relationships') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getVpRelationships(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_VP_RELATIONSHIPS, { @@ -348,7 +985,60 @@ export class EntityApi extends ApiClient { } //#endregion //#region VC DOCUMENTS + @ApiOperation({ + summary: 'Get VCs', + description: 'Returns VCs', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('VCs', VCGridDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/vc-documents') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search VCs, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'options.issuer', + description: 'Issuer', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + required: false, + }) + @ApiQuery({ + name: 'analytics.policyId', + description: 'Policy identifier', + example: '1706823227.586179534', + required: false, + }) + @ApiQuery({ + name: 'analytics.schemaId', + description: 'Schema identifier', + example: '1706823227.586179534', + required: false, + }) + @ApiQuery({ + name: 'options.relationships', + description: 'Relationships', + example: '1706823227.586179534', + required: false, + }) @HttpCode(HttpStatus.OK) async getVcDocuments( @Query('pageIndex') pageIndex?: number, @@ -375,14 +1065,50 @@ export class EntityApi extends ApiClient { 'options.relationships': relationship, }); } + + @ApiOperation({ + summary: 'Get VC', + description: 'Returns VC', + }) + @ApiOkResponse({ + description: 'VC details', + type: VCDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/vc-documents/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getVcDocument(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_VC_DOCUMENT, { messageId, }); } + + @ApiOperation({ + summary: 'Get VC relationships', + description: 'Returns VC relationships', + }) + @ApiOkResponse({ + description: 'VC relationships', + type: RelationshipsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/vc-documents/:messageId/relationships') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getVcRelationships(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_VC_RELATIONSHIPS, { @@ -394,7 +1120,23 @@ export class EntityApi extends ApiClient { //#region OTHERS //#region NFTS + @ApiOperation({ + summary: 'Get NFTs', + description: 'Returns NFTs', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('NFTs', NFTDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/nfts') + @ApiQuery({ + name: 'tokenId', + description: 'Token identifier', + example: '0.0.1960', + required: false, + }) @HttpCode(HttpStatus.OK) async getNFTs( @Query('pageIndex') pageIndex?: number, @@ -411,7 +1153,30 @@ export class EntityApi extends ApiClient { tokenId, }); } + + @ApiOperation({ + summary: 'Get NFT', + description: 'Returns NFT', + }) + @ApiOkResponse({ + description: 'NFT details', + type: NFTDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/nfts/:tokenId/:serialNumber') + @ApiParam({ + name: 'tokenId', + description: 'Token identifier', + example: '0.0.1960', + }) + @ApiParam({ + name: 'serialNumber', + description: 'Serial number', + example: '1', + }) @HttpCode(HttpStatus.OK) async getNFT( @Param('tokenId') tokenId: string, @@ -424,7 +1189,35 @@ export class EntityApi extends ApiClient { } //#endregion //#region TOPICS + @ApiOperation({ + summary: 'Get topics', + description: 'Returns topics', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Topics', TopicDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/topics') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search topics, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'options.parentId', + description: 'Parent topic identifier', + example: '0.0.1960', + required: false, + }) @HttpCode(HttpStatus.OK) async getTopics( @Query('pageIndex') pageIndex?: number, @@ -443,7 +1236,25 @@ export class EntityApi extends ApiClient { 'options.parentId': parentId, }); } + + @ApiOperation({ + summary: 'Get topic', + description: 'Returns topic', + }) + @ApiOkResponse({ + description: 'Topic details', + type: TopicDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/topics/:topicId') + @ApiParam({ + name: 'topicId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getTopic(@Param('topicId') topicId: string) { return await this.send(IndexerMessageAPI.GET_TOPIC, { @@ -452,7 +1263,41 @@ export class EntityApi extends ApiClient { } //#endregion //#region CONTRACTS + @ApiOperation({ + summary: 'Get contracts', + description: 'Returns contracts', + }) + @ApiPaginatedRequest + @ApiPaginatedResponse('Contracts', ContractDTO) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/contracts') + @ApiQuery({ + name: 'keywords', + description: 'Keywords to search', + examples: { + '0.0.1960': { + description: + 'Search contracts, which are related to specific topic identifier', + value: '["0.0.1960"]', + }, + }, + required: false, + }) + @ApiQuery({ + name: 'topicId', + description: 'Topic identifier', + example: '0.0.1960', + required: false, + }) + @ApiQuery({ + name: 'owner', + description: 'Owner', + example: '0.0.2160', + required: false, + }) @HttpCode(HttpStatus.OK) async getContracts( @Query('pageIndex') pageIndex?: string, @@ -460,7 +1305,8 @@ export class EntityApi extends ApiClient { @Query('orderField') orderField?: string, @Query('orderDir') orderDir?: string, @Query('keywords') keywords?: string, - @Query('topicId') topicId?: string + @Query('topicId') topicId?: string, + @Query('owner') owner?: string ) { return await this.send(IndexerMessageAPI.GET_CONTRACTS, { pageIndex, @@ -469,9 +1315,28 @@ export class EntityApi extends ApiClient { orderDir, keywords, topicId, + owner }); } + + @ApiOperation({ + summary: 'Get contract', + description: 'Returns contract', + }) + @ApiOkResponse({ + description: 'Contract details', + type: ContractDetailsDTO, + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/contracts/:messageId') + @ApiParam({ + name: 'messageId', + description: 'Message identifier', + example: '1706823227.586179534', + }) @HttpCode(HttpStatus.OK) async getContract(@Param('messageId') messageId: string) { return await this.send(IndexerMessageAPI.GET_CONTRACT, { diff --git a/indexer-api-gateway/src/api/services/filters.ts b/indexer-api-gateway/src/api/services/filters.ts index 9522288039..2532193eec 100644 --- a/indexer-api-gateway/src/api/services/filters.ts +++ b/indexer-api-gateway/src/api/services/filters.ts @@ -1,10 +1,11 @@ import { Controller, HttpCode, HttpStatus, Get } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiExcludeController, ApiTags } from '@nestjs/swagger'; import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../api-client.js'; @Controller('filters') @ApiTags('filters') +@ApiExcludeController() export class FiltersApi extends ApiClient { @Get('/vp-documents') @HttpCode(HttpStatus.OK) diff --git a/indexer-api-gateway/src/api/services/landing.ts b/indexer-api-gateway/src/api/services/landing.ts index b6c0abf3c8..4cc1474e49 100644 --- a/indexer-api-gateway/src/api/services/landing.ts +++ b/indexer-api-gateway/src/api/services/landing.ts @@ -1,23 +1,50 @@ import { Controller, HttpCode, HttpStatus, Get } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../api-client.js'; +import { ProjectCoordinatesDTO, LandingAnalyticsDTO, InternalServerErrorDTO } from '#dto'; +import { LandingAnalytics, ProjectCoordinates } from '@indexer/interfaces'; @Controller('landing') @ApiTags('landing') export class LandingApi extends ApiClient { + @ApiOperation({ + summary: 'Get landing page analytics', + description: + 'Returns count of registries, methodologies, projects, totalIssuance, date', + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @ApiOkResponse({ + description: 'Landing page analytics result', + type: [LandingAnalyticsDTO], + }) @Get('/analytics') @HttpCode(HttpStatus.OK) - async getOnboardingStat(): Promise { + async getOnboardingStat(): Promise { return await this.send( IndexerMessageAPI.GET_LANDING_ANALYTICS, {} ); } + @ApiOperation({ + summary: 'Get projects coordinates', + description: 'Returns all project coordinates', + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) @Get('/projects-coordinates') + @ApiOkResponse({ + description: 'Projects coordinates result', + type: [ProjectCoordinatesDTO], + }) @HttpCode(HttpStatus.OK) - async getProjectCoordinates(): Promise { + async getProjectCoordinates(): Promise { return await this.send( IndexerMessageAPI.GET_PROJECTS_COORDINATES, {} diff --git a/indexer-api-gateway/src/api/services/search.ts b/indexer-api-gateway/src/api/services/search.ts index 257cab4d07..859bd5f676 100644 --- a/indexer-api-gateway/src/api/services/search.ts +++ b/indexer-api-gateway/src/api/services/search.ts @@ -1,20 +1,43 @@ import { Controller, HttpCode, HttpStatus, Get, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiTags, ApiOperation, ApiQuery, ApiInternalServerErrorResponse } from '@nestjs/swagger'; import { IndexerMessageAPI } from '@indexer/common'; import { ApiClient } from '../api-client.js'; +import { ApiPaginatedResponse } from '../../decorators/api-paginated-response.js'; +import { InternalServerErrorDTO, SearchItemDTO } from '#dto'; @Controller('search') @ApiTags('search') export class SearchApi extends ApiClient { + @ApiOperation({ + summary: 'Search', + description: 'Full-text indexer search', + }) + @ApiInternalServerErrorResponse({ + description: 'Internal server error', + type: InternalServerErrorDTO + }) + @ApiPaginatedResponse('Search results', SearchItemDTO) @Get('/') + @ApiQuery({ + name: 'pageIndex', + description: 'Page index', + example: 0, + required: false, + type: 'number', + }) + @ApiQuery({ + name: 'search', + description: 'Search phrase', + example: 'Project', + }) @HttpCode(HttpStatus.OK) async search( @Query('pageIndex') pageIndex: number, @Query('search') search?: string - ) { - return await this.send( - IndexerMessageAPI.GET_SEARCH_API, - { search, pageIndex } - ); + ): Promise { + return await this.send(IndexerMessageAPI.GET_SEARCH_API, { + search, + pageIndex, + }); } } diff --git a/indexer-api-gateway/src/app.ts b/indexer-api-gateway/src/app.ts index 557bb8a5a9..a794a1eb92 100644 --- a/indexer-api-gateway/src/app.ts +++ b/indexer-api-gateway/src/app.ts @@ -3,7 +3,6 @@ import { NestFactory } from '@nestjs/core'; import { HttpStatus, ValidationPipe } from '@nestjs/common'; import { SwaggerModule } from '@nestjs/swagger'; import { MicroserviceOptions, Transport } from '@nestjs/microservices'; -import * as extraModels from './middlewares/validation/schemas/index.js'; import { SwaggerConfig } from './helpers/swagger-config.js'; import { json } from 'express'; import process from 'process'; @@ -40,18 +39,9 @@ Promise.all([ app.use(json({ limit: '10mb' })); const document = SwaggerModule.createDocument(app, SwaggerConfig, { - extraModels: Object.values(extraModels).filter( - (constructor: new (...args: any[]) => any) => { - try { - // tslint:disable-next-line:no-unused-expression - new constructor(); - return true; - } catch { - return false; - } - } - ), + extraModels: [], }); + console.log(document.toString()) SwaggerModule.setup('api-docs', app, document); services.listen(); diff --git a/indexer-api-gateway/src/decorators/api-paginated-request.ts b/indexer-api-gateway/src/decorators/api-paginated-request.ts new file mode 100644 index 0000000000..41c91e25bf --- /dev/null +++ b/indexer-api-gateway/src/decorators/api-paginated-request.ts @@ -0,0 +1,43 @@ +import { applyDecorators } from '@nestjs/common'; +import { ApiQuery } from '@nestjs/swagger'; + +export const ApiPaginatedRequest = applyDecorators( + ApiQuery({ + name: 'pageIndex', + description: 'Page index', + example: 0, + required: false, + type: 'number', + }), + ApiQuery({ + name: 'pageSize', + description: 'Page size', + example: 10, + required: false, + schema: { + type: 'number', + maximum: 100 + } + }), + ApiQuery({ + name: 'orderField', + description: 'Order field', + example: 'consensusTimestamp', + required: false, + }), + ApiQuery({ + name: 'orderDir', + description: 'Order direction', + examples: { + ASC: { + value: 'ASC', + description: 'Ascending ordering', + }, + DESC: { + value: 'DESC', + description: 'Descending ordering', + }, + }, + required: false, + }) +); diff --git a/indexer-api-gateway/src/decorators/api-paginated-response.ts b/indexer-api-gateway/src/decorators/api-paginated-response.ts new file mode 100644 index 0000000000..963c1b9917 --- /dev/null +++ b/indexer-api-gateway/src/decorators/api-paginated-response.ts @@ -0,0 +1,28 @@ +import { Type, applyDecorators } from '@nestjs/common'; +import { ApiExtraModels, ApiOkResponse, getSchemaPath } from '@nestjs/swagger'; +import { PageDTO } from '#dto'; + +export const ApiPaginatedResponse = >( + description: string, + model: TModel, +) => { + return applyDecorators( + ApiExtraModels(PageDTO, model), + ApiOkResponse({ + description, + schema: { + allOf: [ + { $ref: getSchemaPath(PageDTO) }, + { + properties: { + items: { + type: 'array', + items: { $ref: getSchemaPath(model) }, + }, + }, + }, + ], + }, + }) + ); +}; diff --git a/indexer-api-gateway/src/decorators/index.ts b/indexer-api-gateway/src/decorators/index.ts new file mode 100644 index 0000000000..9fa5d37d93 --- /dev/null +++ b/indexer-api-gateway/src/decorators/index.ts @@ -0,0 +1,2 @@ +export * from './api-paginated-request.js'; +export * from './api-paginated-response.js'; diff --git a/indexer-api-gateway/src/dto/details/contract.details.ts b/indexer-api-gateway/src/dto/details/contract.details.ts new file mode 100644 index 0000000000..cbdc0e3ace --- /dev/null +++ b/indexer-api-gateway/src/dto/details/contract.details.ts @@ -0,0 +1,89 @@ +import { + ContractAnalytics, + ContractOptions, + Contract, + ContractType, + ContractDetails, + MessageType, + MessageAction, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class ContractOptionsDTO implements ContractOptions { + @ApiProperty({ + description: 'Contract identifier', + example: '0.0.4481265', + }) + contractId: string; + @ApiProperty({ + description: 'Description', + example: 'Wipe contract', + }) + description: string; + @ApiProperty({ + description: 'Contract type', + enum: ContractType, + }) + contractType: ContractType; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; +} + +export class ContractAnalyticsDTO implements ContractAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch?: string; +} + +export class ContractDTO + extends MessageDTO + implements Contract +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.CONTRACT + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateContract + }) + declare action: MessageAction; + @ApiProperty({ + type: ContractOptionsDTO, + }) + declare options: ContractOptionsDTO; + @ApiProperty({ + type: ContractAnalyticsDTO, + }) + declare analytics?: ContractAnalyticsDTO; +} + +export class ContractDetailsDTO + extends DetailsDTO + implements ContractDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: ContractDTO, + }) + declare item?: ContractDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; +} diff --git a/indexer-api-gateway/src/dto/details/details.interface.ts b/indexer-api-gateway/src/dto/details/details.interface.ts new file mode 100644 index 0000000000..9d2fca0901 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/details.interface.ts @@ -0,0 +1,52 @@ +import { + Details, + DetailsActivity, + DetailsHistory, + DetailsHistoryActivity, +} from '@indexer/interfaces'; +import { MessageDTO } from '../message.dto.js'; +import { ApiProperty } from '@nestjs/swagger'; +import { RawMessageDTO } from '../raw-message.dto.js'; +import { TokenDTO } from './token.details.js'; +import { NFTDTO } from './nft.details.js'; + +export class DetailsDTO< + T extends MessageDTO | TokenDTO | NFTDTO, + RT = RawMessageDTO +> implements Details +{ + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + id: string; + uuid?: string; + item?: T; + row?: RT; +} + +export class DetailsHistoryDTO + extends DetailsDTO + implements DetailsHistory +{ + history?: T[]; +} + +export class DetailsActivityDTO + extends DetailsDTO + implements DetailsActivity +{ + activity?: AT; +} + +export class DetailsHistoryActivityDTO< + T extends MessageDTO, + AT, + RT = RawMessageDTO + > + extends DetailsDTO + implements DetailsHistoryActivity +{ + history?: T[]; + activity?: AT; +} diff --git a/indexer-api-gateway/src/dto/details/did.details.ts b/indexer-api-gateway/src/dto/details/did.details.ts new file mode 100644 index 0000000000..44448e8bc4 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/did.details.ts @@ -0,0 +1,119 @@ +import { + DID, + DIDAnalytics, + DIDDetails, + DIDOptions, + MessageAction, + MessageType, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsHistoryDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class DIDOptionsDTO implements DIDOptions { + @ApiProperty({ + description: 'Relationships', + example: ['1706823227.586179534'], + }) + relationships: string[]; + @ApiProperty({ + description: 'DID', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + did: string; +} + +export class DIDAnalyticsDTO implements DIDAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class DIDGridDTO + extends MessageDTO + implements DID +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.DID_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateDID, + }) + declare action: MessageAction; + @ApiProperty({ + type: DIDOptionsDTO, + }) + declare options: DIDOptionsDTO; + @ApiProperty({ + type: DIDAnalyticsDTO, + }) + declare analytics?: DIDAnalyticsDTO; +} + +export class DIDDetailsItemDTO + extends MessageDTO + implements DID +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.DID_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateDID, + }) + declare action: MessageAction; + @ApiProperty({ + type: DIDOptionsDTO, + }) + declare options: DIDOptionsDTO; + @ApiProperty({ + type: DIDAnalyticsDTO, + }) + declare analytics?: DIDAnalyticsDTO; + @ApiProperty({ + description: 'Documents', + type: 'array', + items: { + type: 'string', + }, + example: [ + `"{\"@context\":\"https://www.w3.org/ns/did/v1\",\"id\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438\",\"verificationMethod\":[{\"id\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key\",\"type\":\"Ed25519VerificationKey2018\",\"controller\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438\",\"publicKeyBase58\":\"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP\"},{\"id\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs\",\"type\":\"Bls12381G2Key2020\",\"controller\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438\",\"publicKeyBase58\":\"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC\"}],\"authentication\":[\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key\"],\"assertionMethod\":[\"#did-root-key\",\"#did-root-key-bbs\"]}"`, + ], + }) + declare documents: any[]; +} + +export class DIDDetailsDTO + extends DetailsHistoryDTO + implements DIDDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: DIDDetailsItemDTO, + }) + declare item?: DIDDetailsItemDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: [DIDDetailsItemDTO], + }) + declare history?: DIDDetailsItemDTO[]; +} diff --git a/indexer-api-gateway/src/dto/details/index.ts b/indexer-api-gateway/src/dto/details/index.ts new file mode 100644 index 0000000000..6c16e38878 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/index.ts @@ -0,0 +1,15 @@ +export * from './registry.details.js'; +export * from './registry-user.details.js'; +export * from './policy.details.js'; +export * from './details.interface.js'; +export * from './tool.details.js'; +export * from './module.details.js'; +export * from './schema.details.js'; +export * from './role.details.js'; +export * from './vp.details.js'; +export * from './vc.details.js'; +export * from './did.details.js'; +export * from './contract.details.js'; +export * from './topic.details.js'; +export * from './nft.details.js'; +export * from './token.details.js'; diff --git a/indexer-api-gateway/src/dto/details/module.details.ts b/indexer-api-gateway/src/dto/details/module.details.ts new file mode 100644 index 0000000000..958c88b744 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/module.details.ts @@ -0,0 +1,93 @@ +import { + ModuleAnalytics, + ModuleOptions, + Module, + ModuleDetails, + MessageAction, + MessageType, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class ModuleOptionsDTO implements ModuleOptions { + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + @ApiProperty({ + description: 'Name', + example: 'Grid module', + }) + name: string; + @ApiProperty({ + description: 'Description', + example: 'Grid module', + }) + description: string; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + @ApiProperty({ + description: 'Module topic identifier', + example: '0.0.4481265', + }) + moduleTopicId: string; +} + +export class ModuleAnalyticsDTO implements ModuleAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class ModuleDTO + extends MessageDTO + implements Module +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.MODULE + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.PublishModule + }) + declare action: MessageAction; + @ApiProperty({ + type: ModuleOptionsDTO, + }) + declare options: ModuleOptionsDTO; + @ApiProperty({ + type: ModuleAnalyticsDTO, + }) + declare analytics?: ModuleAnalyticsDTO; +} + +export class ModuleDetailsDTO + extends DetailsDTO + implements ModuleDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: ModuleDTO, + }) + declare item?: ModuleDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; +} diff --git a/indexer-api-gateway/src/dto/details/nft.details.ts b/indexer-api-gateway/src/dto/details/nft.details.ts new file mode 100644 index 0000000000..759930e6ad --- /dev/null +++ b/indexer-api-gateway/src/dto/details/nft.details.ts @@ -0,0 +1,44 @@ +import { NFT, NFTDetails } from '@indexer/interfaces'; +import { DetailsDTO } from './details.interface.js'; +import { RawNFTDTO } from '../raw-nft.dto.js'; +import { ApiProperty } from '@nestjs/swagger'; + +export class NFTDTO extends RawNFTDTO implements NFT {} + +export class NFTDetailsDTO + extends DetailsDTO + implements NFTDetails +{ + @ApiProperty({ + type: NFTDTO, + }) + declare row?: NFTDTO; + @ApiProperty({ + description: 'NFT transaction history', + type: 'array', + items: { + type: 'object', + }, + example: [ + { + consensus_timestamp: '1707292471.903596642', + nonce: 0, + transaction_id: '0.0.1533323-1707292459-175375906', + type: 'CRYPTOTRANSFER', + is_approval: false, + receiver_account_id: '0.0.1842221', + sender_account_id: '0.0.1533323', + }, + { + consensus_timestamp: '1707292470.199625477', + nonce: 0, + transaction_id: '0.0.1533323-1707292458-093221893', + type: 'TOKENMINT', + is_approval: false, + receiver_account_id: '0.0.1533323', + sender_account_id: null, + }, + ], + }) + history: any[]; +} diff --git a/indexer-api-gateway/src/dto/details/policy.details.ts b/indexer-api-gateway/src/dto/details/policy.details.ts new file mode 100644 index 0000000000..003741a3d2 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/policy.details.ts @@ -0,0 +1,202 @@ +import { + MessageAction, + MessageType, + Policy, + PolicyActivity, + PolicyAnalytics, + PolicyDetails, + PolicyOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class PolicyOptionsDTO implements PolicyOptions { + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + @ApiProperty({ + description: 'Name', + example: 'Verra REDD', + }) + name: string; + @ApiProperty({ + description: 'Description', + example: 'Verra REDD Policy', + }) + description: string; + @ApiProperty({ + description: 'Topic description', + example: 'Verra REDD Policy Topic', + }) + topicDescription: string; + @ApiProperty({ + description: 'Version', + example: '1.0.0', + }) + version: string; + @ApiProperty({ + description: 'Policy tag', + example: 'Verra_REDD', + }) + policyTag: string; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + @ApiProperty({ + description: 'Policy topic identifier', + example: '0.0.4481265', + }) + policyTopicId: string; + @ApiProperty({ + description: 'Policy instance topic identifier', + example: '0.0.4481265', + }) + instanceTopicId: string; + @ApiProperty({ + description: 'Synchronization topic identifier', + example: '0.0.4481265', + }) + synchronizationTopicId: string; + @ApiProperty({ + description: 'Discontinued date', + example: '2024-02-27T16:32:08.513Z', + }) + discontinuedDate?: string; +} + +export class PolicyAnalyticsDTO implements PolicyAnalytics { + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + @ApiProperty({ + description: 'Tokens', + example: ['0.0.4481265'], + }) + tokens: string[]; + @ApiProperty({ + description: 'VC count', + example: 10, + }) + vcCount: number; + @ApiProperty({ + description: 'VP count', + example: 10, + }) + vpCount: number; + @ApiProperty({ + description: 'Tokens count', + example: 10, + }) + tokensCount: number; + @ApiProperty({ + description: 'Tags', + example: ['iRec'], + }) + tags: string[]; + @ApiProperty({ + description: 'Hash', + example: 'DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or', + }) + hash: string; + @ApiProperty({ + description: 'Hash map', + type: 'object', + }) + hashMap: any; + @ApiProperty({ + description: 'Tools', + example: ['1706823227.586179534'], + }) + tools: string[]; + @ApiProperty({ + description: 'Registry identifier', + example: '1706823227.586179534', + }) + registryId: string; + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class PolicyActivityDTO implements PolicyActivity { + @ApiProperty({ + description: 'Schemas', + example: 10, + }) + schemas: number; + @ApiProperty({ + description: 'VCs', + example: 10, + }) + vcs: number; + @ApiProperty({ + description: 'VPs', + example: 10, + }) + vps: number; + @ApiProperty({ + description: 'Roles', + example: 10, + }) + roles: number; +} + +export class PolicyDTO + extends MessageDTO + implements Policy +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.POLICY + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.PublishPolicy + }) + declare action: MessageAction; + @ApiProperty({ + type: PolicyOptionsDTO, + }) + declare options: PolicyOptionsDTO; + @ApiProperty({ + type: PolicyAnalyticsDTO, + }) + declare analytics?: PolicyAnalyticsDTO; +} + +export class PolicyDetailsDTO + extends DetailsActivityDTO + implements PolicyDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: PolicyDTO, + }) + declare item?: PolicyDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: PolicyActivityDTO, + }) + declare activity?: PolicyActivityDTO; +} diff --git a/indexer-api-gateway/src/dto/details/registry-user.details.ts b/indexer-api-gateway/src/dto/details/registry-user.details.ts new file mode 100644 index 0000000000..5721e84ffa --- /dev/null +++ b/indexer-api-gateway/src/dto/details/registry-user.details.ts @@ -0,0 +1,136 @@ +import { + MessageAction, + MessageType, + RegistryUser, + RegistryUserActivity, + RegistryUserAnalytics, + RegistryUserDetails, + RegistryUserOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class RegistryUserOptionsDTO implements RegistryUserOptions { + @ApiProperty({ + description: 'DID', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + did: string; +} + +export class RegistryUserAnalyticsDTO implements RegistryUserAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class RegistryUserActivityDTO implements RegistryUserActivity { + @ApiProperty({ + description: 'VCs', + example: 10, + }) + vcs: number; + @ApiProperty({ + description: 'VPs', + example: 10, + }) + vps: number; + @ApiProperty({ + description: 'Roles', + example: 10, + }) + roles: number; +} + +export class RegistryUserGridDTO + extends MessageDTO + implements RegistryUser +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.DID_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateDID, + }) + declare action: MessageAction; + @ApiProperty({ + type: RegistryUserOptionsDTO, + }) + declare options: RegistryUserOptionsDTO; + @ApiProperty({ + type: RegistryUserAnalyticsDTO, + }) + declare analytics?: RegistryUserAnalyticsDTO; +} + +export class RegistryUserDetailsItemDTO + extends MessageDTO + implements RegistryUser +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.DID_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateDID, + }) + declare action: MessageAction; + @ApiProperty({ + type: RegistryUserOptionsDTO, + }) + declare options: RegistryUserOptionsDTO; + @ApiProperty({ + type: RegistryUserAnalyticsDTO, + }) + declare analytics?: RegistryUserAnalyticsDTO; + @ApiProperty({ + description: 'Documents', + type: 'array', + items: { + type: 'string', + }, + example: [ + `"{\"@context\":\"https://www.w3.org/ns/did/v1\",\"id\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438\",\"verificationMethod\":[{\"id\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key\",\"type\":\"Ed25519VerificationKey2018\",\"controller\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438\",\"publicKeyBase58\":\"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP\"},{\"id\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs\",\"type\":\"Bls12381G2Key2020\",\"controller\":\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438\",\"publicKeyBase58\":\"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC\"}],\"authentication\":[\"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key\"],\"assertionMethod\":[\"#did-root-key\",\"#did-root-key-bbs\"]}"`, + ], + }) + declare documents: any[]; +} + +export class RegistryUserDetailsDTO + extends DetailsActivityDTO< + RegistryUserDetailsItemDTO, + RegistryUserActivityDTO + > + implements RegistryUserDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: RegistryUserDetailsItemDTO, + }) + declare item?: RegistryUserDetailsItemDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: RegistryUserActivityDTO, + }) + declare activity?: RegistryUserActivityDTO; +} diff --git a/indexer-api-gateway/src/dto/details/registry.details.ts b/indexer-api-gateway/src/dto/details/registry.details.ts new file mode 100644 index 0000000000..5e5df65c79 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/registry.details.ts @@ -0,0 +1,138 @@ +import { + MessageAction, + MessageType, + Registry, + RegistryActivity, + RegistryAnalytics, + RegistryDetails, + RegistryOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class RegistryOptionsDTO implements RegistryOptions { + @ApiProperty({ + description: 'DID', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + did: string; + @ApiProperty({ + description: 'Registrant topic id', + }) + registrantTopicId: string; + @ApiProperty({ + description: 'Lang', + }) + lang: string; + @ApiProperty({ + description: 'Attributes', + }) + attributes: any; +} + +export class RegistryAnalyticsDTO implements RegistryAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class RegistryActivityDTO implements RegistryActivity { + @ApiProperty({ + description: 'VCs', + example: 10, + }) + vcs: number; + @ApiProperty({ + description: 'VPs', + example: 10, + }) + vps: number; + @ApiProperty({ + description: 'Policies', + example: 10, + }) + policies: number; + @ApiProperty({ + description: 'Roles', + example: 10, + }) + roles: number; + @ApiProperty({ + description: 'Tools', + example: 10, + }) + tools: number; + @ApiProperty({ + description: 'Modules', + example: 10, + }) + modules: number; + @ApiProperty({ + description: 'Tokens', + example: 10, + }) + tokens: number; + @ApiProperty({ + description: 'Registry users', + example: 10, + }) + users: number; + @ApiProperty({ + description: 'Contracts', + example: 10, + }) + contracts: number; +} + +export class RegistryDTO + extends MessageDTO + implements Registry +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.STANDARD_REGISTRY + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.Init + }) + declare action: MessageAction; + @ApiProperty({ + type: RegistryOptionsDTO, + }) + declare options: RegistryOptionsDTO; + @ApiProperty({ + type: RegistryAnalyticsDTO, + }) + declare analytics?: RegistryAnalyticsDTO; +} + +export class RegistryDetailsDTO + extends DetailsActivityDTO + implements RegistryDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: RegistryDTO, + }) + declare item?: RegistryDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: RegistryActivityDTO, + }) + declare activity?: RegistryActivityDTO; +} diff --git a/indexer-api-gateway/src/dto/details/role.details.ts b/indexer-api-gateway/src/dto/details/role.details.ts new file mode 100644 index 0000000000..dfc399e9d7 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/role.details.ts @@ -0,0 +1,101 @@ +import { + MessageAction, + MessageType, + Role, + RoleActivity, + RoleAnalytics, + RoleDetails, + RoleOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class RoleOptionsDTO implements RoleOptions { + @ApiProperty({ + description: 'Role', + example: 'Registrant', + }) + role: string; + @ApiProperty({ + description: 'Role', + example: 'Registrants', + }) + group: string; + @ApiProperty({ + description: 'Issuer', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + issuer: string; +} + +export class RoleAnalyticsDTO implements RoleAnalytics { + @ApiProperty({ + description: 'Policy message identifier', + example: '1706823227.586179534', + }) + policyId: string; + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class RoleActivityDTO implements RoleActivity { + @ApiProperty({ + description: 'VCs', + example: 10, + }) + vcs: number; +} + +export class RoleDTO + extends MessageDTO + implements Role +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.ROLE_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateVC, + }) + declare action: MessageAction; + @ApiProperty({ + type: RoleOptionsDTO, + }) + declare options: RoleOptionsDTO; + @ApiProperty({ + type: RoleAnalyticsDTO, + }) + declare analytics?: RoleAnalyticsDTO; +} + +export class RoleDetailsDTO + extends DetailsActivityDTO + implements RoleDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: RoleDTO, + }) + declare item?: RoleDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: RoleActivityDTO, + }) + declare activity?: RoleActivityDTO; +} diff --git a/indexer-api-gateway/src/dto/details/schema.details.ts b/indexer-api-gateway/src/dto/details/schema.details.ts new file mode 100644 index 0000000000..ed9a9c8589 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/schema.details.ts @@ -0,0 +1,188 @@ +import { + ChildSchema, + ISchema, + MessageAction, + MessageType, + SchemaActivity, + SchemaAnalytics, + SchemaDetails, + SchemaOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class SchemaOptionsDTO implements SchemaOptions { + @ApiProperty({ + description: 'Name', + example: 'Monitoring report', + }) + name: string; + @ApiProperty({ + description: 'Description', + example: 'Monitoring report schema', + }) + description: string; + @ApiProperty({ + description: 'Entity', + example: 'VC', + }) + entity: string; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + @ApiProperty({ + description: 'Version', + example: '1.0.0', + }) + version: string; + @ApiProperty({ + description: 'Code version', + example: '1.0.0', + }) + codeVersion: string; + @ApiProperty({ + description: 'Relationships', + example: ['1706823227.586179534'], + }) + relationships: string[]; +} + +export class ChildSchemaDTO implements ChildSchema { + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + id: string; + @ApiProperty({ + description: 'Name', + example: 'Project Details', + }) + name: string; +} + +export class SchemaAnalyticsDTO implements SchemaAnalytics { + @ApiProperty({ + description: 'Policy message identifiers', + example: ['1706823227.586179534'], + }) + policyIds: string[]; + @ApiProperty({ + type: ChildSchemaDTO, + }) + childSchemas: ChildSchema[]; + @ApiProperty({ + description: 'Schema properties', + example: ['ActivityImpactModule.projectScope'], + }) + properties: string[]; + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class SchemaActivityDTO implements SchemaActivity { + @ApiProperty({ + description: 'VCs', + example: 10, + }) + vcs: number; + @ApiProperty({ + description: 'VPs', + example: 10, + }) + vps: number; +} + +export class SchemaGridDTO + extends MessageDTO + implements ISchema +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.SCHEMA + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.PublishSchema + }) + declare action: MessageAction; + @ApiProperty({ + type: SchemaOptionsDTO, + }) + declare options: SchemaOptionsDTO; +} + +export class SchemaDetailsItemDTO + extends MessageDTO + implements ISchema +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.SCHEMA + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.PublishSchema + }) + declare action: MessageAction; + @ApiProperty({ + type: SchemaOptionsDTO, + }) + declare options: SchemaOptionsDTO; + @ApiProperty({ + type: SchemaAnalyticsDTO, + }) + declare analytics?: SchemaAnalyticsDTO; + @ApiProperty({ + description: 'Documents', + type: 'array', + items: { + type: 'string', + }, + example: [ + `{\"$id\":\"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\",\"$comment\":\"{ \\\"@id\\\": \\\"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\\\", \\\"term\\\": \\\"d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\\\" }\",\"title\":\"tagSchemaAPI339404\",\"description\":\"tagSchemaAPI339404\",\"type\":\"object\",\"properties\":{\"@context\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}],\"readOnly\":true},\"type\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}],\"readOnly\":true},\"id\":{\"type\":\"string\",\"readOnly\":true}},\"required\":[\"@context\",\"type\"],\"additionalProperties\":false,\"$defs\":{}}`, + `{\"@context\":{\"@version\":1.1,\"@vocab\":\"https://w3id.org/traceability/#undefinedTerm\",\"id\":\"@id\",\"type\":\"@type\",\"d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\":{\"@id\":\"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\",\"@context\":{}}}}` + ] + }) + declare documents: any[]; +} + +export class SchemaDetailsDTO + extends DetailsActivityDTO + implements SchemaDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: SchemaDetailsItemDTO, + }) + declare item?: SchemaDetailsItemDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: SchemaActivityDTO, + }) + declare activity?: SchemaActivityDTO; +} diff --git a/indexer-api-gateway/src/dto/details/token.details.ts b/indexer-api-gateway/src/dto/details/token.details.ts new file mode 100644 index 0000000000..27a16faddf --- /dev/null +++ b/indexer-api-gateway/src/dto/details/token.details.ts @@ -0,0 +1,16 @@ +import { Token, TokenDetails } from '@indexer/interfaces'; +import { DetailsDTO } from './details.interface.js'; +import { RawTokenDTO } from '../raw-token.dto.js'; +import { ApiProperty } from '@nestjs/swagger'; + +export class TokenDTO extends RawTokenDTO implements Token {} + +export class TokenDetailsDTO + extends DetailsDTO + implements TokenDetails +{ + @ApiProperty({ + type: TokenDTO, + }) + declare row?: TokenDTO; +} diff --git a/indexer-api-gateway/src/dto/details/tool.details.ts b/indexer-api-gateway/src/dto/details/tool.details.ts new file mode 100644 index 0000000000..dadd5348ae --- /dev/null +++ b/indexer-api-gateway/src/dto/details/tool.details.ts @@ -0,0 +1,121 @@ +import { + MessageAction, + MessageType, + Tool, + ToolActivity, + ToolAnalytics, + ToolDetails, + ToolOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class ToolOptionsDTO implements ToolOptions { + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + @ApiProperty({ + description: 'Name', + example: 'Tool 16', + }) + name: string; + @ApiProperty({ + description: 'Description', + example: 'Tool 16', + }) + description: string; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + @ApiProperty({ + description: 'Hash', + example: '71ZWDSX2cUPsye4AuMUqXUhgk1XBDnpi4Ky1mtjYqYom', + }) + hash: string; + @ApiProperty({ + description: 'Tool topic identifier', + example: '0.0.4481265', + }) + toolTopicId: string; + @ApiProperty({ + description: 'Tags topic identifier', + example: '0.0.4481265', + }) + tagsTopicId: string; +} + +export class ToolAnalyticsDTO implements ToolAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class ToolActivityDTO implements ToolActivity { + @ApiProperty({ + description: 'Schemas', + example: 10, + }) + schemas: number; + @ApiProperty({ + description: 'Policies', + example: 10, + }) + policies: number; +} + +export class ToolDTO + extends MessageDTO + implements Tool +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.TOOL + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.PublishTool + }) + declare action: MessageAction; + @ApiProperty({ + type: ToolOptionsDTO, + }) + declare options: ToolOptionsDTO; + @ApiProperty({ + type: ToolAnalyticsDTO, + }) + declare analytics?: ToolAnalyticsDTO; +} + +export class ToolDetailsDTO + extends DetailsActivityDTO + implements ToolDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: ToolDTO, + }) + declare item?: ToolDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: ToolActivityDTO, + }) + declare activity?: ToolActivityDTO; +} diff --git a/indexer-api-gateway/src/dto/details/topic.details.ts b/indexer-api-gateway/src/dto/details/topic.details.ts new file mode 100644 index 0000000000..ba97870a04 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/topic.details.ts @@ -0,0 +1,172 @@ +import { + MessageAction, + MessageType, + Topic, + TopicActivity, + TopicAnalytics, + TopicDetails, + TopicOptions, + TopicType, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsActivityDTO } from './details.interface.js'; +import { RawTopicDTO } from '../raw-topic.dto.js'; + +export class TopicOptionsDTO implements TopicOptions { + @ApiProperty({ + description: 'Name', + example: 'Policy topic', + }) + name: string; + @ApiProperty({ + description: 'Name', + example: 'Verra REDD Policy topic', + }) + description: string; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + @ApiProperty({ + description: 'Message type', + enum: TopicType, + }) + messageType: TopicType; + @ApiProperty({ + description: 'Child topic identifier', + example: '0.0.4481265', + }) + childId: string; + @ApiProperty({ + description: 'Parent topic identifier', + example: '0.0.4481265', + }) + parentId: string; + @ApiProperty({ + description: 'Rationale', + example: '1706895596.736882433', + }) + rationale: string; +} + +export class TopicAnalyticsDTO implements TopicAnalytics { + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class TopicActivityDTO implements TopicActivity { + @ApiProperty({ + description: 'Registries', + example: 10, + }) + registries: number; + @ApiProperty({ + description: 'Topics', + example: 10, + }) + topics: number; + @ApiProperty({ + description: 'Policies', + example: 10, + }) + policies: number; + @ApiProperty({ + description: 'Tools', + example: 10, + }) + tools: number; + @ApiProperty({ + description: 'Modules', + example: 10, + }) + modules: number; + @ApiProperty({ + description: 'Tokens', + example: 10, + }) + tokens: number; + @ApiProperty({ + description: 'DIDs', + example: 10, + }) + dids: number; + @ApiProperty({ + description: 'Contracts', + example: 10, + }) + contracts: number; + @ApiProperty({ + description: 'Schemas', + example: 10, + }) + schemas: number; + @ApiProperty({ + description: 'VCs', + example: 10, + }) + vcs: number; + @ApiProperty({ + description: 'VPs', + example: 10, + }) + vps: number; + @ApiProperty({ + description: 'Roles', + example: 10, + }) + roles: number; +} + +export class TopicDTO + extends MessageDTO + implements Topic +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.TOPIC + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateTopic + }) + declare action: MessageAction; + @ApiProperty({ + type: TopicOptionsDTO, + }) + declare options: TopicOptionsDTO; + @ApiProperty({ + type: TopicAnalyticsDTO, + }) + declare analytics?: TopicAnalyticsDTO; +} + +export class TopicDetailsDTO + extends DetailsActivityDTO + implements TopicDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: TopicDTO, + }) + declare item?: TopicDTO; + @ApiProperty({ + type: RawTopicDTO, + }) + declare row?: RawTopicDTO; + @ApiProperty({ + type: TopicActivityDTO, + }) + declare activity?: TopicActivityDTO; +} diff --git a/indexer-api-gateway/src/dto/details/vc.details.ts b/indexer-api-gateway/src/dto/details/vc.details.ts new file mode 100644 index 0000000000..28008110a5 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/vc.details.ts @@ -0,0 +1,223 @@ +import { + MessageAction, + MessageType, + VC, + VCAnalytics, + VCDetails, + VCOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsHistoryDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class VCOptionsDTO implements VCOptions { + @ApiProperty({ + description: 'Issuer', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + issuer: string; + @ApiProperty({ + description: 'Relationships', + example: ['1706823227.586179534'], + }) + relationships: string[]; + @ApiProperty({ + description: 'Document status', + example: 'Approved', + }) + documentStatus: string; + @ApiProperty({ + description: 'Encoded EVC data', + }) + encodedData: boolean; +} + +export class VCAnalyticsDTO implements VCAnalytics { + @ApiProperty({ + description: 'Policy message identifier', + example: '1706823227.586179534', + }) + policyId?: string; + @ApiProperty({ + description: 'Schema message identifier', + example: '1706823227.586179534', + }) + schemaId?: string; + @ApiProperty({ + description: 'Schema name', + example: 'Monitoring Report', + }) + schemaName: string; + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class VCGridDTO + extends MessageDTO + implements VC +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.VC_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateVC, + }) + declare action: MessageAction; + @ApiProperty({ + type: VCOptionsDTO, + }) + declare options: VCOptionsDTO; + @ApiProperty({ + type: VCAnalyticsDTO, + }) + declare analytics?: VCAnalyticsDTO; +} + +export class VCDetailsItemDTO + extends MessageDTO + implements VC +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.VC_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateVC, + }) + declare action: MessageAction; + @ApiProperty({ + type: VCOptionsDTO, + }) + declare options: VCOptionsDTO; + @ApiProperty({ + type: VCAnalyticsDTO, + }) + declare analytics?: VCAnalyticsDTO; + @ApiProperty({ + description: 'Documents', + type: 'array', + items: { + type: 'string', + }, + example: [ + `"{\"id\":\"urn:uuid:229f8416-db6b-4d68-90da-38a5355126f5\",\"type\":[\"VerifiableCredential\"],\"issuer\":\"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223\",\"issuanceDate\":\"2024-02-02T10:06:53.300Z\",\"@context\":[\"https://www.w3.org/2018/credentials/v1\",\"ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq\"],\"credentialSubject\":[{\"@context\":[\"ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq\"],\"id\":\"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223\",\"type\":\"StandardRegistry\"}],\"proof\":{\"type\":\"Ed25519Signature2018\",\"created\":\"2024-02-02T10:06:53Z\",\"verificationMethod\":\"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223#did-root-key\",\"proofPurpose\":\"assertionMethod\",\"jws\":\"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YElNPdCNkj8wzABUNgWYo3Yge0qrGA2KbxBWDKBzACJJe70ItIZsgbIQUHMnFbcKpXB1cSnHQ-H5WH_7uZ_3CQ\"}}"`, + ], + }) + declare documents: any[]; +} +export class VCDetailsDTO + extends DetailsHistoryDTO + implements VCDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: VCDetailsItemDTO, + }) + declare item?: VCDetailsItemDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: [VCDetailsItemDTO], + }) + declare history?: VCDetailsItemDTO[]; + @ApiProperty({ + description: 'VC Schema', + type: 'object', + example: { + $id: '#StandardRegistry', + $comment: + '{ "@id": "#StandardRegistry", "term": "StandardRegistry" }', + title: 'StandardRegistry', + description: 'StandardRegistry', + type: 'object', + properties: { + '@context': { + oneOf: [ + { + type: 'string', + }, + { + type: 'array', + items: { + type: 'string', + }, + }, + ], + readOnly: true, + }, + type: { + oneOf: [ + { + type: 'string', + }, + { + type: 'array', + items: { + type: 'string', + }, + }, + ], + readOnly: true, + }, + id: { + type: 'string', + readOnly: true, + }, + geography: { + $comment: + '{"term": "geography", "@id": "https://www.schema.org/text"}', + title: 'geography', + description: 'geography', + type: 'string', + readOnly: false, + }, + law: { + $comment: + '{"term": "law", "@id": "https://www.schema.org/text"}', + title: 'law', + description: 'law', + type: 'string', + readOnly: false, + }, + tags: { + $comment: + '{"term": "tags", "@id": "https://www.schema.org/text"}', + title: 'tags', + description: 'tags', + type: 'string', + readOnly: false, + }, + ISIC: { + $comment: + '{"term": "ISIC", "@id": "https://www.schema.org/text"}', + title: 'ISIC', + description: 'ISIC', + type: 'string', + readOnly: false, + }, + }, + required: ['geography', 'law', 'tags'], + additionalProperties: false, + }, + }) + schema?: any; +} diff --git a/indexer-api-gateway/src/dto/details/vp.details.ts b/indexer-api-gateway/src/dto/details/vp.details.ts new file mode 100644 index 0000000000..76415845e4 --- /dev/null +++ b/indexer-api-gateway/src/dto/details/vp.details.ts @@ -0,0 +1,130 @@ +import { + MessageAction, + MessageType, + VP, + VPAnalytics, + VPDetails, + VPOptions, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from '../message.dto.js'; +import { DetailsHistoryDTO } from './details.interface.js'; +import { RawMessageDTO } from '../raw-message.dto.js'; + +export class VPOptionsDTO implements VPOptions { + @ApiProperty({ + description: 'Issuer', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + issuer: string; + @ApiProperty({ + description: 'Relationships', + example: ['1706823227.586179534'], + }) + relationships: string[]; +} + +export class VPAnalyticsDTO implements VPAnalytics { + @ApiProperty({ + description: 'Schema message identifiers', + example: ['1706823227.586179534'], + }) + schemaIds: string[]; + @ApiProperty({ + description: 'Schema names', + example: ['Monitoring Report'], + }) + schemaNames: string[]; + @ApiProperty({ + description: 'Policy message identifier', + example: '1706823227.586179534', + }) + policyId: string; + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; +} + +export class VPGridDTO + extends MessageDTO + implements VP +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.VP_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateVP, + }) + declare action: MessageAction; + @ApiProperty({ + type: VPOptionsDTO, + }) + declare options: VPOptionsDTO; +} + +export class VPDetailsItemDTO + extends MessageDTO + implements VP +{ + @ApiProperty({ + description: 'Type', + enum: MessageType, + example: MessageType.VP_DOCUMENT, + }) + declare type: MessageType; + @ApiProperty({ + description: 'Action', + enum: MessageAction, + example: MessageAction.CreateVP, + }) + declare action: MessageAction; + @ApiProperty({ + type: VPOptionsDTO, + }) + declare options: VPOptionsDTO; + @ApiProperty({ + type: VPAnalyticsDTO, + }) + declare analytics?: VPAnalyticsDTO; + @ApiProperty({ + description: 'Documents', + type: 'array', + items: { + type: 'string', + }, + example: [ + `"{\"id\":\"urn:uuid:2c374b67-fda5-4023-97c2-c0782624573f\",\"type\":[\"VerifiablePresentation\"],\"@context\":[\"https://www.w3.org/2018/credentials/v1\"],\"verifiableCredential\":[{\"id\":\"urn:uuid:ff0aecbd-d358-4e5b-b99b-7a87ba38a3b2\",\"type\":[\"VerifiableCredential\"],\"issuer\":\"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438\",\"issuanceDate\":\"2024-02-06T05:40:37.795Z\",\"@context\":[\"https://www.w3.org/2018/credentials/v1\",\"ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi\"],\"credentialSubject\":[{\"finalMintAmount\":5,\"policyId\":\"65bc691d2ae9d0f1ef2db3bc\",\"ref\":\"urn:uuid:11b1ad6f-8b4f-4d61-a63a-cc9e6532625f\",\"@context\":[\"ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi\"],\"id\":\"urn:uuid:5d253a1d-456a-4fb1-8b45-257e1db2e668\",\"type\":\"601a68c4-66c3-407c-bc88-1b5841e6d1da&1.0.0\"}],\"proof\":{\"type\":\"Ed25519Signature2018\",\"created\":\"2024-02-06T05:40:37Z\",\"verificationMethod\":\"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key\",\"proofPurpose\":\"assertionMethod\",\"jws\":\"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..UvTeKVUVUxH1SFNNoyu_VXf4kFqDIFzFPJaaq5adiSHrBePLQMQv7dM_Fq23z7UGHSmXlodBen1Ujcdi-am5DQ\"}},{\"id\":\"urn:uuid:b76fbd72-48b7-45fb-b152-7ec13d11eafb\",\"type\":[\"VerifiableCredential\"],\"issuer\":\"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438\",\"issuanceDate\":\"2024-02-06T05:40:45.066Z\",\"@context\":[\"https://www.w3.org/2018/credentials/v1\",\"ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu\"],\"credentialSubject\":[{\"date\":\"2024-02-06T05:40:45.021Z\",\"tokenId\":\"0.0.1621155\",\"amount\":\"5\",\"@context\":[\"ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu\"],\"type\":\"MintToken\"}],\"proof\":{\"type\":\"Ed25519Signature2018\",\"created\":\"2024-02-06T05:40:45Z\",\"verificationMethod\":\"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key\",\"proofPurpose\":\"assertionMethod\",\"jws\":\"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..5hWYO3NA0Q9zI0oS1lLOpofQI-DTQVM0sd4GUQV-UUSlBug3EgYYBm7247LCzlCRt9VpYsUh7SxIrsgHzsSRDA\"}}],\"proof\":{\"type\":\"Ed25519Signature2018\",\"created\":\"2024-02-06T05:40:45Z\",\"verificationMethod\":\"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key\",\"proofPurpose\":\"authentication\",\"challenge\":\"123\",\"jws\":\"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Mu5BaQ34idnqG6d-aMqufQOXcuWHMkv6N9Z2zhBi9Yfd7jU9FFkwi-Xjyf-Kastr7vVWBNLwGxB-bPRf4UEHAg\"}}"`, + ], + }) + declare documents: any[]; +} + +export class VPDetailsDTO + extends DetailsHistoryDTO + implements VPDetails +{ + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + declare uuid?: string; + @ApiProperty({ + type: VPDetailsItemDTO, + }) + declare item?: VPDetailsItemDTO; + @ApiProperty({ + type: RawMessageDTO, + }) + declare row?: RawMessageDTO; + @ApiProperty({ + type: [VPDetailsItemDTO], + }) + declare history?: VPDetailsItemDTO[]; +} diff --git a/indexer-api-gateway/src/dto/grid/page.dto.ts b/indexer-api-gateway/src/dto/grid/page.dto.ts new file mode 100644 index 0000000000..de7414216c --- /dev/null +++ b/indexer-api-gateway/src/dto/grid/page.dto.ts @@ -0,0 +1,28 @@ +import { Page } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +/** + * Landing Analytics DTO + */ +export class PageDTO implements Page { + items: T[]; + @ApiProperty({ + description: 'Page index', + example: '0', + }) + pageIndex: number; + @ApiProperty({ + description: 'Page size', + example: '10', + }) + pageSize: number; + @ApiProperty({ + description: 'Total size', + example: '100', + }) + total: number; + @ApiProperty({ + description: 'Order', + }) + order?: { [field: string]: string }; +} diff --git a/indexer-api-gateway/src/dto/index.ts b/indexer-api-gateway/src/dto/index.ts new file mode 100644 index 0000000000..267738e5c3 --- /dev/null +++ b/indexer-api-gateway/src/dto/index.ts @@ -0,0 +1,13 @@ +export * from './langing-analytics.dto.js'; +export * from './project-coordinates.dto.js'; +export * from './grid/page.dto.js'; +export * from './search-item.dto.js'; +export * from './details/index.js'; +export * from './raw-message.dto.js'; +export * from './raw-topic.dto.js'; +export * from './raw-nft.dto.js'; +export * from './raw-token.dto.js'; +export * from './relationships.dto.js'; +export * from './schema-tree.dto.js'; +export * from './internal-server-error.dto.js'; +export * from './search-policy.dto.js'; diff --git a/indexer-api-gateway/src/dto/internal-server-error.dto.ts b/indexer-api-gateway/src/dto/internal-server-error.dto.ts new file mode 100644 index 0000000000..0341244483 --- /dev/null +++ b/indexer-api-gateway/src/dto/internal-server-error.dto.ts @@ -0,0 +1,17 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class InternalServerErrorDTO { + @ApiProperty({ + type: 'number', + required: true, + example: 500, + }) + code: number; + + @ApiProperty({ + type: 'string', + required: true, + example: 'Error message', + }) + message: string; +} diff --git a/indexer-api-gateway/src/dto/langing-analytics.dto.ts b/indexer-api-gateway/src/dto/langing-analytics.dto.ts new file mode 100644 index 0000000000..ea8d7df027 --- /dev/null +++ b/indexer-api-gateway/src/dto/langing-analytics.dto.ts @@ -0,0 +1,37 @@ +import { LandingAnalytics } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +/** + * Landing Analytics DTO + */ +export class LandingAnalyticsDTO implements LandingAnalytics { + @ApiProperty({ + description: 'Registries count', + example: '10', + }) + registries: number; + + @ApiProperty({ + description: 'Methodologies count', + example: '10', + }) + methodologies: number; + + @ApiProperty({ + description: 'Projects count', + example: '10', + }) + projects: number; + + @ApiProperty({ + description: 'Total issuance', + example: '10', + }) + totalIssuance: number; + + @ApiProperty({ + description: 'ISO Date', + example: '2024-06-12T14:17:26.689Z' + }) + date: Date; +} diff --git a/indexer-api-gateway/src/dto/message.dto.ts b/indexer-api-gateway/src/dto/message.dto.ts new file mode 100644 index 0000000000..a12b351009 --- /dev/null +++ b/indexer-api-gateway/src/dto/message.dto.ts @@ -0,0 +1,90 @@ +import { Message, MessageAction, MessageType } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +export class MessageDTO implements Message { + @ApiProperty({ + description: 'Identifier', + example: '667c240639282050117a1985', + }) + id: string; + @ApiProperty({ + description: 'Topic identifier', + example: '0.0.4481265', + }) + topicId: string; + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + consensusTimestamp: string; + @ApiProperty({ + description: 'Owner', + example: '0.0.1', + }) + owner: string; + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + @ApiProperty({ + description: 'Status', + example: 'NEW', + }) + status: string; + @ApiProperty({ + description: 'Status', + example: 'Revoked', + }) + statusReason: string; + // @ApiProperty({ + // description: 'Type', + // example: 'VC-Document', + // }) + type: MessageType; + // @ApiProperty({ + // description: 'Type', + // example: 'create-vc-document', + // }) + action: MessageAction; + @ApiProperty({ + description: 'Lang', + example: 'en-US', + }) + lang: string; + @ApiProperty({ + description: 'Response type', + example: 'str', + }) + responseType: string; + @ApiProperty({ + description: 'Status message', + }) + statusMessage: string; + options: O; + analytics?: A; + @ApiProperty({ + description: 'Files', + example: ['QmYtKEVfpbDwn7XLHjnjap224ESi3vLiYpkbWoabnxs6cX'], + }) + files: string[]; + // @ApiProperty({ + // description: 'Documents', + // type: 'array', + // items: { + // type: 'string', + // }, + // example: ['667c240639282050117a1985'] + // }) + documents: any[]; + @ApiProperty({ + description: 'Topics', + example: ['0.0.4481265'], + }) + topics: string[]; + @ApiProperty({ + description: 'Tokens', + example: ['0.0.4481265'], + }) + tokens: string[]; +} diff --git a/indexer-api-gateway/src/dto/project-coordinates.dto.ts b/indexer-api-gateway/src/dto/project-coordinates.dto.ts new file mode 100644 index 0000000000..096ee51e0d --- /dev/null +++ b/indexer-api-gateway/src/dto/project-coordinates.dto.ts @@ -0,0 +1,16 @@ +import { ProjectCoordinates } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +export class ProjectCoordinatesDTO implements ProjectCoordinates { + @ApiProperty({ + description: 'Coordinates of project', + example: '33.33|77.77', + }) + coordinates: string; + + @ApiProperty({ + description: 'Project message identifier', + example: '1706823227.586179534', + }) + projectId: string; +} diff --git a/indexer-api-gateway/src/dto/raw-message.dto.ts b/indexer-api-gateway/src/dto/raw-message.dto.ts new file mode 100644 index 0000000000..8335558511 --- /dev/null +++ b/indexer-api-gateway/src/dto/raw-message.dto.ts @@ -0,0 +1,72 @@ +import { RawMessage } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +export class RawMessageDTO implements RawMessage { + @ApiProperty({ + description: 'Identifier', + example: '667c240639282050117a1985', + }) + id: string; + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + consensusTimestamp: string; + @ApiProperty({ + description: 'Topic identifier', + example: '0.0.4481265', + }) + topicId: string; + @ApiProperty({ + description: 'Status', + example: 'LOADED', + }) + status: string; + @ApiProperty({ + description: 'Last update', + example: 1716755852055, + }) + lastUpdate: number; + @ApiProperty({ + description: 'Message', + example: + 'eyJpZCI6ImVhYTYyOWZmLWM4NmItNDEyZS1iYzYwLWM4NDk2OTJkMDBiYiIsInN0YXR1cyI6IklTU1VFIiwidHlwZSI6IlN0YW5kYXJkIFJlZ2lzdHJ5IiwiYWN0aW9uIjoiSW5pdCIsImxhbmciOiJlbi1VUyIsImRpZCI6ImRpZDpoZWRlcmE6dGVzdG5ldDpBYkd6Q3hpRzRlZ0xibldCUERpaHdMUVIza0tLcnNGNmJnSDdUdmVGYjI3bl8wLjAuMjE3NiIsInRvcGljSWQiOiIwLjAuMjE3NiIsImF0dHJpYnV0ZXMiOnsiZ2VvZ3JhcGh5IjoidGVzdCIsImxhdyI6InRlc3R0ZXMiLCJ0YWdzIjoidGVzdCJ9fQ', + }) + message: string; + @ApiProperty({ + description: 'Sequence number', + example: 2, + }) + sequenceNumber: number; + @ApiProperty({ + description: 'Owner', + example: '0.0.1914', + }) + owner: string; + @ApiProperty({ + description: 'Chunk identifier', + example: '1706817694.014944860', + }) + chunkId: string; + @ApiProperty({ + description: 'Chunk number', + example: 1, + }) + chunkNumber: number; + @ApiProperty({ + description: 'Chunk total', + example: 1, + }) + chunkTotal: number; + @ApiProperty({ + description: 'Type', + example: 'Message', + }) + type: string; + @ApiProperty({ + description: 'Data', + example: + '`{"id":"eaa629ff-c86b-412e-bc60-c849692d00bb","status":"ISSUE","type":"Standard Registry","action":"Init","lang":"en-US","did":"did:hedera:testnet:AbGzCxiG4egLbnWBPDihwLQR3kKKrsF6bgH7TveFb27n_0.0.2176","topicId":"0.0.2176","attributes":{"geography":"test","law":"testtes","tags":"test"}}`', + }) + data?: string; +} diff --git a/indexer-api-gateway/src/dto/raw-nft.dto.ts b/indexer-api-gateway/src/dto/raw-nft.dto.ts new file mode 100644 index 0000000000..f0269f87f8 --- /dev/null +++ b/indexer-api-gateway/src/dto/raw-nft.dto.ts @@ -0,0 +1,30 @@ +import { RawNFT } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +export class RawNFTDTO implements RawNFT { + @ApiProperty({ + description: 'Identifier', + example: '667c240639282050117a1985', + }) + id: string; + @ApiProperty({ + description: 'Token identifier', + example: '0.0.4481265', + }) + tokenId: string; + @ApiProperty({ + description: 'Last update', + example: 1716755852055, + }) + lastUpdate: number; + @ApiProperty({ + description: 'Serial number', + example: 1, + }) + serialNumber: number; + @ApiProperty({ + description: 'metadata', + example: '1706823227.586179534', + }) + metadata: string; +} diff --git a/indexer-api-gateway/src/dto/raw-token.dto.ts b/indexer-api-gateway/src/dto/raw-token.dto.ts new file mode 100644 index 0000000000..8f1a5d5bbb --- /dev/null +++ b/indexer-api-gateway/src/dto/raw-token.dto.ts @@ -0,0 +1,73 @@ +import { RawToken } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +/** + * Token + */ +export class RawTokenDTO implements RawToken { + @ApiProperty({ + description: 'Identifier', + example: '667c240639282050117a1985', + }) + id: string; + @ApiProperty({ + description: 'Token identifier', + example: '0.0.4481265', + }) + tokenId: string; + @ApiProperty({ + description: 'Status', + example: 'UPDATED', + }) + status: string; + @ApiProperty({ + description: 'Last update', + example: 1716755852055, + }) + lastUpdate: number; + @ApiProperty({ + description: 'Serial number', + example: 1, + }) + serialNumber: number; + @ApiProperty({ + description: 'Has next', + example: false, + }) + hasNext: boolean; + @ApiProperty({ + description: 'Name', + example: 'iRec Token', + }) + name: string; + @ApiProperty({ + description: 'Symbol', + example: 'iRec', + }) + symbol: string; + @ApiProperty({ + description: 'Symbol', + enum: ['NON_FUNGIBLE_UNIQUE', 'FUNGIBLE_COMMON'], + }) + type: string; + @ApiProperty({ + description: 'Treasury', + example: '0.0.1', + }) + treasury: string; + @ApiProperty({ + description: 'Memo', + example: '0.0.2952745', + }) + memo: string; + @ApiProperty({ + description: 'Total supply', + example: '77', + }) + totalSupply: any; + @ApiProperty({ + description: 'Decimals', + example: '2', + }) + decimals?: string; +} diff --git a/indexer-api-gateway/src/dto/raw-topic.dto.ts b/indexer-api-gateway/src/dto/raw-topic.dto.ts new file mode 100644 index 0000000000..36c9f72ef2 --- /dev/null +++ b/indexer-api-gateway/src/dto/raw-topic.dto.ts @@ -0,0 +1,34 @@ +import { RawTopic } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +export class RawTopicDTO implements RawTopic { + @ApiProperty({ + description: 'Identifier', + example: '667c240639282050117a1985', + }) + id: string; + @ApiProperty({ + description: 'Topic identifier', + example: '0.0.4481265', + }) + topicId: string; + // @ApiProperty({ + // description: 'Status', + // }) + status: string; + @ApiProperty({ + description: 'Last update', + example: 1716755852055, + }) + lastUpdate: number; + @ApiProperty({ + description: 'Messages', + example: 25, + }) + messages: number; + @ApiProperty({ + description: 'Has next', + example: false, + }) + hasNext: boolean; +} diff --git a/indexer-api-gateway/src/dto/relationships.dto.ts b/indexer-api-gateway/src/dto/relationships.dto.ts new file mode 100644 index 0000000000..be1beddd1c --- /dev/null +++ b/indexer-api-gateway/src/dto/relationships.dto.ts @@ -0,0 +1,80 @@ +import { + MessageType, + Relationship, + RELATIONSHIP_CATEGORIES, + RelationshipCategory, + RelationshipLink, + Relationships, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { MessageDTO } from './message.dto.js'; + +export class RelationshipDTO implements Relationship { + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + id: string; + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + @ApiProperty({ + description: 'Type', + enum: MessageType, + }) + type: MessageType; + @ApiProperty({ + description: 'Category', + example: 1, + }) + category: number; + @ApiProperty({ + description: 'Name', + example: 'Monitoring Report Document', + }) + name: string; +} + +export class RelationshipLinkDTO implements RelationshipLink { + @ApiProperty({ + description: 'Source message identifier', + example: '1706823227.586179534', + }) + source: string; + @ApiProperty({ + description: 'Target message identifier', + example: '1706823227.586179534', + }) + target: string; +} + +export class RelationshipsDTO implements Relationships { + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + id: string; + @ApiProperty({ + type: MessageDTO, + }) + item?: MessageDTO; + @ApiProperty({ + type: RelationshipDTO, + }) + target?: RelationshipDTO; + @ApiProperty({ + type: [RelationshipDTO], + }) + relationships?: RelationshipDTO[]; + @ApiProperty({ + type: [RelationshipLinkDTO], + }) + links?: RelationshipLinkDTO[]; + @ApiProperty({ + description: 'Categories', + example: RELATIONSHIP_CATEGORIES, + }) + categories?: { name: RelationshipCategory }[]; +} diff --git a/indexer-api-gateway/src/dto/schema-tree.dto.ts b/indexer-api-gateway/src/dto/schema-tree.dto.ts new file mode 100644 index 0000000000..750758320d --- /dev/null +++ b/indexer-api-gateway/src/dto/schema-tree.dto.ts @@ -0,0 +1,58 @@ +import { + SchemaTree, + SchemaTreeNode, + SchemaTreeNodeData, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { SchemaGridDTO } from './details/schema.details.js'; + +export class SchemaTreeNodeDataDTO implements SchemaTreeNodeData { + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + id: string; + @ApiProperty({ + description: 'Color', + example: '#FFFFFF', + }) + color: string; +} + +export class SchemaTreeNodeDTO implements SchemaTreeNode { + @ApiProperty({ + description: 'Label', + example: 'Monitoring Report', + }) + label: string; + @ApiProperty({ + description: 'Expanded', + example: true, + }) + expanded: boolean; + @ApiProperty({ + type: SchemaTreeNodeDataDTO, + }) + data: SchemaTreeNodeDataDTO; + @ApiProperty({ + description: 'Schema tree node children', + type: 'object', + }) + children: SchemaTreeNode[]; +} + +export class SchemaTreeDTO implements SchemaTree { + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + id: string; + @ApiProperty({ + type: SchemaGridDTO, + }) + item?: SchemaGridDTO; + @ApiProperty({ + type: SchemaTreeNodeDTO, + }) + root?: SchemaTreeNodeDTO; +} diff --git a/indexer-api-gateway/src/dto/search-item.dto.ts b/indexer-api-gateway/src/dto/search-item.dto.ts new file mode 100644 index 0000000000..6b93715ff7 --- /dev/null +++ b/indexer-api-gateway/src/dto/search-item.dto.ts @@ -0,0 +1,16 @@ +import { SearchItem } from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; + +export class SearchItemDTO implements SearchItem { + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + consensusTimestamp: string; + + @ApiProperty({ + description: 'Message type', + example: 'VC-Document', + }) + type: string; +} diff --git a/indexer-api-gateway/src/dto/search-policy.dto.ts b/indexer-api-gateway/src/dto/search-policy.dto.ts new file mode 100644 index 0000000000..eb3cf7a33f --- /dev/null +++ b/indexer-api-gateway/src/dto/search-policy.dto.ts @@ -0,0 +1,171 @@ +import { + SearchPolicyBlocks, + SearchPolicyParams, + SearchPolicyResult, +} from '@indexer/interfaces'; +import { ApiProperty } from '@nestjs/swagger'; +import { Type } from 'class-transformer'; +import { IsNumber, IsObject, IsOptional, IsString } from 'class-validator'; + +export class SearchPolicyBlocksDTO implements SearchPolicyBlocks { + @ApiProperty({ + description: 'Hash', + example: 'DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or', + }) + @IsString() + hash: string; + @ApiProperty({ + description: 'Hash map', + type: 'object', + }) + @IsObject() + hashMap: any; + @ApiProperty({ + description: 'Threshold', + example: 10, + }) + @IsNumber() + threshold: number; +} + +/** + * Search policy params + */ +export class SearchPolicyParamsDTO implements SearchPolicyParams { + @ApiProperty({ + description: 'Text', + }) + @IsString() + @IsOptional() + text?: string; + @ApiProperty({ + description: 'Mint VC count', + example: 10, + }) + @IsNumber() + @IsOptional() + minVcCount?: number; + @ApiProperty({ + description: 'Mint VP count', + example: 10, + }) + @IsNumber() + @IsOptional() + minVpCount?: number; + @ApiProperty({ + description: 'Mint tokens count', + example: 10, + }) + @IsNumber() + @IsOptional() + minTokensCount?: number; + @ApiProperty({ + description: 'Threshold', + example: 10, + }) + @IsNumber() + @IsOptional() + threshold?: number; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + @IsString() + @IsOptional() + owner?: string; + @ApiProperty({ + type: SearchPolicyBlocksDTO, + }) + @Type(() => SearchPolicyBlocksDTO) + @IsOptional() + blocks?: SearchPolicyBlocksDTO; +} + +/** + * Search policy result + */ +export class SearchPolicyResultDTO implements SearchPolicyResult { + @ApiProperty({ + description: 'Type', + example: 'Global', + }) + type: 'Global'; + @ApiProperty({ + description: 'Topic identifier', + example: '0.0.4481265', + }) + topicId: string; + @ApiProperty({ + description: 'UUID', + example: '93938a10-d032-4a9b-9425-092e58bffbf7', + }) + uuid: string; + @ApiProperty({ + description: 'Name', + example: 'Verra REDD', + }) + name: string; + @ApiProperty({ + description: 'Description', + example: 'Verra REDD Policy', + }) + description: string; + @ApiProperty({ + description: 'Version', + example: '1.0.0', + }) + version: string; + @ApiProperty({ + description: 'Status', + example: 'PUBLISH', + }) + status: 'PUBLISH'; + @ApiProperty({ + description: 'Message identifier', + example: '1706823227.586179534', + }) + messageId: string; + @ApiProperty({ + description: 'Owner', + example: + 'did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265', + }) + owner: string; + @ApiProperty({ + description: 'Text search', + }) + textSearch: string; + @ApiProperty({ + description: 'Registry identifier', + example: '1706823227.586179534', + }) + registryId: string; + @ApiProperty({ + description: 'VC count', + example: 10, + }) + vcCount: number; + @ApiProperty({ + description: 'VP count', + example: 10, + }) + vpCount: number; + @ApiProperty({ + description: 'Token count', + example: 10, + }) + tokensCount: number; + @ApiProperty({ + description: 'Rate', + example: 50, + minimum: 0, + maximum: 100, + }) + rate: number; + @ApiProperty({ + description: 'tags', + example: ['iRec'], + }) + tags: string[]; +} diff --git a/indexer-api-gateway/src/middlewares/validation/schemas/errors.ts b/indexer-api-gateway/src/middlewares/validation/schemas/errors.ts deleted file mode 100644 index 008f6adbf9..0000000000 --- a/indexer-api-gateway/src/middlewares/validation/schemas/errors.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ApiProperty } from '@nestjs/swagger'; -import { IsNumber, IsString } from 'class-validator'; -import { Expose } from 'class-transformer'; - -export class InternalServerErrorDTO { - @ApiProperty() - @IsNumber() - @Expose() - code: number; - - @ApiProperty() - @IsString() - @Expose() - message: string; -} \ No newline at end of file diff --git a/indexer-api-gateway/src/middlewares/validation/schemas/index.ts b/indexer-api-gateway/src/middlewares/validation/schemas/index.ts deleted file mode 100644 index ecf26a2b33..0000000000 --- a/indexer-api-gateway/src/middlewares/validation/schemas/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './errors.js' -export * from './page.js' \ No newline at end of file diff --git a/indexer-api-gateway/src/middlewares/validation/schemas/page.ts b/indexer-api-gateway/src/middlewares/validation/schemas/page.ts deleted file mode 100644 index e9f0b04de1..0000000000 --- a/indexer-api-gateway/src/middlewares/validation/schemas/page.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ApiProperty } from '@nestjs/swagger'; - -export class PageDTO { - @ApiProperty({ type: 'number', nullable: false, required: true }) - pageIndex: number; - - @ApiProperty({ type: 'number', nullable: false, required: true }) - pageSize: number; - - @ApiProperty({ type: 'number', nullable: false, required: true }) - total: number; - - @ApiProperty({ type: 'object', nullable: false, required: true, isArray: true }) - items: any[]; -} diff --git a/indexer-api-gateway/tsconfig.json b/indexer-api-gateway/tsconfig.json index 739752a7a2..7ef75633a1 100644 --- a/indexer-api-gateway/tsconfig.json +++ b/indexer-api-gateway/tsconfig.json @@ -16,20 +16,11 @@ "moduleResolution": "node", "outDir": "dist/", "paths": { - "@api/*": [ - "api/*" + "#dto": [ + "dto/index" ], - "@entities/*": [ - "entities/*" - ], - "@helpers/*": [ - "helpers/*" - ], - "@auth/*": [ - "auth/*" - ], - "@middlewares/*": [ - "middlewares/*" + "#decorators": [ + "decorators/index" ] }, "target": "es2022" @@ -42,4 +33,4 @@ "include": [ "src/**/*" ] -} \ No newline at end of file +} diff --git a/indexer-api-gateway/tsconfig.production.json b/indexer-api-gateway/tsconfig.production.json index d414348aea..9ecf87b275 100644 --- a/indexer-api-gateway/tsconfig.production.json +++ b/indexer-api-gateway/tsconfig.production.json @@ -16,20 +16,11 @@ "moduleResolution": "node", "outDir": "dist/", "paths": { - "@api/*": [ - "api/*" + "#dto": [ + "dto/index" ], - "@entities/*": [ - "entities/*" - ], - "@helpers/*": [ - "helpers/*" - ], - "@auth/*": [ - "auth/*" - ], - "@middlewares/*": [ - "middlewares/*" + "#decorators": [ + "decorators/index" ] }, "target": "es2022" @@ -42,4 +33,4 @@ "include": [ "src/**/*" ] -} \ No newline at end of file +} diff --git a/indexer-common/package.json b/indexer-common/package.json index bc7d095cbc..6b571b4cdb 100644 --- a/indexer-common/package.json +++ b/indexer-common/package.json @@ -22,7 +22,6 @@ "@types/gulp-rename": "^2", "@types/jszip": "^3.4.1", "@types/node": "^18.16.0", - "@types/winston": "^2.4.4", "mocha-junit-reporter": "^2.0.2", "tslint": "^6.1.3", "typescript": "^4.5.5" @@ -45,5 +44,5 @@ "test:stability": "mocha tests/stability.test.js" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/indexer-common/src/entity/message-cache.ts b/indexer-common/src/entity/message-cache.ts index 00a61871bc..a1d0e5be83 100644 --- a/indexer-common/src/entity/message-cache.ts +++ b/indexer-common/src/entity/message-cache.ts @@ -1,3 +1,4 @@ +import { RawMessage } from '@indexer/interfaces'; import { Entity, Property, PrimaryKey, SerializedPrimaryKey, Unique, Index } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; @@ -8,7 +9,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Index({ name: 'status', properties: ['status'] }) // @Index({ name: 'last_update', properties: ['lastUpdate'] }) // @Index({ name: 'status_and_last_update', properties: ['status', 'lastUpdate'] }) -export class MessageCache { +export class MessageCache implements RawMessage { @PrimaryKey() _id: ObjectId; diff --git a/indexer-common/src/entity/message.ts b/indexer-common/src/entity/message.ts index 3e06d8ecc5..27a834b1ad 100644 --- a/indexer-common/src/entity/message.ts +++ b/indexer-common/src/entity/message.ts @@ -5,8 +5,10 @@ import { SerializedPrimaryKey, Unique, Index, + Enum, } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; +import { Message as IMessage, MessageAction, MessageType } from '@indexer/interfaces'; @Entity() @Unique({ name: 'consensus_timestamp', properties: ['consensusTimestamp'] }) @@ -14,7 +16,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Index({ name: 'status', properties: ['status'] }) @Index({ name: 'type', properties: ['type'] }) @Index({ name: 'files', properties: ['files'] }) -export class Message { +export class Message implements IMessage { @PrimaryKey() _id: ObjectId; @@ -39,11 +41,11 @@ export class Message { @Property({ nullable: true }) statusReason: string; - @Property({ nullable: true }) - type: string; + @Enum({ nullable: true, type: () => MessageType }) + type: MessageType; - @Property({ nullable: true }) - action: string; + @Enum({ nullable: true, type: () => MessageAction }) + action: MessageAction; @Property({ nullable: true }) lang: string; @@ -63,7 +65,7 @@ export class Message { schemaId?: string; schemaName?: string; policyId?: string; - policyIds?: string; + policyIds?: string[]; textSearch?: string; childSchemas?: any[]; owner?: string; @@ -74,6 +76,7 @@ export class Message { tokensCount?: number; hash?: string; hashMap?: any; + properties?: string[]; }; @Property({ nullable: true }) diff --git a/indexer-common/src/entity/nft-cache.ts b/indexer-common/src/entity/nft-cache.ts index c80f8c57a0..30e5831e51 100644 --- a/indexer-common/src/entity/nft-cache.ts +++ b/indexer-common/src/entity/nft-cache.ts @@ -1,3 +1,4 @@ +import { RawNFT } from '@indexer/interfaces'; import { Entity, Property, PrimaryKey, SerializedPrimaryKey, Unique, Index } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; @@ -6,7 +7,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Index({ name: 'serial_number', properties: ['serialNumber'] }) @Unique({ name: 'unique_id', properties: ['tokenId', 'serialNumber'] }) @Index({ name: 'last_update', properties: ['lastUpdate'] }) -export class NftCache { +export class NftCache implements RawNFT { @PrimaryKey() _id: ObjectId; diff --git a/indexer-common/src/entity/token-cache.ts b/indexer-common/src/entity/token-cache.ts index 2b5a04b019..75b97e1e6f 100644 --- a/indexer-common/src/entity/token-cache.ts +++ b/indexer-common/src/entity/token-cache.ts @@ -1,3 +1,4 @@ +import { RawToken } from '@indexer/interfaces'; import { Entity, Property, PrimaryKey, SerializedPrimaryKey, Unique, Index } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; @@ -6,7 +7,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Index({ name: 'status', properties: ['status'] }) @Index({ name: 'last_update', properties: ['lastUpdate'] }) @Index({ name: 'has_next', properties: ['hasNext'] }) -export class TokenCache { +export class TokenCache implements RawToken { @PrimaryKey() _id: ObjectId; diff --git a/indexer-common/src/entity/topic-cache.ts b/indexer-common/src/entity/topic-cache.ts index 52cf07c921..fb7dc1f4bb 100644 --- a/indexer-common/src/entity/topic-cache.ts +++ b/indexer-common/src/entity/topic-cache.ts @@ -1,3 +1,4 @@ +import { RawTopic } from '@indexer/interfaces'; import { Entity, Property, PrimaryKey, SerializedPrimaryKey, Unique, Index } from '@mikro-orm/core'; import { ObjectId } from '@mikro-orm/mongodb'; @@ -6,7 +7,7 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Index({ name: 'status', properties: ['status'] }) @Index({ name: 'last_update', properties: ['lastUpdate'] }) @Index({ name: 'has_next', properties: ['hasNext'] }) -export class TopicCache { +export class TopicCache implements RawTopic { @PrimaryKey() _id: ObjectId; diff --git a/indexer-common/src/index.ts b/indexer-common/src/index.ts index 420c25c5fc..597e14efc2 100644 --- a/indexer-common/src/index.ts +++ b/indexer-common/src/index.ts @@ -13,6 +13,5 @@ export * from './decorators/singleton.js'; export * from './interfaces/index.js'; export * from './messages/message-response.js'; export * from './messages/message-api.js'; -export * from './messages/message-body.js'; export * from './elastic/index.js'; export const entities = Object.values(ent); diff --git a/indexer-common/src/messages/message-api.ts b/indexer-common/src/messages/message-api.ts index 51249a9b87..d65ec240de 100644 --- a/indexer-common/src/messages/message-api.ts +++ b/indexer-common/src/messages/message-api.ts @@ -2,74 +2,74 @@ * Message api */ export enum IndexerMessageAPI { - GET_INDEXER_WORKER_STATUS = 'GET_INDEXER_WORKER_STATUS', - INDEXER_WORKER_STATUS = 'INDEXER_WORKER_STATUS', - GET_INDEXER_STATUS = 'GET_INDEXER_STATUS', - INDEXER_STATUS = 'INDEXER_STATUS', - GET_LOG_MESSAGES = 'GET_LOG_MESSAGES', - GET_LOG_TOPICS = 'GET_LOG_TOPICS', - GET_LOG_DOCUMENTS = 'GET_LOG_DOCUMENTS', - GET_LOG_DOCUMENT_FILTERS = 'GET_LOG_DOCUMENT_FILTERS', - GET_LOG_TOKENS = 'GET_LOG_TOKENS', - GET_LOG_NFTS = 'GET_LOG_NFTS', - ELASTIC_UPDATE_DATA = 'ELASTIC_UPDATE_DATA', - GET_SEARCH_API = 'GET_SEARCH_API', + GET_INDEXER_WORKER_STATUS = 'INDEXER_API_GET_INDEXER_WORKER_STATUS', + INDEXER_WORKER_STATUS = 'INDEXER_API_INDEXER_WORKER_STATUS', + GET_INDEXER_STATUS = 'INDEXER_API_GET_INDEXER_STATUS', + INDEXER_STATUS = 'INDEXER_API_INDEXER_STATUS', + GET_LOG_MESSAGES = 'INDEXER_API_GET_LOG_MESSAGES', + GET_LOG_TOPICS = 'INDEXER_API_GET_LOG_TOPICS', + GET_LOG_DOCUMENTS = 'INDEXER_API_GET_LOG_DOCUMENTS', + GET_LOG_DOCUMENT_FILTERS = 'INDEXER_API_GET_LOG_DOCUMENT_FILTERS', + GET_LOG_TOKENS = 'INDEXER_API_GET_LOG_TOKENS', + GET_LOG_NFTS = 'INDEXER_API_GET_LOG_NFTS', + ELASTIC_UPDATE_DATA = 'INDEXER_API_ELASTIC_UPDATE_DATA', + GET_SEARCH_API = 'INDEXER_API_GET_SEARCH_API', // #region LANDING - GET_LANDING_ANALYTICS = 'GET_LANDING_ANALYTICS', - GET_PROJECTS_COORDINATES = 'GET_PROJECTS_COORDINATES', + GET_LANDING_ANALYTICS = 'INDEXER_API_GET_LANDING_ANALYTICS', + GET_PROJECTS_COORDINATES = 'INDEXER_API_GET_PROJECTS_COORDINATES', // #endregion // #region ACCOUNTS - GET_REGISTRIES = 'GET_REGISTRIES', - GET_REGISTRY = 'GET_REGISTRY', - GET_REGISTRY_USERS = 'GET_REGISTRY_USERS', - GET_REGISTRY_USER = 'GET_REGISTRY_USER', + GET_REGISTRIES = 'INDEXER_API_GET_REGISTRIES', + GET_REGISTRY = 'INDEXER_API_GET_REGISTRY', + GET_REGISTRY_USERS = 'INDEXER_API_GET_REGISTRY_USERS', + GET_REGISTRY_USER = 'INDEXER_API_GET_REGISTRY_USER', // #endregion // #region METHODOLOGIES - GET_POLICIES = 'GET_POLICIES', - GET_POLICY = 'GET_POLICY', - GET_MODULES = 'GET_MODULES', - GET_MODULE = 'GET_MODULE', - GET_TOOLS = 'GET_TOOLS', - GET_TOOL = 'GET_TOOL', - GET_SCHEMAS = 'GET_SCHEMAS', - GET_SCHEMA = 'GET_SCHEMA', - GET_SCHEMA_TREE = 'GET_SCHEMA_TREE', - GET_TOKENS = 'GET_TOKENS', - GET_TOKEN = 'GET_TOKEN', - GET_ROLES = 'GET_ROLES', - GET_ROLE = 'GET_ROLE', + GET_POLICIES = 'INDEXER_API_GET_POLICIES', + GET_POLICY = 'INDEXER_API_GET_POLICY', + GET_MODULES = 'INDEXER_API_GET_MODULES', + GET_MODULE = 'INDEXER_API_GET_MODULE', + GET_TOOLS = 'INDEXER_API_GET_TOOLS', + GET_TOOL = 'INDEXER_API_GET_TOOL', + GET_SCHEMAS = 'INDEXER_API_GET_SCHEMAS', + GET_SCHEMA = 'INDEXER_API_GET_SCHEMA', + GET_SCHEMA_TREE = 'INDEXER_API_GET_SCHEMA_TREE', + GET_TOKENS = 'INDEXER_API_GET_TOKENS', + GET_TOKEN = 'INDEXER_API_GET_TOKEN', + GET_ROLES = 'INDEXER_API_GET_ROLES', + GET_ROLE = 'INDEXER_API_GET_ROLE', // #endregion // #region DOCUMENTS - GET_VP_DOCUMENTS = 'GET_VP_DOCUMENTS', - GET_VP_DOCUMENT = 'GET_VP_DOCUMENT', - GET_VP_RELATIONSHIPS = 'GET_VP_RELATIONSHIPS', - GET_VP_FILTERS = 'GET_VP_FILTERS', + GET_VP_DOCUMENTS = 'INDEXER_API_GET_VP_DOCUMENTS', + GET_VP_DOCUMENT = 'INDEXER_API_GET_VP_DOCUMENT', + GET_VP_RELATIONSHIPS = 'INDEXER_API_GET_VP_RELATIONSHIPS', + GET_VP_FILTERS = 'INDEXER_API_GET_VP_FILTERS', - GET_VC_DOCUMENTS = 'GET_VC_DOCUMENTS', - GET_VC_DOCUMENT = 'GET_VC_DOCUMENT', - GET_VC_RELATIONSHIPS = 'GET_VC_RELATIONSHIPS', - GET_VC_FILTERS = 'GET_VC_FILTERS', + GET_VC_DOCUMENTS = 'INDEXER_API_GET_VC_DOCUMENTS', + GET_VC_DOCUMENT = 'INDEXER_API_GET_VC_DOCUMENT', + GET_VC_RELATIONSHIPS = 'INDEXER_API_GET_VC_RELATIONSHIPS', + GET_VC_FILTERS = 'INDEXER_API_GET_VC_FILTERS', - GET_DID_DOCUMENTS = 'GET_DID_DOCUMENTS', - GET_DID_DOCUMENT = 'GET_DID_DOCUMENT', - GET_DID_RELATIONSHIPS = 'GET_DID_RELATIONSHIPS', - GET_DID_FILTERS = 'GET_DID_FILTERS', + GET_DID_DOCUMENTS = 'INDEXER_API_GET_DID_DOCUMENTS', + GET_DID_DOCUMENT = 'INDEXER_API_GET_DID_DOCUMENT', + GET_DID_RELATIONSHIPS = 'INDEXER_API_GET_DID_RELATIONSHIPS', + GET_DID_FILTERS = 'INDEXER_API_GET_DID_FILTERS', // #endregion // #region OTHERS - GET_NFTS = 'GET_NFTS', - GET_NFT = 'GET_NFT', - GET_TOPICS = 'GET_TOPICS', - GET_TOPIC = 'GET_TOPIC', - GET_CONTRACTS = 'GET_CONTRACTS', - GET_CONTRACT = 'GET_CONTRACT', + GET_NFTS = 'INDEXER_API_GET_NFTS', + GET_NFT = 'INDEXER_API_GET_NFT', + GET_TOPICS = 'INDEXER_API_GET_TOPICS', + GET_TOPIC = 'INDEXER_API_GET_TOPIC', + GET_CONTRACTS = 'INDEXER_API_GET_CONTRACTS', + GET_CONTRACT = 'INDEXER_API_GET_CONTRACT', // #endregion // #region ANALYTICS - GET_ANALYTICS_SEARCH_POLICY = 'GET_ANALYTICS_SEARCH_POLICY' + GET_ANALYTICS_SEARCH_POLICY = 'INDEXER_API_GET_ANALYTICS_SEARCH_POLICY' // #endregion } diff --git a/indexer-frontend/package.json b/indexer-frontend/package.json index a54e64db4c..f513b73a1a 100644 --- a/indexer-frontend/package.json +++ b/indexer-frontend/package.json @@ -1,7 +1,7 @@ { "author": "Envision Blockchain Solutions ", "name": "indexer-frontend", - "version": "2.26.2", + "version": "2.27.0", "scripts": { "ng": "ng", "start": "ng serve --proxy-config ./proxy.conf.json", diff --git a/indexer-frontend/src/app/app.routes.ts b/indexer-frontend/src/app/app.routes.ts index 0d83f4f244..29cc64b67b 100644 --- a/indexer-frontend/src/app/app.routes.ts +++ b/indexer-frontend/src/app/app.routes.ts @@ -41,6 +41,7 @@ import { TokenDetailsComponent } from '@views/details/token-details/token-detail import { NFTsComponent } from '@views/collections/nfts/nfts.component'; import { NFTDetailsComponent } from '@views/details/nft-details/nft-details.component'; import { DidDocumentDetailsComponent } from '@views/details/did-document-details/did-document-details.component'; +import { ContractDetailsComponent } from '@views/details/contract-details/contract-details.component'; export const routes: Routes = [ // _DEV @@ -85,4 +86,5 @@ export const routes: Routes = [ { path: 'did-documents/:id', component: DidDocumentDetailsComponent }, { path: 'vc-documents/:id', component: VcDocumentDetailsComponent }, { path: 'vp-documents/:id', component: VpDocumentDetailsComponent }, + { path: 'contracts/:id', component: ContractDetailsComponent }, ]; diff --git a/indexer-frontend/src/app/services/entities.service.ts b/indexer-frontend/src/app/services/entities.service.ts index b528d9f5cf..aee1436805 100644 --- a/indexer-frontend/src/app/services/entities.service.ts +++ b/indexer-frontend/src/app/services/entities.service.ts @@ -4,12 +4,39 @@ import { Observable } from 'rxjs'; import { API_BASE_URL } from './api'; import { ApiUtils } from './utils'; import { - IDetailsResults, - IGridFilters, - IGridResults, - IRelationshipsResults, -} from './types'; -import { ISchemaTreeResult } from '@indexer/interfaces'; + Contract, + ContractDetails, + DID, + DIDDetails, + ISchema, + SchemaTree, + Module, + ModuleDetails, + NFT, + NFTDetails, + Page, + PageFilters, + Policy, + PolicyDetails, + Registry, + RegistryDetails, + RegistryUser, + RegistryUserDetails, + Role, + RoleDetails, + SchemaDetails, + Token, + TokenDetails, + Tool, + ToolDetails, + Topic, + TopicDetails, + VC, + VCDetails, + VP, + VPDetails, + Relationships, +} from '@indexer/interfaces'; /** * Services for working from entities. @@ -22,171 +49,216 @@ export class EntitiesService { //#region ACCOUNTS //#region REGISTRIES - public getRegistries(filters: IGridFilters): Observable { + public getRegistries(filters: PageFilters): Observable> { const entity = 'registries'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getRegistry(messageId: string): Observable { + public getRegistry(messageId: string): Observable { const entity = 'registries'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } //#endregion //#region REGISTRY USERS - public getRegistryUsers(filters: IGridFilters): Observable { + public getRegistryUsers( + filters: PageFilters + ): Observable> { const entity = 'registry-users'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getRegistryUser(messageId: string): Observable { + public getRegistryUser(messageId: string): Observable { const entity = 'registry-users'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } //#endregion //#endregion //#region METHODOLOGIES //#region POLICIES - public getPolicies(filters: IGridFilters): Observable { + public getPolicies(filters: PageFilters): Observable> { const entity = 'policies'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getPolicy(messageId: string): Observable { + public getPolicy(messageId: string): Observable { const entity = 'policies'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } //#endregion //#region MODULES - public getModules(filters: IGridFilters): Observable { + public getModules(filters: PageFilters): Observable> { const entity = 'modules'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getModule(messageId: string): Observable { + public getModule(messageId: string): Observable { const entity = 'modules'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } //#endregion //#region TOOLS - public getTools(filters: IGridFilters): Observable { + public getTools(filters: PageFilters): Observable> { const entity = 'tools'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getTool(messageId: string): Observable { + public getTool(messageId: string): Observable { const entity = 'tools'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } //#endregion //#region SCHEMAS - public getSchemas(filters: IGridFilters): Observable { + public getSchemas(filters: PageFilters): Observable> { const entity = 'schemas'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getSchema(messageId: string): Observable { + public getSchema(messageId: string): Observable { const entity = 'schemas'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } - public getSchemaTree(messageId: string): Observable { + public getSchemaTree(messageId: string): Observable { const entity = 'schemas'; - return this.http.get(`${this.url}/${entity}/${messageId}/tree`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}/tree` + ) as any; } //#endregion //#region TOKENS - public getTokens(filters: IGridFilters): Observable { + public getTokens(filters: PageFilters): Observable> { const entity = 'tokens'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getToken(messageId: string): Observable { + public getToken(messageId: string): Observable { const entity = 'tokens'; return this.http.get(`${this.url}/${entity}/${messageId}`) as any; } //#endregion //#region ROLES - public getRoles(filters: IGridFilters): Observable { + public getRoles(filters: PageFilters): Observable> { const entity = 'roles'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getRole(messageId: string): Observable { + public getRole(messageId: string): Observable { const entity = 'roles'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } //#endregion //#endregion //#region DOCUMENTS //#region DIDS - public getDidDocuments(filters: IGridFilters): Observable { + public getDidDocuments(filters: PageFilters): Observable> { const entity = 'did-documents'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getDidDocument(messageId: string): Observable { + public getDidDocument(messageId: string): Observable { const entity = 'did-documents'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } - public getDidRelationships( - messageId: string - ): Observable { + public getDidRelationships(messageId: string): Observable { const entity = 'did-documents'; - return this.http.get( + return this.http.get( `${this.url}/${entity}/${messageId}/relationships` ) as any; } //#endregion //#region VPS - public getVpDocuments(filters: IGridFilters): Observable { + public getVpDocuments(filters: PageFilters): Observable> { const entity = 'vp-documents'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>(`${this.url}/${entity}`, options) as any; } - public getVpDocument(messageId: string): Observable { + public getVpDocument(messageId: string): Observable { const entity = 'vp-documents'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } - public getVpRelationships( - messageId: string - ): Observable { + public getVpRelationships(messageId: string): Observable { const entity = 'vp-documents'; - return this.http.get( + return this.http.get( `${this.url}/${entity}/${messageId}/relationships` ) as any; } //#endregion //#region VCS - public getVcDocuments(filters: IGridFilters): Observable { + public getVcDocuments(filters: PageFilters): Observable> { const entity = 'vc-documents'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>(`${this.url}/${entity}`, options) as any; } - public getVcDocument(messageId: string): Observable { + public getVcDocument(messageId: string): Observable { const entity = 'vc-documents'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } - public getVcRelationships( - messageId: string - ): Observable { + public getVcRelationships(messageId: string): Observable { const entity = 'vc-documents'; - return this.http.get( + return this.http.get( `${this.url}/${entity}/${messageId}/relationships` ) as any; } @@ -195,43 +267,56 @@ export class EntitiesService { //#region OTHERS //#region NFTS - public getNFTs(filters: IGridFilters): Observable { + public getNFTs(filters: PageFilters): Observable> { const entity = 'nfts'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } public getNFT( tokenId: string, serialNubmer: string - ): Observable { + ): Observable { const entity = 'nfts'; - return this.http.get( + return this.http.get( `${this.url}/${entity}/${tokenId}/${serialNubmer}` ) as any; } //#endregion //#region TOPICS - public getTopics(filters: IGridFilters): Observable { + public getTopics(filters: PageFilters): Observable> { const entity = 'topics'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getTopic(topicId: string): Observable { + public getTopic(topicId: string): Observable { const entity = 'topics'; - return this.http.get(`${this.url}/${entity}/${topicId}`) as any; + return this.http.get( + `${this.url}/${entity}/${topicId}` + ) as any; } //#endregion //#region CONTRACTS - public getContracts(filters: IGridFilters): Observable { + public getContracts(filters: PageFilters): Observable> { const entity = 'contracts'; const options = ApiUtils.getOptions(filters); - return this.http.get(`${this.url}/${entity}`, options) as any; + return this.http.get>( + `${this.url}/${entity}`, + options + ) as any; } - public getContract(messageId: string): Observable { + public getContract(messageId: string): Observable { const entity = 'contracts'; - return this.http.get(`${this.url}/${entity}/${messageId}`) as any; + return this.http.get( + `${this.url}/${entity}/${messageId}` + ) as any; } //#endregion //#endregion diff --git a/indexer-frontend/src/app/services/landing.service.ts b/indexer-frontend/src/app/services/landing.service.ts index cc09116549..edb8b51687 100644 --- a/indexer-frontend/src/app/services/landing.service.ts +++ b/indexer-frontend/src/app/services/landing.service.ts @@ -1,20 +1,22 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; import { API_BASE_URL } from './api'; +import { LandingAnalytics, ProjectCoordinates } from '@indexer/interfaces'; +import { Observable } from 'rxjs'; @Injectable() export class LandingService { private readonly url: string = `${API_BASE_URL}/landing`; - constructor(private http: HttpClient) { - } + constructor(private http: HttpClient) {} - public getAnalytics(): Observable { - return this.http.get(`${this.url}/analytics`) as any; + public getAnalytics(): Observable { + return this.http.get(`${this.url}/analytics`); } - public getProjectsCoordinates(): Observable { - return this.http.get(`${this.url}/projects-coordinates`) as any; + public getProjectsCoordinates(): Observable { + return this.http.get( + `${this.url}/projects-coordinates` + ); } } diff --git a/indexer-frontend/src/app/services/search.service.ts b/indexer-frontend/src/app/services/search.service.ts index a5b6c6ac8c..69dc6ef96d 100644 --- a/indexer-frontend/src/app/services/search.service.ts +++ b/indexer-frontend/src/app/services/search.service.ts @@ -3,52 +3,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { API_BASE_URL } from './api'; import { ApiUtils } from './utils'; - -export interface IGridFilters { - pageIndex?: number; - pageSize?: number; - orderDir?: string; - orderField?: string; - keywords?: string; - [field: string]: any; -} - -export interface IGridResults { - items: any[]; - pageIndex: number; - pageSize: number; - total: number; - order: any; -} - -export interface IDetailsResults { - id: string, - uuid?: string; - item?: any, - history?: any[], - row?: any; - activity?: any; - schema?: any; -} - -export interface IRelationshipsResults { - id: string, - item?: any, - target?: any, - relationships?: { - id: string, - uuid: string, - type: string, - topicId: string, - versions: string[], - }[], - links?: { - source: string, - target: string, - type: string - }[] - categories?: any -} +import { Page, SearchItem } from '@indexer/interfaces'; /** * Services for working from search. @@ -57,11 +12,13 @@ export interface IRelationshipsResults { export class SearchService { private readonly url: string = `${API_BASE_URL}/search`; - constructor(private http: HttpClient) { - } + constructor(private http: HttpClient) {} - public search(data: string, pageIndex: number): Observable { + public search( + data: string, + pageIndex: number + ): Observable> { const options = ApiUtils.getOptions({ search: data, pageIndex }); - return this.http.get(this.url, options) as any; + return this.http.get>(this.url, options) as any; } } diff --git a/indexer-frontend/src/app/services/types.ts b/indexer-frontend/src/app/services/types.ts deleted file mode 100644 index 157d8d4e3e..0000000000 --- a/indexer-frontend/src/app/services/types.ts +++ /dev/null @@ -1,42 +0,0 @@ -export interface IGridFilters { - pageIndex?: number; - pageSize?: number; - orderDir?: string; - orderField?: string; - [field: string]: any; -} - -export interface IGridResults { - items: any[]; - pageIndex: number; - pageSize: number; - total: number; - order: any; -} - -export interface IDetailsResults { - id: string; - uuid?: string; - item?: any; - history?: any[]; - row?: any; - [key: string]: any -} - -export interface IRelationshipsResults { - id: string; - item?: any; - target?: any; - relationships?: { - id: string; - uuid: string; - type: string; - topicId: string; - versions: string[]; - }[]; - links?: { - source: string; - target: string; - type: string; - }[]; -} diff --git a/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts b/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts index 9821ca2ff3..4db73fa9c2 100644 --- a/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts +++ b/indexer-frontend/src/app/views/collections/base-grid/base-grid.component.ts @@ -2,11 +2,9 @@ import { Component, ViewChild } from '@angular/core'; import { ActivatedRoute, Params, Router } from '@angular/router'; import { MatSort, Sort } from '@angular/material/sort'; import { PageEvent } from '@angular/material/paginator'; -import { IGridFilters, IGridResults } from '@services/search.service'; -import { Observer, Subscription } from 'rxjs'; +import { Subscription } from 'rxjs'; import { FormControl } from '@angular/forms'; -import { TablePageEvent } from 'primeng/table'; -import { SortEvent } from 'primeng/api'; +import { Page, PageFilters } from '@indexer/interfaces'; export class Filter { public readonly label: string; @@ -177,8 +175,8 @@ export abstract class BaseGridComponent { this.loadData(); } - protected getFilters(): IGridFilters { - const filters: IGridFilters = {}; + protected getFilters(): PageFilters { + const filters: PageFilters = {}; for (const filter of this.filters) { if (filter.value) { filters[filter.field] = filter.value; @@ -197,7 +195,7 @@ export abstract class BaseGridComponent { return filters; } - protected setResult(result?: IGridResults): void { + protected setResult(result?: Page): void { if (result) { this.items = result.items; this.total = result.total; diff --git a/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts b/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts index 146ae94328..3ed585491d 100644 --- a/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts +++ b/indexer-frontend/src/app/views/collections/contracts/contracts.component.ts @@ -59,12 +59,28 @@ export class ContractsComponent extends BaseGridComponent { width: '250px', sort: true, }, + { + type: ColumnType.TEXT, + field: 'topicId', + title: 'grid.topic_id', + width: '150px', + link: { + field: 'topicId', + url: '/topics', + }, + }, { type: ColumnType.TEXT, field: 'options.contractId', title: 'grid.contract_id', width: '250px', }, + { + type: ColumnType.TEXT, + field: 'owner', + title: 'grid.owner', + width: '150px', + }, { type: ColumnType.TEXT, field: 'options.description', @@ -73,7 +89,7 @@ export class ContractsComponent extends BaseGridComponent { }, { type: ColumnType.CHIP, - field: 'contractType', + field: 'options.contractType', title: 'grid.contract_type', width: '150px', }, @@ -95,7 +111,11 @@ export class ContractsComponent extends BaseGridComponent { super(route, router); this.filters.push(new Filter({ type: 'input', - field: 'options.owner', + field: 'topicId', + label: 'grid.topic_id' + }), new Filter({ + type: 'input', + field: 'owner', label: 'grid.owner' })) } diff --git a/indexer-frontend/src/app/views/details/base-details/base-details.component.ts b/indexer-frontend/src/app/views/details/base-details/base-details.component.ts index 13c912959e..db46b62580 100644 --- a/indexer-frontend/src/app/views/details/base-details/base-details.component.ts +++ b/indexer-frontend/src/app/views/details/base-details/base-details.component.ts @@ -1,12 +1,8 @@ import { Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { - IDetailsResults, - IRelationshipsResults, -} from '@services/search.service'; import { Subscription } from 'rxjs'; -import { MatTabChangeEvent } from '@angular/material/tabs'; import { Activity } from '@components/activity/activity.component'; +import { Relationships } from '@indexer/interfaces'; @Component({ selector: 'base-details', @@ -24,7 +20,7 @@ export abstract class BaseDetailsComponent { public last: any = null; public target: any = null; public row: any = null; - public relationships: IRelationshipsResults | null = null; + public relationships: Relationships | null = null; public schema?: any; public tab: string = ''; public tabIndex: number = 0; @@ -179,7 +175,7 @@ export abstract class BaseDetailsComponent { } } - protected setResult(result?: IDetailsResults): void { + protected setResult(result?: any): void { this.uuid = ''; this.history = []; this.first = null; @@ -206,7 +202,7 @@ export abstract class BaseDetailsComponent { this.tabIndex = this.getTabIndex(this.tab); } - protected setRelationships(result: IRelationshipsResults): void { + protected setRelationships(result: Relationships): void { this.relationships = result; } diff --git a/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts b/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts index 9875cce44f..fe4c38bb65 100644 --- a/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts +++ b/indexer-frontend/src/app/views/details/base-details/relationships-chart.config.ts @@ -1,10 +1,10 @@ -import { IRelationshipsResults } from '@services/search.service'; +import { Relationships } from '@indexer/interfaces'; import { EChartsOption } from 'echarts'; export function createChartConfig( data: any[] = [], links: any = [], - categories = [] + categories: any[] = [] ): EChartsOption { return { title: { @@ -103,7 +103,7 @@ export function createChartLink(item: any): any { }; } -export function createChart(result: IRelationshipsResults | null = null) { +export function createChart(result: Relationships | null = null) { if (result && result.relationships && result.links) { const data = []; const relationships = result.relationships.sort((a, b) => { @@ -111,7 +111,7 @@ export function createChart(result: IRelationshipsResults | null = null) { }); const categoriesLength: any = {}; const categoriesIndexes: any = {}; - for (let i = 0; i < result.categories.length; i++) { + for (let i = 0; i < result.categories!.length; i++) { categoriesLength[i] = relationships.filter( (item: any) => item.category === i ).length; diff --git a/indexer-frontend/src/app/views/details/contract-details/contract-details.component.html b/indexer-frontend/src/app/views/details/contract-details/contract-details.component.html new file mode 100644 index 0000000000..39d7af867f --- /dev/null +++ b/indexer-frontend/src/app/views/details/contract-details/contract-details.component.html @@ -0,0 +1,31 @@ +
+
+
+

{{ 'details.contract.header' | transloco }} {{id}}

+
+ @if (loading) { +
+ +
+ } @else { + @if (row) { + + @if (target) { + + + + } + +
+ +
+
+ +
+ } @else { +
{{ 'details.not_found' | transloco }}
+ } + } +
+
diff --git a/indexer-frontend/src/app/views/details/contract-details/contract-details.component.scss b/indexer-frontend/src/app/views/details/contract-details/contract-details.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/indexer-frontend/src/app/views/details/contract-details/contract-details.component.ts b/indexer-frontend/src/app/views/details/contract-details/contract-details.component.ts new file mode 100644 index 0000000000..0dbfa253ca --- /dev/null +++ b/indexer-frontend/src/app/views/details/contract-details/contract-details.component.ts @@ -0,0 +1,121 @@ +import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ActivatedRoute, Router } from '@angular/router'; +import { LoadingComponent } from '@components/loading/loading.component'; +import { MatTabsModule } from '@angular/material/tabs'; +import { NgxEchartsDirective } from 'ngx-echarts'; +import { MatInputModule } from '@angular/material/input'; +import { BaseDetailsComponent } from '../base-details/base-details.component'; +import { TranslocoModule } from '@jsverse/transloco'; +import { EntitiesService } from '@services/entities.service'; +import { TabViewModule } from 'primeng/tabview'; +import { ProgressSpinnerModule } from 'primeng/progressspinner'; +import { ButtonModule } from 'primeng/button'; +import { + OverviewFormComponent, + OverviewFormField, +} from '@components/overview-form/overview-form.component'; +import { ActivityComponent } from '@components/activity/activity.component'; +import { InputTextareaModule } from 'primeng/inputtextarea'; + +@Component({ + selector: 'contract-details', + templateUrl: './contract-details.component.html', + styleUrls: [ + '../base-details/base-details.component.scss', + './contract-details.component.scss', + ], + standalone: true, + imports: [ + CommonModule, + LoadingComponent, + MatTabsModule, + NgxEchartsDirective, + MatInputModule, + TranslocoModule, + TabViewModule, + ProgressSpinnerModule, + ButtonModule, + OverviewFormComponent, + ActivityComponent, + InputTextareaModule, + ], +}) +export class ContractDetailsComponent extends BaseDetailsComponent { + tabs: any[] = ['overview', 'raw']; + overviewFields: OverviewFormField[] = [ + { + label: 'details.contract.overview.contract_id', + path: 'options.contractId', + link: '/topics', + }, + { + label: 'details.contract.overview.topic_id', + path: 'topicId', + link: '/topics', + }, + { + label: 'details.contract.overview.owner_did', + path: 'options.owner', + }, + { + label: 'details.contract.overview.owner', + path: 'owner', + }, + { + label: 'details.contract.overview.type', + path: 'options.contractType', + }, + { + label: 'details.contract.overview.description', + path: 'options.description', + }, + ]; + + constructor( + private entitiesService: EntitiesService, + route: ActivatedRoute, + router: Router + ) { + super(route, router); + } + + protected override loadData(): void { + if (this.id) { + this.loading = true; + this.entitiesService.getContract(this.id).subscribe({ + next: (result) => { + this.setResult(result); + setTimeout(() => { + this.loading = false; + }, 500); + }, + error: ({ message }) => { + this.loading = false; + console.error(message); + }, + }); + } else { + this.setResult(); + } + } + + protected override onNavigate(): void {} + + protected override getTabIndex(name: string): number { + if (this.target) { + const tabIndex = this.tabs.findIndex((item) => item === name); + return tabIndex >= 0 ? tabIndex : 0; + } else { + return 0; + } + } + + protected override getTabName(index: number): string { + if (this.target) { + return this.tabs[index] || 'raw'; + } else { + return 'raw'; + } + } +} diff --git a/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts b/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts index 62afb1d56f..725a1cc22f 100644 --- a/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts +++ b/indexer-frontend/src/app/views/details/registry-details/registry-details.component.ts @@ -202,4 +202,12 @@ export class RegistryDetailsComponent extends BaseDetailsComponent { }, }); } + + public override onOpenContracts(): void { + this.router.navigate(['/contracts'], { + queryParams: { + owner: this.target.owner, + }, + }); + } } diff --git a/indexer-frontend/src/app/views/details/token-details/token-details.component.ts b/indexer-frontend/src/app/views/details/token-details/token-details.component.ts index 82a4aceb98..ef4a8f11d4 100644 --- a/indexer-frontend/src/app/views/details/token-details/token-details.component.ts +++ b/indexer-frontend/src/app/views/details/token-details/token-details.component.ts @@ -90,7 +90,7 @@ export class TokenDetailsComponent extends BaseDetailsComponent { this.entitiesService.getToken(this.id).subscribe({ next: (result) => { this.setResult(result); - if (result.row['type'] === TokenType.NFT) { + if (result.row!['type'] === TokenType.NFT) { this.additionalOveriviewFormFields = [ { label: 'details.token.overview.serial_number', @@ -98,7 +98,7 @@ export class TokenDetailsComponent extends BaseDetailsComponent { link: `/nfts`, direct: true, queryParams: { - tokenId: result.row['tokenId'] + tokenId: result.row!['tokenId'] } } ]; diff --git a/indexer-frontend/src/app/views/search/search.component.ts b/indexer-frontend/src/app/views/search/search.component.ts index 068c14cee4..4990a491e1 100644 --- a/indexer-frontend/src/app/views/search/search.component.ts +++ b/indexer-frontend/src/app/views/search/search.component.ts @@ -17,6 +17,7 @@ import { ColumnType, TableComponent } from '@components/table/table.component'; import { InputTextModule } from 'primeng/inputtext'; import { InputIconModule } from 'primeng/inputicon'; import { IconFieldModule } from 'primeng/iconfield'; +import { SearchItem } from '@indexer/interfaces'; @Component({ selector: 'app-search', @@ -41,7 +42,7 @@ import { IconFieldModule } from 'primeng/iconfield'; export class SearchViewComponent { public loading: boolean = true; public searchControl = new FormControl('', [Validators.required]); - public results: { type: string; id: string }[] = []; + public results: SearchItem[] = []; pageIndex: number = 0; total: number = 0; diff --git a/indexer-frontend/src/assets/i18n/en.json b/indexer-frontend/src/assets/i18n/en.json index 347a03401e..4c5011cfe8 100644 --- a/indexer-frontend/src/assets/i18n/en.json +++ b/indexer-frontend/src/assets/i18n/en.json @@ -292,6 +292,21 @@ "view_serials": "View serials" } }, + "contract": { + "header": "Contract", + "tabs": { + "overview": "Overview", + "raw_data": "Raw data" + }, + "overview": { + "contract_id": "Contract Id", + "topic_id": "Topic Id", + "type": "Type", + "description": "Desription", + "owner": "Owner", + "owner_did": "Owner DID" + } + }, "not_found": "Not found" } } diff --git a/indexer-frontend/yarn.lock b/indexer-frontend/yarn.lock new file mode 100644 index 0000000000..83c347d832 --- /dev/null +++ b/indexer-frontend/yarn.lock @@ -0,0 +1,7544 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@2.3.0", "@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@angular-devkit/architect@0.1703.8": + version "0.1703.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1703.8.tgz#2b4f26d9e32ac013931631876b4a7a6926657ad3" + integrity sha512-lKxwG4/QABXZvJpqeSIn/kAwnY6MM9HdHZUV+o5o3UiTi+vO8rZApG4CCaITH3Bxebm7Nam7Xbk8RuukC5rq6g== + dependencies: + "@angular-devkit/core" "17.3.8" + rxjs "7.8.1" + +"@angular-devkit/build-angular@^17.3.2": + version "17.3.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-17.3.8.tgz#a19f05909551f79b95711235b1141f83f96fd558" + integrity sha512-ixsdXggWaFRP7Jvxd0AMukImnePuGflT9Yy7NJ9/y0cL/k//S/3RnkQv5i411KzN+7D4RIbNkRGGTYeqH24zlg== + dependencies: + "@ampproject/remapping" "2.3.0" + "@angular-devkit/architect" "0.1703.8" + "@angular-devkit/build-webpack" "0.1703.8" + "@angular-devkit/core" "17.3.8" + "@babel/core" "7.24.0" + "@babel/generator" "7.23.6" + "@babel/helper-annotate-as-pure" "7.22.5" + "@babel/helper-split-export-declaration" "7.22.6" + "@babel/plugin-transform-async-generator-functions" "7.23.9" + "@babel/plugin-transform-async-to-generator" "7.23.3" + "@babel/plugin-transform-runtime" "7.24.0" + "@babel/preset-env" "7.24.0" + "@babel/runtime" "7.24.0" + "@discoveryjs/json-ext" "0.5.7" + "@ngtools/webpack" "17.3.8" + "@vitejs/plugin-basic-ssl" "1.1.0" + ansi-colors "4.1.3" + autoprefixer "10.4.18" + babel-loader "9.1.3" + babel-plugin-istanbul "6.1.1" + browserslist "^4.21.5" + copy-webpack-plugin "11.0.0" + critters "0.0.22" + css-loader "6.10.0" + esbuild-wasm "0.20.1" + fast-glob "3.3.2" + http-proxy-middleware "2.0.6" + https-proxy-agent "7.0.4" + inquirer "9.2.15" + jsonc-parser "3.2.1" + karma-source-map-support "1.4.0" + less "4.2.0" + less-loader "11.1.0" + license-webpack-plugin "4.0.2" + loader-utils "3.2.1" + magic-string "0.30.8" + mini-css-extract-plugin "2.8.1" + mrmime "2.0.0" + open "8.4.2" + ora "5.4.1" + parse5-html-rewriting-stream "7.0.0" + picomatch "4.0.1" + piscina "4.4.0" + postcss "8.4.35" + postcss-loader "8.1.1" + resolve-url-loader "5.0.0" + rxjs "7.8.1" + sass "1.71.1" + sass-loader "14.1.1" + semver "7.6.0" + source-map-loader "5.0.0" + source-map-support "0.5.21" + terser "5.29.1" + tree-kill "1.2.2" + tslib "2.6.2" + undici "6.11.1" + vite "5.1.7" + watchpack "2.4.0" + webpack "5.90.3" + webpack-dev-middleware "6.1.2" + webpack-dev-server "4.15.1" + webpack-merge "5.10.0" + webpack-subresource-integrity "5.1.0" + optionalDependencies: + esbuild "0.20.1" + +"@angular-devkit/build-webpack@0.1703.8": + version "0.1703.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1703.8.tgz#d157a5790d5045dd9c312936c3907bd3a184bbfc" + integrity sha512-9u6fl8VVOxcLOEMzrUeaybSvi9hSLSRucHnybneYrabsgreDo32tuy/4G8p6YAHQjpWEj9jvF9Um13ertdni5Q== + dependencies: + "@angular-devkit/architect" "0.1703.8" + rxjs "7.8.1" + +"@angular-devkit/core@17.3.8": + version "17.3.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-17.3.8.tgz#8679cacf84cf79764f027811020e235ab32016d2" + integrity sha512-Q8q0voCGudbdCgJ7lXdnyaxKHbNQBARH68zPQV72WT8NWy+Gw/tys870i6L58NWbBaCJEUcIj/kb6KoakSRu+Q== + dependencies: + ajv "8.12.0" + ajv-formats "2.1.1" + jsonc-parser "3.2.1" + picomatch "4.0.1" + rxjs "7.8.1" + source-map "0.7.4" + +"@angular-devkit/schematics@17.3.8": + version "17.3.8" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-17.3.8.tgz#f853eb21682aadfb6667e090b5b509fc95ce8442" + integrity sha512-QRVEYpIfgkprNHc916JlPuNbLzOgrm9DZalHasnLUz4P6g7pR21olb8YCyM2OTJjombNhya9ZpckcADU5Qyvlg== + dependencies: + "@angular-devkit/core" "17.3.8" + jsonc-parser "3.2.1" + magic-string "0.30.8" + ora "5.4.1" + rxjs "7.8.1" + +"@angular/animations@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-17.3.10.tgz#f62a728f078a586da27a36c931abb59fc7beb14e" + integrity sha512-9fR5snTuG4aM2K54TG/6DXcKXMDKZMovZhjQOxO8l68/oqn6fKrHs8DLzckFs0XGRZ+2OyURH8WggFm1Z828rA== + dependencies: + tslib "^2.3.0" + +"@angular/cdk@^17.3.2": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-17.3.10.tgz#4a3bab529cd65bb19cb89c89b3548dcc534d1a44" + integrity sha512-b1qktT2c1TTTe5nTji/kFAVW92fULK0YhYAvJ+BjZTPKu2FniZNe8o4qqQ0pUuvtMu+ZQxp/QqFYoidIVCjScg== + dependencies: + tslib "^2.3.0" + optionalDependencies: + parse5 "^7.1.2" + +"@angular/cli@^17.3.2": + version "17.3.8" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-17.3.8.tgz#3673fd5dd4fbc96a6ed57c4e871ac5a92d5702c7" + integrity sha512-X5ZOQ6ZTKVHjhIsfl32ZRqbs+FUoeHLbT7x4fh2Os/8ObDDwrUcCJPqxe2b2RB5E2d0vepYigknHeLE7gwzlNQ== + dependencies: + "@angular-devkit/architect" "0.1703.8" + "@angular-devkit/core" "17.3.8" + "@angular-devkit/schematics" "17.3.8" + "@schematics/angular" "17.3.8" + "@yarnpkg/lockfile" "1.1.0" + ansi-colors "4.1.3" + ini "4.1.2" + inquirer "9.2.15" + jsonc-parser "3.2.1" + npm-package-arg "11.0.1" + npm-pick-manifest "9.0.0" + open "8.4.2" + ora "5.4.1" + pacote "17.0.6" + resolve "1.22.8" + semver "7.6.0" + symbol-observable "4.0.0" + yargs "17.7.2" + +"@angular/common@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-17.3.10.tgz#bd395d94678eba5c4ea42c6bafd8f3151c8c5dc7" + integrity sha512-6SfD21M3LujymmZsZQIxAsV8Bj5u6He6ImZ+p2rr7FAhFxpVJyKldK8LCmJcFsBD4srpQcxEZ0iDxXvg+0ihAw== + dependencies: + tslib "^2.3.0" + +"@angular/compiler-cli@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-17.3.10.tgz#84a7ee6ac0ab9e924132589a788abfd656f671a6" + integrity sha512-85SBphqRj3szac3FbeYgEZ+I6WaAlo5h7JX06BdjOLLiaoIwlFhLeAuG+jVekseV+95grFUxIsCMphWHi2e6hQ== + dependencies: + "@babel/core" "7.23.9" + "@jridgewell/sourcemap-codec" "^1.4.14" + chokidar "^3.0.0" + convert-source-map "^1.5.1" + reflect-metadata "^0.2.0" + semver "^7.0.0" + tslib "^2.3.0" + yargs "^17.2.1" + +"@angular/compiler@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-17.3.10.tgz#345bcdc4db45893fd0eca900181230c67499bd1d" + integrity sha512-6Ce4siHyF0fCZBDm/cz+blJByGDu1/hbPkQVGmk5HGZTmCUeKkgyjoM6bZr7ssAsyGDRwxBh2SGHO4Ce31vuPA== + dependencies: + tslib "^2.3.0" + +"@angular/core@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-17.3.10.tgz#129cd916e718c668b84db1cd25d227fa1cf2645a" + integrity sha512-ocEKu7X0yFCOvgJn1uZy76qjhsjKvULrO1k/BuIX0nwhp61DTGYTvCqKmwCBLM8/gvcKYH5vMKMHoQKtiSGE0A== + dependencies: + tslib "^2.3.0" + +"@angular/forms@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-17.3.10.tgz#9559ac2eb9411236375b7517c7ef9d3251c8e3c3" + integrity sha512-0VZWSXDi2M3DAGJlpdV3lo73Yo/73GPRqmfTOrvIoUIenFg5Dz6oNGzvt/1aRkRn6HKccjix6iMpH91EN65pWA== + dependencies: + tslib "^2.3.0" + +"@angular/material@^17.3.2": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-17.3.10.tgz#db4c41bcc4ba6a6328be3d89dc95947a48555b54" + integrity sha512-hHMQES0tQPH5JW33W+mpBPuM8ybsloDTqFPuRV8cboDjosAWfJhzAKF3ozICpNlUrs62La/2Wu/756GcQrxebg== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/auto-init" "15.0.0-canary.7f224ddd4.0" + "@material/banner" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/button" "15.0.0-canary.7f224ddd4.0" + "@material/card" "15.0.0-canary.7f224ddd4.0" + "@material/checkbox" "15.0.0-canary.7f224ddd4.0" + "@material/chips" "15.0.0-canary.7f224ddd4.0" + "@material/circular-progress" "15.0.0-canary.7f224ddd4.0" + "@material/data-table" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dialog" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/drawer" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/fab" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/floating-label" "15.0.0-canary.7f224ddd4.0" + "@material/form-field" "15.0.0-canary.7f224ddd4.0" + "@material/icon-button" "15.0.0-canary.7f224ddd4.0" + "@material/image-list" "15.0.0-canary.7f224ddd4.0" + "@material/layout-grid" "15.0.0-canary.7f224ddd4.0" + "@material/line-ripple" "15.0.0-canary.7f224ddd4.0" + "@material/linear-progress" "15.0.0-canary.7f224ddd4.0" + "@material/list" "15.0.0-canary.7f224ddd4.0" + "@material/menu" "15.0.0-canary.7f224ddd4.0" + "@material/menu-surface" "15.0.0-canary.7f224ddd4.0" + "@material/notched-outline" "15.0.0-canary.7f224ddd4.0" + "@material/radio" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/segmented-button" "15.0.0-canary.7f224ddd4.0" + "@material/select" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/slider" "15.0.0-canary.7f224ddd4.0" + "@material/snackbar" "15.0.0-canary.7f224ddd4.0" + "@material/switch" "15.0.0-canary.7f224ddd4.0" + "@material/tab" "15.0.0-canary.7f224ddd4.0" + "@material/tab-bar" "15.0.0-canary.7f224ddd4.0" + "@material/tab-indicator" "15.0.0-canary.7f224ddd4.0" + "@material/tab-scroller" "15.0.0-canary.7f224ddd4.0" + "@material/textfield" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tooltip" "15.0.0-canary.7f224ddd4.0" + "@material/top-app-bar" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.3.0" + +"@angular/platform-browser-dynamic@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.3.10.tgz#00fa7a90919f63e314ad1d687645e5a148084698" + integrity sha512-TW6G4+isdHM2ssQTRTobeAKtR2516pJ25BSwRb+9+Jw/ZAEYOOi+KQyofIFYQccaUjb3+LpjRcaZbtZ9m/Ispg== + dependencies: + tslib "^2.3.0" + +"@angular/platform-browser@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-17.3.10.tgz#7c513920fa8dbf52d0f70920101aad6ec71019d4" + integrity sha512-LEhBDOKm2A7nRmZqsafVp6OinRDG1OYZBSqjnT1jZ+f0CRRFIXz6aJ0TMPoU6vq9SLRJ7vrGD9P/eBf2hW00NQ== + dependencies: + tslib "^2.3.0" + +"@angular/router@^17.3.0": + version "17.3.10" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-17.3.10.tgz#4cbea96eb5a11ef011a4e4e31cecb7c3c72d8fce" + integrity sha512-HlZlR9BOLoEKGOSMjmL5EfYL7F7PeDifbFi0dYWNcrG8zFrVKFklB1cuBdJhfPZgYhDEoGms/EToD71tg5wliA== + dependencies: + tslib "^2.3.0" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.6.tgz#ab88da19344445c3d8889af2216606d3329f3ef2" + integrity sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA== + dependencies: + "@babel/highlight" "^7.24.6" + picocolors "^1.0.0" + +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.5", "@babel/compat-data@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.6.tgz#b3600217688cabb26e25f8e467019e66d71b7ae2" + integrity sha512-aC2DGhBq5eEdyXWqrDInSqQjO0k8xtPRf5YylULqx8MCd6jBtzqfta/3ETMRpuKIc5hyswfO80ObyA1MvkCcUQ== + +"@babel/core@7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.9.tgz#b028820718000f267870822fec434820e9b1e4d1" + integrity sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.9" + "@babel/parser" "^7.23.9" + "@babel/template" "^7.23.9" + "@babel/traverse" "^7.23.9" + "@babel/types" "^7.23.9" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/core@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.0.tgz#56cbda6b185ae9d9bed369816a8f4423c5f2ff1b" + integrity sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.24.0" + "@babel/parser" "^7.24.0" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.0" + "@babel/types" "^7.24.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/core@^7.12.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.6.tgz#8650e0e4b03589ebe886c4e4a60398db0a7ec787" + integrity sha512-qAHSfAdVyFmIvl0VHELib8xar7ONuSHrE2hLnsaWkYNTI68dmi1x8GYDhJjMI/e7XWal9QBlZkwbOnkcw7Z8gQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.6" + "@babel/generator" "^7.24.6" + "@babel/helper-compilation-targets" "^7.24.6" + "@babel/helper-module-transforms" "^7.24.6" + "@babel/helpers" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/template" "^7.24.6" + "@babel/traverse" "^7.24.6" + "@babel/types" "^7.24.6" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" + integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== + dependencies: + "@babel/types" "^7.23.6" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + +"@babel/generator@^7.23.6", "@babel/generator@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.6.tgz#dfac82a228582a9d30c959fe50ad28951d4737a7" + integrity sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg== + dependencies: + "@babel/types" "^7.24.6" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + +"@babel/helper-annotate-as-pure@7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" + integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-annotate-as-pure@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.6.tgz#517af93abc77924f9b2514c407bbef527fb8938d" + integrity sha512-DitEzDfOMnd13kZnDqns1ccmftwJTS9DMkyn9pYTxulS7bZxUxpMly3Nf23QQ6NwA4UB8lAqjbqWtyvElEMAkg== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.6.tgz#19e9089ee87b0d0928012c83961a8deef4b0223f" + integrity sha512-+wnfqc5uHiMYtvRX7qu80Toef8BXeh4HHR1SPeonGb1SKPniNEd4a/nlaJJMv/OIEYvIVavvo0yR7u10Gqz0Iw== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.23.6", "@babel/helper-compilation-targets@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.6.tgz#4a51d681f7680043d38e212715e2a7b1ad29cb51" + integrity sha512-VZQ57UsDGlX/5fFA7GkVPplZhHsVc+vuErWgdOiysI9Ksnw0Pbbd6pnPiR/mmJyKHgyIW0c7KT32gmhiF+cirg== + dependencies: + "@babel/compat-data" "^7.24.6" + "@babel/helper-validator-option" "^7.24.6" + browserslist "^4.22.2" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.6.tgz#c50b86fa1c4ca9b7a890dc21884f097b6c4b5286" + integrity sha512-djsosdPJVZE6Vsw3kk7IPRWethP94WHGOhQTc67SNXE0ZzMhHgALw8iGmYS0TD1bbMM0VDROy43od7/hN6WYcA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.6" + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-function-name" "^7.24.6" + "@babel/helper-member-expression-to-functions" "^7.24.6" + "@babel/helper-optimise-call-expression" "^7.24.6" + "@babel/helper-replace-supers" "^7.24.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + semver "^6.3.1" + +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.6.tgz#47d382dec0d49e74ca1b6f7f3b81f5968022a3c8" + integrity sha512-C875lFBIWWwyv6MHZUG9HmRrlTDgOsLWZfYR0nW69gaKJNe0/Mpxx5r0EID2ZdHQkdUmQo2t0uNckTL08/1BgA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.6" + regexpu-core "^5.3.1" + semver "^6.3.1" + +"@babel/helper-define-polyfill-provider@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz#465805b7361f461e86c680f1de21eaf88c25901b" + integrity sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + +"@babel/helper-define-polyfill-provider@^0.6.2": + version "0.6.2" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz#18594f789c3594acb24cfdb4a7f7b7d2e8bd912d" + integrity sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + +"@babel/helper-environment-visitor@^7.22.20", "@babel/helper-environment-visitor@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz#ac7ad5517821641550f6698dd5468f8cef78620d" + integrity sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g== + +"@babel/helper-function-name@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.6.tgz#cebdd063386fdb95d511d84b117e51fc68fec0c8" + integrity sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w== + dependencies: + "@babel/template" "^7.24.6" + "@babel/types" "^7.24.6" + +"@babel/helper-hoist-variables@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.6.tgz#8a7ece8c26756826b6ffcdd0e3cf65de275af7f9" + integrity sha512-SF/EMrC3OD7dSta1bLJIlrsVxwtd0UpjRJqLno6125epQMJ/kyFmpTT4pbvPbdQHzCHg+biQ7Syo8lnDtbR+uA== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-member-expression-to-functions@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.6.tgz#86084f3e0e4e2169a134754df3870bc7784db71e" + integrity sha512-OTsCufZTxDUsv2/eDXanw/mUZHWOxSbEmC3pP8cgjcy5rgeVPWWMStnv274DV60JtHxTk0adT0QrCzC4M9NWGg== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-module-imports@^7.22.15", "@babel/helper-module-imports@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz#65e54ffceed6a268dc4ce11f0433b82cfff57852" + integrity sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-module-transforms@^7.23.3", "@babel/helper-module-transforms@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.6.tgz#22346ed9df44ce84dee850d7433c5b73fab1fe4e" + integrity sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA== + dependencies: + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-module-imports" "^7.24.6" + "@babel/helper-simple-access" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" + +"@babel/helper-optimise-call-expression@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.6.tgz#f7836e3ccca3dfa02f15d2bc8b794efe75a5256e" + integrity sha512-3SFDJRbx7KuPRl8XDUr8O7GAEB8iGyWPjLKJh/ywP/Iy9WOmEfMrsWbaZpvBu2HSYn4KQygIsz0O7m8y10ncMA== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.24.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.6.tgz#fa02a32410a15a6e8f8185bcbf608f10528d2a24" + integrity sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg== + +"@babel/helper-remap-async-to-generator@^7.22.20", "@babel/helper-remap-async-to-generator@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.6.tgz#c96ceb9846e877d806ce82a1521230ea7e0fc354" + integrity sha512-1Qursq9ArRZPAMOZf/nuzVW8HgJLkTB9y9LfP4lW2MVp4e9WkLJDovfKBxoDcCk6VuzIxyqWHyBoaCtSRP10yg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.6" + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-wrap-function" "^7.24.6" + +"@babel/helper-replace-supers@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.6.tgz#3ea87405a2986a49ab052d10e540fe036d747c71" + integrity sha512-mRhfPwDqDpba8o1F8ESxsEkJMQkUF8ZIWrAc0FtWhxnjfextxMWxr22RtFizxxSYLjVHDeMgVsRq8BBZR2ikJQ== + dependencies: + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-member-expression-to-functions" "^7.24.6" + "@babel/helper-optimise-call-expression" "^7.24.6" + +"@babel/helper-simple-access@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.6.tgz#1d6e04d468bba4fc963b4906f6dac6286cfedff1" + integrity sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-skip-transparent-expression-wrappers@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.6.tgz#c47e9b33b7ea50d1073e125ebc26661717cb7040" + integrity sha512-jhbbkK3IUKc4T43WadP96a27oYti9gEf1LdyGSP2rHGH77kwLwfhO7TgwnWvxxQVmke0ImmCSS47vcuxEMGD3Q== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-split-export-declaration@7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz#e830068f7ba8861c53b7421c284da30ae656d7a3" + integrity sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw== + dependencies: + "@babel/types" "^7.24.6" + +"@babel/helper-string-parser@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz#28583c28b15f2a3339cfafafeaad42f9a0e828df" + integrity sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q== + +"@babel/helper-validator-identifier@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz#08bb6612b11bdec78f3feed3db196da682454a5e" + integrity sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw== + +"@babel/helper-validator-option@^7.23.5", "@babel/helper-validator-option@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.6.tgz#59d8e81c40b7d9109ab7e74457393442177f460a" + integrity sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ== + +"@babel/helper-wrap-function@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.24.6.tgz#c27af1006e310683fdc76b668a0a1f6003e36217" + integrity sha512-f1JLrlw/jbiNfxvdrfBgio/gRBk3yTAEJWirpAkiJG2Hb22E7cEYKHWo0dFPTv/niPovzIdPdEDetrv6tC6gPQ== + dependencies: + "@babel/helper-function-name" "^7.24.6" + "@babel/template" "^7.24.6" + "@babel/types" "^7.24.6" + +"@babel/helpers@^7.23.9", "@babel/helpers@^7.24.0", "@babel/helpers@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.6.tgz#cd124245299e494bd4e00edda0e4ea3545c2c176" + integrity sha512-V2PI+NqnyFu1i0GyTd/O/cTpxzQCYioSkUIRmgo7gFEHKKCg5w46+r/A6WeUR1+P3TeQ49dspGPNd/E3n9AnnA== + dependencies: + "@babel/template" "^7.24.6" + "@babel/types" "^7.24.6" + +"@babel/highlight@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.6.tgz#6d610c1ebd2c6e061cade0153bf69b0590b7b3df" + integrity sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ== + dependencies: + "@babel/helper-validator-identifier" "^7.24.6" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/parser@^7.14.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.0", "@babel/parser@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.6.tgz#5e030f440c3c6c78d195528c3b688b101a365328" + integrity sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q== + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.6.tgz#f9f5ae4d6fb72f5950262cb6f0b2482c3bc684ef" + integrity sha512-iVuhb6poq5ikqRq2XWU6OQ+R5o9wF+r/or9CeUyovgptz0UlnK4/seOQ1Istu/XybYjAhQv1FRSSfHHufIku5Q== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.6.tgz#ab9be6edfffa127bd5ec4317c76c5af0f8fc7e6c" + integrity sha512-c8TER5xMDYzzFcGqOEp9l4hvB7dcbhcGjcLVwxWfe4P5DOafdwjsBJZKsmv+o3aXh7NhopvayQIovHrh2zSRUQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.6" + "@babel/plugin-transform-optional-chaining" "^7.24.6" + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.7": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.6.tgz#0faf879249ec622d7f1c42eaebf7d11197401b2c" + integrity sha512-z8zEjYmwBUHN/pCF3NuWBhHQjJCrd33qAi8MgANfMrAvn72k2cImT8VjK9LJFu4ysOLJqhfkYYb3MvwANRUNZQ== + dependencies: + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": + version "7.21.0-placeholder-for-preset-env.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" + integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-import-assertions@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.6.tgz#52521c1c1698fc2dd9cf88f7a4dd86d4d041b9e1" + integrity sha512-BE6o2BogJKJImTmGpkmOic4V0hlRRxVtzqxiSPa8TIFxyhi4EFjHm08nq1M4STK4RytuLMgnSz0/wfflvGFNOg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-syntax-import-attributes@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.6.tgz#12aba325534129584672920274fefa4dc2d5f68e" + integrity sha512-D+CfsVZousPXIdudSII7RGy52+dYRtbyKAZcvtQKq/NpsivyMVduepzcLqG5pMBugtMdedxdC8Ramdpcne9ZWQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-syntax-import-meta@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" + integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-arrow-functions@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.6.tgz#93607d1ef5b81c70af174aff3532d57216367492" + integrity sha512-jSSSDt4ZidNMggcLx8SaKsbGNEfIl0PHx/4mFEulorE7bpYLbN0d3pDW3eJ7Y5Z3yPhy3L3NaPCYyTUY7TuugQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-async-generator-functions@7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz#9adaeb66fc9634a586c5df139c6240d41ed801ce" + integrity sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-transform-async-generator-functions@^7.23.9": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.6.tgz#fa4a9e5c3a7f60f697ba36587b6c41b04f507d84" + integrity sha512-VEP2o4iR2DqQU6KPgizTW2mnMx6BG5b5O9iQdrW9HesLkv8GIA8x2daXBQxw1MrsIkFQGA/iJ204CKoQ8UcnAA== + dependencies: + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-remap-async-to-generator" "^7.24.6" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-transform-async-to-generator@7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz#d1f513c7a8a506d43f47df2bf25f9254b0b051fa" + integrity sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw== + dependencies: + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" + +"@babel/plugin-transform-async-to-generator@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.6.tgz#eb11434b11d73d8c0cf9f71a6f4f1e6ba441df35" + integrity sha512-NTBA2SioI3OsHeIn6sQmhvXleSl9T70YY/hostQLveWs0ic+qvbA3fa0kwAwQ0OA/XGaAerNZRQGJyRfhbJK4g== + dependencies: + "@babel/helper-module-imports" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-remap-async-to-generator" "^7.24.6" + +"@babel/plugin-transform-block-scoped-functions@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.6.tgz#975555b5bfa9870b1218da536d1528735f1f8c56" + integrity sha512-XNW7jolYHW9CwORrZgA/97tL/k05qe/HL0z/qqJq1mdWhwwCM6D4BJBV7wAz9HgFziN5dTOG31znkVIzwxv+vw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-block-scoping@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.6.tgz#a03ec8a4591c2b43cf7798bc633e698293fda179" + integrity sha512-S/t1Xh4ehW7sGA7c1j/hiOBLnEYCp/c2sEG4ZkL8kI1xX9tW2pqJTCHKtdhe/jHKt8nG0pFCrDHUXd4DvjHS9w== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-class-properties@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.6.tgz#d9f394e97e88ef905d5a1e5e7a16238621b7982e" + integrity sha512-j6dZ0Z2Z2slWLR3kt9aOmSIrBvnntWjMDN/TVcMPxhXMLmJVqX605CBRlcGI4b32GMbfifTEsdEjGjiE+j/c3A== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-class-static-block@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.6.tgz#f43f29286f6f0dca33d18fd5033b817d6c3fa816" + integrity sha512-1QSRfoPI9RoLRa8Mnakc6v3e0gJxiZQTYrMfLn+mD0sz5+ndSzwymp2hDcYJTyT0MOn0yuWzj8phlIvO72gTHA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + +"@babel/plugin-transform-classes@^7.23.8": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.6.tgz#0cc198c02720d4eeb091004843477659c6b37977" + integrity sha512-+fN+NO2gh8JtRmDSOB6gaCVo36ha8kfCW1nMq2Gc0DABln0VcHN4PrALDvF5/diLzIRKptC7z/d7Lp64zk92Fg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.6" + "@babel/helper-compilation-targets" "^7.24.6" + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-function-name" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-replace-supers" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.6.tgz#7a1765c01cdfe59c320d2d0f37a4dc4aecd14df1" + integrity sha512-cRzPobcfRP0ZtuIEkA8QzghoUpSB3X3qSH5W2+FzG+VjWbJXExtx0nbRqwumdBN1x/ot2SlTNQLfBCnPdzp6kg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/template" "^7.24.6" + +"@babel/plugin-transform-destructuring@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.6.tgz#bdd1a6c90ffb2bfd13b6007b13316eeafc97cb53" + integrity sha512-YLW6AE5LQpk5npNXL7i/O+U9CE4XsBCuRPgyjl1EICZYKmcitV+ayuuUGMJm2lC1WWjXYszeTnIxF/dq/GhIZQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-dotall-regex@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.6.tgz#5a6b3148ec5f4f274ff48cebea90565087cad126" + integrity sha512-rCXPnSEKvkm/EjzOtLoGvKseK+dS4kZwx1HexO3BtRtgL0fQ34awHn34aeSHuXtZY2F8a1X8xqBBPRtOxDVmcA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-duplicate-keys@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.6.tgz#2716301227cf7cd4fdadcbe4353ce191f8b3dc8a" + integrity sha512-/8Odwp/aVkZwPFJMllSbawhDAO3UJi65foB00HYnK/uXvvCPm0TAXSByjz1mpRmp0q6oX2SIxpkUOpPFHk7FLA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-dynamic-import@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.6.tgz#b477177761d56b15a4ba42a83be31cf72d757acf" + integrity sha512-vpq8SSLRTBLOHUZHSnBqVo0AKX3PBaoPs2vVzYVWslXDTDIpwAcCDtfhUcHSQQoYoUvcFPTdC8TZYXu9ZnLT/w== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + +"@babel/plugin-transform-exponentiation-operator@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.6.tgz#011e9e1a429f91b024af572530873ca571f9ef06" + integrity sha512-EemYpHtmz0lHE7hxxxYEuTYOOBZ43WkDgZ4arQ4r+VX9QHuNZC+WH3wUWmRNvR8ECpTRne29aZV6XO22qpOtdA== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-export-namespace-from@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.6.tgz#b64ded74d9afb3db5d47d93996c4df69f15ac97c" + integrity sha512-inXaTM1SVrIxCkIJ5gqWiozHfFMStuGbGJAxZFBoHcRRdDP0ySLb3jH6JOwmfiinPwyMZqMBX+7NBDCO4z0NSA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + +"@babel/plugin-transform-for-of@^7.23.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.6.tgz#7f31780bd0c582b546372c0c0da9d9d56731e0a2" + integrity sha512-n3Sf72TnqK4nw/jziSqEl1qaWPbCRw2CziHH+jdRYvw4J6yeCzsj4jdw8hIntOEeDGTmHVe2w4MVL44PN0GMzg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.6" + +"@babel/plugin-transform-function-name@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.6.tgz#60d1de3f6fd816a3e3bf9538578a64527e1b9c97" + integrity sha512-sOajCu6V0P1KPljWHKiDq6ymgqB+vfo3isUS4McqW1DZtvSVU2v/wuMhmRmkg3sFoq6GMaUUf8W4WtoSLkOV/Q== + dependencies: + "@babel/helper-compilation-targets" "^7.24.6" + "@babel/helper-function-name" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-json-strings@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.6.tgz#a84639180ea1f9001bb5e6dc01921235ab05ad8b" + integrity sha512-Uvgd9p2gUnzYJxVdBLcU0KurF8aVhkmVyMKW4MIY1/BByvs3EBpv45q01o7pRTVmTvtQq5zDlytP3dcUgm7v9w== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-json-strings" "^7.8.3" + +"@babel/plugin-transform-literals@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.6.tgz#7f44f2871d7a4456030b0540858046f0b7bc6b18" + integrity sha512-f2wHfR2HF6yMj+y+/y07+SLqnOSwRp8KYLpQKOzS58XLVlULhXbiYcygfXQxJlMbhII9+yXDwOUFLf60/TL5tw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-logical-assignment-operators@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.6.tgz#9cc7baa5629866566562c159dc1eae7569810f33" + integrity sha512-EKaWvnezBCMkRIHxMJSIIylzhqK09YpiJtDbr2wsXTwnO0TxyjMUkaw4RlFIZMIS0iDj0KyIg7H7XCguHu/YDA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + +"@babel/plugin-transform-member-expression-literals@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.6.tgz#5d3681ca201ac6909419cc51ac082a6ba4c5c756" + integrity sha512-9g8iV146szUo5GWgXpRbq/GALTnY+WnNuRTuRHWWFfWGbP9ukRL0aO/jpu9dmOPikclkxnNsjY8/gsWl6bmZJQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-modules-amd@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.6.tgz#09aeac7acb7913496aaaafdc64f40683e0db7e41" + integrity sha512-eAGogjZgcwqAxhyFgqghvoHRr+EYRQPFjUXrTYKBRb5qPnAVxOOglaxc4/byHqjvq/bqO2F3/CGwTHsgKJYHhQ== + dependencies: + "@babel/helper-module-transforms" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-modules-commonjs@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.6.tgz#1b8269902f25bd91ca6427230d4735ddd1e1283e" + integrity sha512-JEV8l3MHdmmdb7S7Cmx6rbNEjRCgTQMZxllveHO0mx6uiclB0NflCawlQQ6+o5ZrwjUBYPzHm2XoK4wqGVUFuw== + dependencies: + "@babel/helper-module-transforms" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-simple-access" "^7.24.6" + +"@babel/plugin-transform-modules-systemjs@^7.23.9": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.6.tgz#c54eb53fe16f9b82d320abd76762d0320e3f9393" + integrity sha512-xg1Z0J5JVYxtpX954XqaaAT6NpAY6LtZXvYFCJmGFJWwtlz2EmJoR8LycFRGNE8dBKizGWkGQZGegtkV8y8s+w== + dependencies: + "@babel/helper-hoist-variables" "^7.24.6" + "@babel/helper-module-transforms" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" + +"@babel/plugin-transform-modules-umd@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.6.tgz#c4ef8b6d4da230b8dc87e81cd66986728952f89b" + integrity sha512-esRCC/KsSEUvrSjv5rFYnjZI6qv4R1e/iHQrqwbZIoRJqk7xCvEUiN7L1XrmW5QSmQe3n1XD88wbgDTWLbVSyg== + dependencies: + "@babel/helper-module-transforms" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.22.5": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.6.tgz#352ee2861ab8705320029f80238cf26a92ba65d5" + integrity sha512-6DneiCiu91wm3YiNIGDWZsl6GfTTbspuj/toTEqLh9d4cx50UIzSdg+T96p8DuT7aJOBRhFyaE9ZvTHkXrXr6Q== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-new-target@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.6.tgz#fc024294714705113720d5e3dc0f9ad7abdbc289" + integrity sha512-f8liz9JG2Va8A4J5ZBuaSdwfPqN6axfWRK+y66fjKYbwf9VBLuq4WxtinhJhvp1w6lamKUwLG0slK2RxqFgvHA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-nullish-coalescing-operator@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.6.tgz#12b83b3cdfd1cd2066350e36e4fb912ab194545e" + integrity sha512-+QlAiZBMsBK5NqrBWFXCYeXyiU1y7BQ/OYaiPAcQJMomn5Tyg+r5WuVtyEuvTbpV7L25ZSLfE+2E9ywj4FD48A== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-transform-numeric-separator@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.6.tgz#d9115669cc85aa91fbfb15f88f2226332cf4946a" + integrity sha512-6voawq8T25Jvvnc4/rXcWZQKKxUNZcKMS8ZNrjxQqoRFernJJKjE3s18Qo6VFaatG5aiX5JV1oPD7DbJhn0a4Q== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-transform-object-rest-spread@^7.24.0": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.6.tgz#68d763f69955f9e599c405c6c876f5be46b47d8a" + integrity sha512-OKmi5wiMoRW5Smttne7BwHM8s/fb5JFs+bVGNSeHWzwZkWXWValR1M30jyXo1s/RaqgwwhEC62u4rFH/FBcBPg== + dependencies: + "@babel/helper-compilation-targets" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.24.6" + +"@babel/plugin-transform-object-super@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.6.tgz#9cbe6f995bed343a7ab8daf0416dac057a9c3e27" + integrity sha512-N/C76ihFKlZgKfdkEYKtaRUtXZAgK7sOY4h2qrbVbVTXPrKGIi8aww5WGe/+Wmg8onn8sr2ut6FXlsbu/j6JHg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-replace-supers" "^7.24.6" + +"@babel/plugin-transform-optional-catch-binding@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.6.tgz#c81e90a971aad898e56f2b75a358e6c4855aeba3" + integrity sha512-L5pZ+b3O1mSzJ71HmxSCmTVd03VOT2GXOigug6vDYJzE5awLI7P1g0wFcdmGuwSDSrQ0L2rDOe/hHws8J1rv3w== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + +"@babel/plugin-transform-optional-chaining@^7.23.4", "@babel/plugin-transform-optional-chaining@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.6.tgz#3d636b3ed8b5a506f93e4d4675fc95754d7594f5" + integrity sha512-cHbqF6l1QP11OkYTYQ+hhVx1E017O5ZcSPXk9oODpqhcAD1htsWG2NpHrrhthEO2qZomLK0FXS+u7NfrkF5aOQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.6" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-transform-parameters@^7.23.3", "@babel/plugin-transform-parameters@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.6.tgz#7aee86dfedd2fc0136fecbe6f7649fc02d86ab22" + integrity sha512-ST7guE8vLV+vI70wmAxuZpIKzVjvFX9Qs8bl5w6tN/6gOypPWUmMQL2p7LJz5E63vEGrDhAiYetniJFyBH1RkA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-private-methods@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.6.tgz#258e1f859a52ff7b30ad556598224c192defcda7" + integrity sha512-T9LtDI0BgwXOzyXrvgLTT8DFjCC/XgWLjflczTLXyvxbnSR/gpv0hbmzlHE/kmh9nOvlygbamLKRo6Op4yB6aw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-private-property-in-object@^7.23.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.6.tgz#59ff09a099f62213112cf348e96b6b11957d1f28" + integrity sha512-Qu/ypFxCY5NkAnEhCF86Mvg3NSabKsh/TPpBVswEdkGl7+FbsYHy1ziRqJpwGH4thBdQHh8zx+z7vMYmcJ7iaQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.6" + "@babel/helper-create-class-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + +"@babel/plugin-transform-property-literals@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.6.tgz#243c4faabe811c405e9443059a58e834bf95dfd1" + integrity sha512-oARaglxhRsN18OYsnPTpb8TcKQWDYNsPNmTnx5++WOAsUJ0cSC/FZVlIJCKvPbU4yn/UXsS0551CFKJhN0CaMw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-regenerator@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.6.tgz#ed10cf0c13619365e15459f88d1b915ac57ffc24" + integrity sha512-SMDxO95I8WXRtXhTAc8t/NFQUT7VYbIWwJCJgEli9ml4MhqUMh4S6hxgH6SmAC3eAQNWCDJFxcFeEt9w2sDdXg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + regenerator-transform "^0.15.2" + +"@babel/plugin-transform-reserved-words@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.6.tgz#9eb16cbf339fcea0a46677716c775afb5ef14245" + integrity sha512-DcrgFXRRlK64dGE0ZFBPD5egM2uM8mgfrvTMOSB2yKzOtjpGegVYkzh3s1zZg1bBck3nkXiaOamJUqK3Syk+4A== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-runtime@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.24.0.tgz#e308fe27d08b74027d42547081eefaf4f2ffbcc9" + integrity sha512-zc0GA5IitLKJrSfXlXmp8KDqLrnGECK7YRfQBmEKg1NmBOQ7e+KuclBEKJgzifQeUYLdNiAw4B4bjyvzWVLiSA== + dependencies: + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-plugin-utils" "^7.24.0" + babel-plugin-polyfill-corejs2 "^0.4.8" + babel-plugin-polyfill-corejs3 "^0.9.0" + babel-plugin-polyfill-regenerator "^0.5.5" + semver "^6.3.1" + +"@babel/plugin-transform-shorthand-properties@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.6.tgz#ef734ebccc428d2174c7bb36015d0800faf5381e" + integrity sha512-xnEUvHSMr9eOWS5Al2YPfc32ten7CXdH7Zwyyk7IqITg4nX61oHj+GxpNvl+y5JHjfN3KXE2IV55wAWowBYMVw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-spread@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.6.tgz#a56cecbd8617675531d1b79f5b755b7613aa0822" + integrity sha512-h/2j7oIUDjS+ULsIrNZ6/TKG97FgmEk1PXryk/HQq6op4XUUUwif2f69fJrzK0wza2zjCS1xhXmouACaWV5uPA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.6" + +"@babel/plugin-transform-sticky-regex@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.6.tgz#1a78127731fea87d954bed193840986a38f04327" + integrity sha512-fN8OcTLfGmYv7FnDrsjodYBo1DhPL3Pze/9mIIE2MGCT1KgADYIOD7rEglpLHZj8PZlC/JFX5WcD+85FLAQusw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-template-literals@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.6.tgz#aaf2ae157acd0e5c9265dba8ac0a439f8d2a6303" + integrity sha512-BJbEqJIcKwrqUP+KfUIkxz3q8VzXe2R8Wv8TaNgO1cx+nNavxn/2+H8kp9tgFSOL6wYPPEgFvU6IKS4qoGqhmg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-typeof-symbol@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.6.tgz#3d02da23ebcc8f1982ddcd1f2581cf3ee4e58762" + integrity sha512-IshCXQ+G9JIFJI7bUpxTE/oA2lgVLAIK8q1KdJNoPXOpvRaNjMySGuvLfBw/Xi2/1lLo953uE8hyYSDW3TSYig== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-unicode-escapes@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.6.tgz#c8ddca8fd5bacece837a4e27bd3b7ed64580d1a8" + integrity sha512-bKl3xxcPbkQQo5eX9LjjDpU2xYHeEeNQbOhj0iPvetSzA+Tu9q/o5lujF4Sek60CM6MgYvOS/DJuwGbiEYAnLw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-unicode-property-regex@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.6.tgz#e66297d5d452db0b0be56515e3d0e10b7d33fb32" + integrity sha512-8EIgImzVUxy15cZiPii9GvLZwsy7Vxc+8meSlR3cXFmBIl5W5Tn9LGBf7CDKkHj4uVfNXCJB8RsVfnmY61iedA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-unicode-regex@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.6.tgz#2001e7d87ed709eea145e0b65fb5f93c3c0e225b" + integrity sha512-pssN6ExsvxaKU638qcWb81RrvvgZom3jDgU/r5xFZ7TONkZGFf4MhI2ltMb8OcQWhHyxgIavEU+hgqtbKOmsPA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/plugin-transform-unicode-sets-regex@^7.23.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.6.tgz#f18b7292222aee85c155258ceb345a146a070a46" + integrity sha512-quiMsb28oXWIDK0gXLALOJRXLgICLiulqdZGOaPPd0vRT7fQp74NtdADAVu+D8s00C+0Xs0MxVP0VKF/sZEUgw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.6" + "@babel/helper-plugin-utils" "^7.24.6" + +"@babel/preset-env@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.24.0.tgz#11536a7f4b977294f0bdfad780f01a8ac8e183fc" + integrity sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-validator-option" "^7.23.5" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.7" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-import-assertions" "^7.23.3" + "@babel/plugin-syntax-import-attributes" "^7.23.3" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.23.3" + "@babel/plugin-transform-async-generator-functions" "^7.23.9" + "@babel/plugin-transform-async-to-generator" "^7.23.3" + "@babel/plugin-transform-block-scoped-functions" "^7.23.3" + "@babel/plugin-transform-block-scoping" "^7.23.4" + "@babel/plugin-transform-class-properties" "^7.23.3" + "@babel/plugin-transform-class-static-block" "^7.23.4" + "@babel/plugin-transform-classes" "^7.23.8" + "@babel/plugin-transform-computed-properties" "^7.23.3" + "@babel/plugin-transform-destructuring" "^7.23.3" + "@babel/plugin-transform-dotall-regex" "^7.23.3" + "@babel/plugin-transform-duplicate-keys" "^7.23.3" + "@babel/plugin-transform-dynamic-import" "^7.23.4" + "@babel/plugin-transform-exponentiation-operator" "^7.23.3" + "@babel/plugin-transform-export-namespace-from" "^7.23.4" + "@babel/plugin-transform-for-of" "^7.23.6" + "@babel/plugin-transform-function-name" "^7.23.3" + "@babel/plugin-transform-json-strings" "^7.23.4" + "@babel/plugin-transform-literals" "^7.23.3" + "@babel/plugin-transform-logical-assignment-operators" "^7.23.4" + "@babel/plugin-transform-member-expression-literals" "^7.23.3" + "@babel/plugin-transform-modules-amd" "^7.23.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.3" + "@babel/plugin-transform-modules-systemjs" "^7.23.9" + "@babel/plugin-transform-modules-umd" "^7.23.3" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" + "@babel/plugin-transform-new-target" "^7.23.3" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.23.4" + "@babel/plugin-transform-numeric-separator" "^7.23.4" + "@babel/plugin-transform-object-rest-spread" "^7.24.0" + "@babel/plugin-transform-object-super" "^7.23.3" + "@babel/plugin-transform-optional-catch-binding" "^7.23.4" + "@babel/plugin-transform-optional-chaining" "^7.23.4" + "@babel/plugin-transform-parameters" "^7.23.3" + "@babel/plugin-transform-private-methods" "^7.23.3" + "@babel/plugin-transform-private-property-in-object" "^7.23.4" + "@babel/plugin-transform-property-literals" "^7.23.3" + "@babel/plugin-transform-regenerator" "^7.23.3" + "@babel/plugin-transform-reserved-words" "^7.23.3" + "@babel/plugin-transform-shorthand-properties" "^7.23.3" + "@babel/plugin-transform-spread" "^7.23.3" + "@babel/plugin-transform-sticky-regex" "^7.23.3" + "@babel/plugin-transform-template-literals" "^7.23.3" + "@babel/plugin-transform-typeof-symbol" "^7.23.3" + "@babel/plugin-transform-unicode-escapes" "^7.23.3" + "@babel/plugin-transform-unicode-property-regex" "^7.23.3" + "@babel/plugin-transform-unicode-regex" "^7.23.3" + "@babel/plugin-transform-unicode-sets-regex" "^7.23.3" + "@babel/preset-modules" "0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2 "^0.4.8" + babel-plugin-polyfill-corejs3 "^0.9.0" + babel-plugin-polyfill-regenerator "^0.5.5" + core-js-compat "^3.31.0" + semver "^6.3.1" + +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/regjsgen@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" + integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== + +"@babel/runtime@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.0.tgz#584c450063ffda59697021430cb47101b085951e" + integrity sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/runtime@^7.8.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.6.tgz#5b76eb89ad45e2e4a0a8db54c456251469a3358e" + integrity sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.23.9", "@babel/template@^7.24.0", "@babel/template@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.6.tgz#048c347b2787a6072b24c723664c8d02b67a44f9" + integrity sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw== + dependencies: + "@babel/code-frame" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/types" "^7.24.6" + +"@babel/traverse@^7.23.9", "@babel/traverse@^7.24.0", "@babel/traverse@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.6.tgz#0941ec50cdeaeacad0911eb67ae227a4f8424edc" + integrity sha512-OsNjaJwT9Zn8ozxcfoBc+RaHdj3gFmCmYoQLUII1o6ZrUwku0BMg80FoOTPx+Gi6XhcQxAYE4xyjPTo4SxEQqw== + dependencies: + "@babel/code-frame" "^7.24.6" + "@babel/generator" "^7.24.6" + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-function-name" "^7.24.6" + "@babel/helper-hoist-variables" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/types" "^7.24.6" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.22.5", "@babel/types@^7.23.6", "@babel/types@^7.23.9", "@babel/types@^7.24.0", "@babel/types@^7.24.6", "@babel/types@^7.4.4": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.6.tgz#ba4e1f59870c10dc2fa95a274ac4feec23b21912" + integrity sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ== + dependencies: + "@babel/helper-string-parser" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" + to-fast-properties "^2.0.0" + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@discoveryjs/json-ext@0.5.7": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@esbuild/aix-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz#d1bc06aedb6936b3b6d313bf809a5a40387d2b7f" + integrity sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA== + +"@esbuild/aix-ppc64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz#eafa8775019b3650a77e8310ba4dbd17ca7af6d5" + integrity sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA== + +"@esbuild/android-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz#7ad65a36cfdb7e0d429c353e00f680d737c2aed4" + integrity sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA== + +"@esbuild/android-arm64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz#68791afa389550736f682c15b963a4f37ec2f5f6" + integrity sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A== + +"@esbuild/android-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.12.tgz#b0c26536f37776162ca8bde25e42040c203f2824" + integrity sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w== + +"@esbuild/android-arm@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.1.tgz#38c91d8ee8d5196f7fbbdf4f0061415dde3a473a" + integrity sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw== + +"@esbuild/android-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.12.tgz#cb13e2211282012194d89bf3bfe7721273473b3d" + integrity sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew== + +"@esbuild/android-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.1.tgz#93f6190ce997b313669c20edbf3645fc6c8d8f22" + integrity sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA== + +"@esbuild/darwin-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz#cbee41e988020d4b516e9d9e44dd29200996275e" + integrity sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g== + +"@esbuild/darwin-arm64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz#0d391f2e81fda833fe609182cc2fbb65e03a3c46" + integrity sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA== + +"@esbuild/darwin-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz#e37d9633246d52aecf491ee916ece709f9d5f4cd" + integrity sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A== + +"@esbuild/darwin-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz#92504077424584684862f483a2242cfde4055ba2" + integrity sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA== + +"@esbuild/freebsd-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz#1ee4d8b682ed363b08af74d1ea2b2b4dbba76487" + integrity sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA== + +"@esbuild/freebsd-arm64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz#a1646fa6ba87029c67ac8a102bb34384b9290774" + integrity sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw== + +"@esbuild/freebsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz#37a693553d42ff77cd7126764b535fb6cc28a11c" + integrity sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg== + +"@esbuild/freebsd-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz#41c9243ab2b3254ea7fb512f71ffdb341562e951" + integrity sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg== + +"@esbuild/linux-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz#be9b145985ec6c57470e0e051d887b09dddb2d4b" + integrity sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA== + +"@esbuild/linux-arm64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz#f3c1e1269fbc9eedd9591a5bdd32bf707a883156" + integrity sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w== + +"@esbuild/linux-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz#207ecd982a8db95f7b5279207d0ff2331acf5eef" + integrity sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w== + +"@esbuild/linux-arm@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz#4503ca7001a8ee99589c072801ce9d7540717a21" + integrity sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw== + +"@esbuild/linux-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz#d0d86b5ca1562523dc284a6723293a52d5860601" + integrity sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA== + +"@esbuild/linux-ia32@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz#98c474e3e0cbb5bcbdd8561a6e65d18f5767ce48" + integrity sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw== + +"@esbuild/linux-loong64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz#9a37f87fec4b8408e682b528391fa22afd952299" + integrity sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA== + +"@esbuild/linux-loong64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz#a8097d28d14b9165c725fe58fc438f80decd2f33" + integrity sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA== + +"@esbuild/linux-mips64el@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz#4ddebd4e6eeba20b509d8e74c8e30d8ace0b89ec" + integrity sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w== + +"@esbuild/linux-mips64el@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz#c44f6f0d7d017c41ad3bb15bfdb69b690656b5ea" + integrity sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA== + +"@esbuild/linux-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz#adb67dadb73656849f63cd522f5ecb351dd8dee8" + integrity sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg== + +"@esbuild/linux-ppc64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz#0765a55389a99237b3c84227948c6e47eba96f0d" + integrity sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw== + +"@esbuild/linux-riscv64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz#11bc0698bf0a2abf8727f1c7ace2112612c15adf" + integrity sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg== + +"@esbuild/linux-riscv64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz#e4153b032288e3095ddf4c8be07893781b309a7e" + integrity sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg== + +"@esbuild/linux-s390x@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz#e86fb8ffba7c5c92ba91fc3b27ed5a70196c3cc8" + integrity sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg== + +"@esbuild/linux-s390x@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz#b9ab8af6e4b73b26d63c1c426d7669a5d53eb5a7" + integrity sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ== + +"@esbuild/linux-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz#5f37cfdc705aea687dfe5dfbec086a05acfe9c78" + integrity sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg== + +"@esbuild/linux-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz#0b25da17ac38c3e11cdd06ca3691d4d6bef2755f" + integrity sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA== + +"@esbuild/netbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz#29da566a75324e0d0dd7e47519ba2f7ef168657b" + integrity sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA== + +"@esbuild/netbsd-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz#3148e48406cd0d4f7ba1e0bf3f4d77d548c98407" + integrity sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg== + +"@esbuild/openbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz#306c0acbdb5a99c95be98bdd1d47c916e7dc3ff0" + integrity sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw== + +"@esbuild/openbsd-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz#7b73e852986a9750192626d377ac96ac2b749b76" + integrity sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw== + +"@esbuild/sunos-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz#0933eaab9af8b9b2c930236f62aae3fc593faf30" + integrity sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA== + +"@esbuild/sunos-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz#402a441cdac2eee98d8be378c7bc23e00c1861c5" + integrity sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q== + +"@esbuild/win32-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz#773bdbaa1971b36db2f6560088639ccd1e6773ae" + integrity sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A== + +"@esbuild/win32-arm64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz#36c4e311085806a6a0c5fc54d1ac4d7b27e94d7b" + integrity sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A== + +"@esbuild/win32-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz#000516cad06354cc84a73f0943a4aa690ef6fd67" + integrity sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ== + +"@esbuild/win32-ia32@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz#0cf933be3fb9dc58b45d149559fe03e9e22b54fe" + integrity sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw== + +"@esbuild/win32-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz#c57c8afbb4054a3ab8317591a0b7320360b444ae" + integrity sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA== + +"@esbuild/win32-x64@0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz#77583b6ea54cee7c1410ebbd54051b6a3fcbd8ba" + integrity sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA== + +"@indexer/interfaces@file:../indexer-interfaces": + version "2.22.0" + +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + 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" + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@jsverse/transloco-utils@^7.0.0": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@jsverse/transloco-utils/-/transloco-utils-7.0.1.tgz#b396de279550ff5fdea449ae894fc38126fc4e0c" + integrity sha512-Oxs2F5z5UREp2Jgp5KiB8V/VJ6jr1mVIWLJ/UFa3fmIo+4iszHBemgek3QoZaLG7DPUMR2xBWYNzKlGbZCTlMw== + dependencies: + cosmiconfig "^8.1.3" + tslib "^2.3.0" + +"@jsverse/transloco@^7.2.1": + version "7.4.2" + resolved "https://registry.yarnpkg.com/@jsverse/transloco/-/transloco-7.4.2.tgz#489cf5e6689513517771dcbd26fa598366812bfe" + integrity sha512-PtlaZvriUnvMcpuvAh8H+hAJnxf542NnI/wIYoGTa3x0tgdFHFDtiZZC0Duvr5Dn6rXfV4sMeuSE9IbariMU1w== + dependencies: + "@jsverse/transloco-utils" "^7.0.0" + flat "6.0.1" + fs-extra "^11.0.0" + glob "^10.0.0" + lodash.kebabcase "^4.1.1" + ora "^5.4.1" + replace-in-file "^7.0.1" + tslib "^2.2.0" + +"@kurkle/color@^0.3.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@kurkle/color/-/color-0.3.2.tgz#5acd38242e8bde4f9986e7913c8fdf49d3aa199f" + integrity sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw== + +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" + integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== + +"@ljharb/through@^2.3.12": + version "2.3.13" + resolved "https://registry.yarnpkg.com/@ljharb/through/-/through-2.3.13.tgz#b7e4766e0b65aa82e529be945ab078de79874edc" + integrity sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ== + dependencies: + call-bind "^1.0.7" + +"@material/animation@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/animation/-/animation-15.0.0-canary.7f224ddd4.0.tgz#14b4f80718f9d405953dfca4376f9bcef609adc6" + integrity sha512-1GSJaPKef+7HRuV+HusVZHps64cmZuOItDbt40tjJVaikcaZvwmHlcTxRIqzcRoCdt5ZKHh3NoO7GB9Khg4Jnw== + dependencies: + tslib "^2.1.0" + +"@material/auto-init@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/auto-init/-/auto-init-15.0.0-canary.7f224ddd4.0.tgz#9d1b6ed5d27e0c4c037a0cdc14e73729282d718d" + integrity sha512-t7ZGpRJ3ec0QDUO0nJu/SMgLW7qcuG2KqIsEYD1Ej8qhI2xpdR2ydSDQOkVEitXmKoGol1oq4nYSBjTlB65GqA== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/banner@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/banner/-/banner-15.0.0-canary.7f224ddd4.0.tgz#2cf24525e3dd1104f8c311d63c71f2e6200de1fb" + integrity sha512-g9wBUZzYBizyBcBQXTIafnRUUPi7efU9gPJfzeGgkynXiccP/vh5XMmH+PBxl5v+4MlP/d4cZ2NUYoAN7UTqSA== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/button" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/base@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/base/-/base-15.0.0-canary.7f224ddd4.0.tgz#4960bef078e0c092f5293eb331f732d8e8e9265e" + integrity sha512-I9KQOKXpLfJkP8MqZyr8wZIzdPHrwPjFvGd9zSK91/vPyE4hzHRJc/0njsh9g8Lm9PRYLbifXX+719uTbHxx+A== + dependencies: + tslib "^2.1.0" + +"@material/button@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/button/-/button-15.0.0-canary.7f224ddd4.0.tgz#8de20a17fa75529f65553d9fb6c4af5d2743fa94" + integrity sha512-BHB7iyHgRVH+JF16+iscR+Qaic+p7LU1FOLgP8KucRlpF9tTwIxQA6mJwGRi5gUtcG+vyCmzVS+hIQ6DqT/7BA== + dependencies: + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/card@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/card/-/card-15.0.0-canary.7f224ddd4.0.tgz#3ac82035f7260ce8b8337402d2102bc254169dff" + integrity sha512-kt7y9/IWOtJTr3Z/AoWJT3ZLN7CLlzXhx2udCLP9ootZU2bfGK0lzNwmo80bv/pJfrY9ihQKCtuGTtNxUy+vIw== + dependencies: + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/checkbox@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-15.0.0-canary.7f224ddd4.0.tgz#a8223914b244cd7a23d9279b9fce3197a9473e69" + integrity sha512-rURcrL5O1u6hzWR+dNgiQ/n89vk6tdmdP3mZgnxJx61q4I/k1yijKqNJSLrkXH7Rto3bM5NRKMOlgvMvVd7UMQ== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/chips@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/chips/-/chips-15.0.0-canary.7f224ddd4.0.tgz#e5f44ba72100188e49075fc701d187ef3e75ba82" + integrity sha512-AYAivV3GSk/T/nRIpH27sOHFPaSMrE3L0WYbnb5Wa93FgY8a0fbsFYtSH2QmtwnzXveg+B1zGTt7/xIIcynKdQ== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/checkbox" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + safevalues "^0.3.4" + tslib "^2.1.0" + +"@material/circular-progress@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/circular-progress/-/circular-progress-15.0.0-canary.7f224ddd4.0.tgz#0ee8de2cc989007a6029e60f6c7fb36af222a0ac" + integrity sha512-DJrqCKb+LuGtjNvKl8XigvyK02y36GRkfhMUYTcJEi3PrOE00bwXtyj7ilhzEVshQiXg6AHGWXtf5UqwNrx3Ow== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/progress-indicator" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/data-table@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/data-table/-/data-table-15.0.0-canary.7f224ddd4.0.tgz#fc5417a3e476896e92b8ada4804ef82d373831fa" + integrity sha512-/2WZsuBIq9z9RWYF5Jo6b7P6u0fwit+29/mN7rmAZ6akqUR54nXyNfoSNiyydMkzPlZZsep5KrSHododDhBZbA== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/checkbox" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/icon-button" "15.0.0-canary.7f224ddd4.0" + "@material/linear-progress" "15.0.0-canary.7f224ddd4.0" + "@material/list" "15.0.0-canary.7f224ddd4.0" + "@material/menu" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/select" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/density@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/density/-/density-15.0.0-canary.7f224ddd4.0.tgz#3fd8625b734597556c2bf18362a709485b4d1899" + integrity sha512-o9EXmGKVpiQ6mHhyV3oDDzc78Ow3E7v8dlaOhgaDSXgmqaE8v5sIlLNa/LKSyUga83/fpGk3QViSGXotpQx0jA== + dependencies: + tslib "^2.1.0" + +"@material/dialog@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-15.0.0-canary.7f224ddd4.0.tgz#13b414c6afa6e015845d1bbf09337d8eb1270465" + integrity sha512-u0XpTlv1JqWC/bQ3DavJ1JguofTelLT2wloj59l3/1b60jv42JQ6Am7jU3I8/SIUB1MKaW7dYocXjDWtWJakLA== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/button" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/icon-button" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/dom@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/dom/-/dom-15.0.0-canary.7f224ddd4.0.tgz#4650cdc01439d033073bca09bbe94e5cbdc1a70e" + integrity sha512-mQ1HT186GPQSkRg5S18i70typ5ZytfjL09R0gJ2Qg5/G+MLCGi7TAjZZSH65tuD/QGOjel4rDdWOTmYbPYV6HA== + dependencies: + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/drawer@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/drawer/-/drawer-15.0.0-canary.7f224ddd4.0.tgz#089efcc9ba1622c6f6acb5e292f2edd9b2482558" + integrity sha512-qyO0W0KBftfH8dlLR0gVAgv7ZHNvU8ae11Ao6zJif/YxcvK4+gph1z8AO4H410YmC2kZiwpSKyxM1iQCCzbb4g== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/list" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/elevation@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-15.0.0-canary.7f224ddd4.0.tgz#b8fdde1b096dd8352440fc7a616c137d18e9c687" + integrity sha512-tV6s4/pUBECedaI36Yj18KmRCk1vfue/JP/5yYRlFNnLMRVISePbZaKkn/BHXVf+26I3W879+XqIGlDVdmOoMA== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/fab@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/fab/-/fab-15.0.0-canary.7f224ddd4.0.tgz#e99acd7dc990e81ccb0deb834e6b6c3bd1747ea8" + integrity sha512-4h76QrzfZTcPdd+awDPZ4Q0YdSqsXQnS540TPtyXUJ/5G99V6VwGpjMPIxAsW0y+pmI9UkLL/srrMaJec+7r4Q== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/feature-targeting@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-15.0.0-canary.7f224ddd4.0.tgz#bb1a326dad1cfd113459d7cb0096c0ab7ce0c951" + integrity sha512-SAjtxYh6YlKZriU83diDEQ7jNSP2MnxKsER0TvFeyG1vX/DWsUyYDOIJTOEa9K1N+fgJEBkNK8hY55QhQaspew== + dependencies: + tslib "^2.1.0" + +"@material/floating-label@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/floating-label/-/floating-label-15.0.0-canary.7f224ddd4.0.tgz#c47c9df4424bfdcb824ba91096b130bc574c7127" + integrity sha512-0KMo5ijjYaEHPiZ2pCVIcbaTS2LycvH9zEhEMKwPPGssBCX7iz5ffYQFk7e5yrQand1r3jnQQgYfHAwtykArnQ== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/focus-ring@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/focus-ring/-/focus-ring-15.0.0-canary.7f224ddd4.0.tgz#b1822b45a99009e9854a9e6c9f013708d159039d" + integrity sha512-Jmg1nltq4J6S6A10EGMZnvufrvU3YTi+8R8ZD9lkSbun0Fm2TVdICQt/Auyi6An9zP66oQN6c31eqO6KfIPsDg== + dependencies: + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + +"@material/form-field@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-15.0.0-canary.7f224ddd4.0.tgz#0f3c332361ca5e00fdafb9f854cc5cebe445a340" + integrity sha512-fEPWgDQEPJ6WF7hNnIStxucHR9LE4DoDSMqCsGWS2Yu+NLZYLuCEecgR0UqQsl1EQdNRaFh8VH93KuxGd2hiPg== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/icon-button@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-15.0.0-canary.7f224ddd4.0.tgz#75a31e0b1287f98fba4355554725248340521c04" + integrity sha512-DcK7IL4ICY/DW+48YQZZs9g0U1kRaW0Wb0BxhvppDMYziHo/CTpFdle4gjyuTyRxPOdHQz5a97ru48Z9O4muTw== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/image-list@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/image-list/-/image-list-15.0.0-canary.7f224ddd4.0.tgz#36bb04e6cf16a293dfb850d0fce585b1d2c724c3" + integrity sha512-voMjG2p80XbjL1B2lmF65zO5gEgJOVKClLdqh4wbYzYfwY/SR9c8eLvlYG7DLdFaFBl/7gGxD8TvvZ329HUFPw== + dependencies: + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/layout-grid@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/layout-grid/-/layout-grid-15.0.0-canary.7f224ddd4.0.tgz#656c39a44a715331ce11fe0aea281bc0e6c793aa" + integrity sha512-veDABLxMn2RmvfnUO2RUmC1OFfWr4cU+MrxKPoDD2hl3l3eDYv5fxws6r5T1JoSyXoaN+oEZpheS0+M9Ure8Pg== + dependencies: + tslib "^2.1.0" + +"@material/line-ripple@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/line-ripple/-/line-ripple-15.0.0-canary.7f224ddd4.0.tgz#66487ff758834306180a7449ce4487103bcfe1d8" + integrity sha512-f60hVJhIU6I3/17Tqqzch1emUKEcfVVgHVqADbU14JD+oEIz429ZX9ksZ3VChoU3+eejFl+jVdZMLE/LrAuwpg== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/linear-progress@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/linear-progress/-/linear-progress-15.0.0-canary.7f224ddd4.0.tgz#b18179c6790db14870505e4362184d01ee3b9cb3" + integrity sha512-pRDEwPQielDiC9Sc5XhCXrGxP8wWOnAO8sQlMebfBYHYqy5hhiIzibezS8CSaW4MFQFyXmCmpmqWlbqGYRmiyg== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/progress-indicator" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/list@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/list/-/list-15.0.0-canary.7f224ddd4.0.tgz#e096d903ddbf06dd0177a317953d902133395b5e" + integrity sha512-Is0NV91sJlXF5pOebYAtWLF4wU2MJDbYqztML/zQNENkQxDOvEXu3nWNb3YScMIYJJXvARO0Liur5K4yPagS1Q== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/menu-surface@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-15.0.0-canary.7f224ddd4.0.tgz#80678f927beec0ec22e68cb05b9242dc0b99543a" + integrity sha512-7RZHvw0gbwppaAJ/Oh5SWmfAKJ62aw1IMB3+3MRwsb5PLoV666wInYa+zJfE4i7qBeOn904xqT2Nko5hY0ssrg== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/menu@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/menu/-/menu-15.0.0-canary.7f224ddd4.0.tgz#f7a2fc94640afae6e816a75abf5dfc77d0bf9920" + integrity sha512-D11QU1dXqLbh5X1zKlEhS3QWh0b5BPNXlafc5MXfkdJHhOiieb7LC9hMJhbrHtj24FadJ7evaFW/T2ugJbJNnQ== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/list" "15.0.0-canary.7f224ddd4.0" + "@material/menu-surface" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/notched-outline@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/notched-outline/-/notched-outline-15.0.0-canary.7f224ddd4.0.tgz#d13391d4e211c077980e2fed81d81cc81a6a84fa" + integrity sha512-Yg2usuKB2DKlKIBISbie9BFsOVuffF71xjbxPbybvqemxqUBd+bD5/t6H1fLE+F8/NCu5JMigho4ewUU+0RCiw== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/floating-label" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/progress-indicator@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/progress-indicator/-/progress-indicator-15.0.0-canary.7f224ddd4.0.tgz#6d70bf1ecf406c1da317402021a2970506921077" + integrity sha512-UPbDjE5CqT+SqTs0mNFG6uFEw7wBlgYmh+noSkQ6ty/EURm8lF125dmi4dv4kW0+octonMXqkGtAoZwLIHKf/w== + dependencies: + tslib "^2.1.0" + +"@material/radio@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/radio/-/radio-15.0.0-canary.7f224ddd4.0.tgz#57834ac2d3441d1036041a94fe00b80c44d26b56" + integrity sha512-wR1X0Sr0KmQLu6+YOFKAI84G3L6psqd7Kys5kfb8WKBM36zxO5HQXC5nJm/Y0rdn22ixzsIz2GBo0MNU4V4k1A== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/ripple@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-15.0.0-canary.7f224ddd4.0.tgz#5ce82710d337314f343d0b80e39f33a109e42801" + integrity sha512-JqOsWM1f4aGdotP0rh1vZlPZTg6lZgh39FIYHFMfOwfhR+LAikUJ+37ciqZuewgzXB6iiRO6a8aUH6HR5SJYPg== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/rtl@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-15.0.0-canary.7f224ddd4.0.tgz#25cf5447c2f59eea80bdb83a71ab19f15ff32e3d" + integrity sha512-UVf14qAtmPiaaZjuJtmN36HETyoKWmsZM/qn1L5ciR2URb8O035dFWnz4ZWFMmAYBno/L7JiZaCkPurv2ZNrGA== + dependencies: + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/segmented-button@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/segmented-button/-/segmented-button-15.0.0-canary.7f224ddd4.0.tgz#c36ca64ea8dfeb73bfdfdddb08b436e6c29f7071" + integrity sha512-LCnVRUSAhELTKI/9hSvyvIvQIpPpqF29BV+O9yM4WoNNmNWqTulvuiv7grHZl6Z+kJuxSg4BGbsPxxb9dXozPg== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/touch-target" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/select@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/select/-/select-15.0.0-canary.7f224ddd4.0.tgz#cf7fe97b9e4b47d1a53ee5fa1d21c3fe2245361c" + integrity sha512-WioZtQEXRpglum0cMSzSqocnhsGRr+ZIhvKb3FlaNrTaK8H3Y4QA7rVjv3emRtrLOOjaT6/RiIaUMTo9AGzWQQ== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/floating-label" "15.0.0-canary.7f224ddd4.0" + "@material/line-ripple" "15.0.0-canary.7f224ddd4.0" + "@material/list" "15.0.0-canary.7f224ddd4.0" + "@material/menu" "15.0.0-canary.7f224ddd4.0" + "@material/menu-surface" "15.0.0-canary.7f224ddd4.0" + "@material/notched-outline" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/shape@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/shape/-/shape-15.0.0-canary.7f224ddd4.0.tgz#f4cb9f8f779449b12d69d8a303bab54211db7e52" + integrity sha512-8z8l1W3+cymObunJoRhwFPKZ+FyECfJ4MJykNiaZq7XJFZkV6xNmqAVrrbQj93FtLsECn9g4PjjIomguVn/OEw== + dependencies: + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/slider@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/slider/-/slider-15.0.0-canary.7f224ddd4.0.tgz#beba0d242fd110f063422fba40be3850cda01e44" + integrity sha512-QU/WSaSWlLKQRqOhJrPgm29wqvvzRusMqwAcrCh1JTrCl+xwJ43q5WLDfjYhubeKtrEEgGu9tekkAiYfMG7EBw== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/snackbar@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/snackbar/-/snackbar-15.0.0-canary.7f224ddd4.0.tgz#55765e8755d031186954fed98c2fb6209e82bce0" + integrity sha512-sm7EbVKddaXpT/aXAYBdPoN0k8yeg9+dprgBUkrdqGzWJAeCkxb4fv2B3He88YiCtvkTz2KLY4CThPQBSEsMFQ== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/button" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/icon-button" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/switch@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/switch/-/switch-15.0.0-canary.7f224ddd4.0.tgz#71fa2bd8819917dae6991e118aef819d780d690e" + integrity sha512-lEDJfRvkVyyeHWIBfoxYjJVl+WlEAE2kZ/+6OqB1FW0OV8ftTODZGhHRSzjVBA1/p4FPuhAtKtoK9jTpa4AZjA== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + safevalues "^0.3.4" + tslib "^2.1.0" + +"@material/tab-bar@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/tab-bar/-/tab-bar-15.0.0-canary.7f224ddd4.0.tgz#34fb2585163c4da265ce6ca318e6bf6efd7caf1b" + integrity sha512-p1Asb2NzrcECvAQU3b2SYrpyJGyJLQWR+nXTYzDKE8WOpLIRCXap2audNqD7fvN/A20UJ1J8U01ptrvCkwJ4eA== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/tab" "15.0.0-canary.7f224ddd4.0" + "@material/tab-indicator" "15.0.0-canary.7f224ddd4.0" + "@material/tab-scroller" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/tab-indicator@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/tab-indicator/-/tab-indicator-15.0.0-canary.7f224ddd4.0.tgz#85f91e23142249d18379cf6415d3b2385ccdee0e" + integrity sha512-h9Td3MPqbs33spcPS7ecByRHraYgU4tNCZpZzZXw31RypjKvISDv/PS5wcA4RmWqNGih78T7xg4QIGsZg4Pk4w== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/tab-scroller@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/tab-scroller/-/tab-scroller-15.0.0-canary.7f224ddd4.0.tgz#f0fc898fc8f3ca293676d04179ed2b1d03cb38a1" + integrity sha512-LFeYNjQpdXecwECd8UaqHYbhscDCwhGln5Yh+3ctvcEgvmDPNjhKn/DL3sWprWvG8NAhP6sHMrsGhQFVdCWtTg== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/tab" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/tab@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/tab/-/tab-15.0.0-canary.7f224ddd4.0.tgz#77950384cbf0a418dc59352e244c0c3ec0ee83cb" + integrity sha512-E1xGACImyCLurhnizyOTCgOiVezce4HlBFAI6YhJo/AyVwjN2Dtas4ZLQMvvWWqpyhITNkeYdOchwCC1mrz3AQ== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/focus-ring" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/tab-indicator" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/textfield@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/textfield/-/textfield-15.0.0-canary.7f224ddd4.0.tgz#db502c644180f31afc6060bc5baaafab303d6608" + integrity sha512-AExmFvgE5nNF0UA4l2cSzPghtxSUQeeoyRjFLHLy+oAaE4eKZFrSy0zEpqPeWPQpEMDZk+6Y+6T3cOFYBeSvsw== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/density" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/floating-label" "15.0.0-canary.7f224ddd4.0" + "@material/line-ripple" "15.0.0-canary.7f224ddd4.0" + "@material/notched-outline" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/theme@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/theme/-/theme-15.0.0-canary.7f224ddd4.0.tgz#7523997eb51a21bffd598aa84fd1e76b7a0bb980" + integrity sha512-hs45hJoE9yVnoVOcsN1jklyOa51U4lzWsEnQEuJTPOk2+0HqCQ0yv/q0InpSnm2i69fNSyZC60+8HADZGF8ugQ== + dependencies: + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/tokens@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/tokens/-/tokens-15.0.0-canary.7f224ddd4.0.tgz#4ae8b300fc3ea5b9a6e53c3257a5aa0efd3442a3" + integrity sha512-r9TDoicmcT7FhUXC4eYMFnt9TZsz0G8T3wXvkKncLppYvZ517gPyD/1+yhuGfGOxAzxTrM66S/oEc1fFE2q4hw== + dependencies: + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + +"@material/tooltip@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/tooltip/-/tooltip-15.0.0-canary.7f224ddd4.0.tgz#78bf4353b426030071944cdef45f1c2a023537f6" + integrity sha512-8qNk3pmPLTnam3XYC1sZuplQXW9xLn4Z4MI3D+U17Q7pfNZfoOugGr+d2cLA9yWAEjVJYB0mj8Yu86+udo4N9w== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/button" "15.0.0-canary.7f224ddd4.0" + "@material/dom" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/tokens" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + safevalues "^0.3.4" + tslib "^2.1.0" + +"@material/top-app-bar@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/top-app-bar/-/top-app-bar-15.0.0-canary.7f224ddd4.0.tgz#ac042d558f0763e8e9f8e48504eac7062882f353" + integrity sha512-SARR5/ClYT4CLe9qAXakbr0i0cMY0V3V4pe3ElIJPfL2Z2c4wGR1mTR8m2LxU1MfGKK8aRoUdtfKaxWejp+eNA== + dependencies: + "@material/animation" "15.0.0-canary.7f224ddd4.0" + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/elevation" "15.0.0-canary.7f224ddd4.0" + "@material/ripple" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/shape" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + "@material/typography" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/touch-target@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-15.0.0-canary.7f224ddd4.0.tgz#ab80eeec967fa1444dc5d0198c4c826916a9ff86" + integrity sha512-BJo/wFKHPYLGsRaIpd7vsQwKr02LtO2e89Psv0on/p0OephlNIgeB9dD9W+bQmaeZsZ6liKSKRl6wJWDiK71PA== + dependencies: + "@material/base" "15.0.0-canary.7f224ddd4.0" + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/rtl" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@material/typography@15.0.0-canary.7f224ddd4.0": + version "15.0.0-canary.7f224ddd4.0" + resolved "https://registry.yarnpkg.com/@material/typography/-/typography-15.0.0-canary.7f224ddd4.0.tgz#1191633c70ad0ee0e162feacb5e6efaf42a52cef" + integrity sha512-kBaZeCGD50iq1DeRRH5OM5Jl7Gdk+/NOfKArkY4ksBZvJiStJ7ACAhpvb8MEGm4s3jvDInQFLsDq3hL+SA79sQ== + dependencies: + "@material/feature-targeting" "15.0.0-canary.7f224ddd4.0" + "@material/theme" "15.0.0-canary.7f224ddd4.0" + tslib "^2.1.0" + +"@ngtools/webpack@17.3.8": + version "17.3.8" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-17.3.8.tgz#96c0f99055910dd21438d7697d625fdeb7261015" + integrity sha512-CjSVVa/9fzMpEDQP01SC4colKCbZwj7vUq0H2bivp8jVsmd21x9Fu0gDBH0Y9NdfAIm4eGZvmiZKMII3vIOaYQ== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@npmcli/agent@^2.0.0": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.2.tgz#967604918e62f620a648c7975461c9c9e74fc5d5" + integrity sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og== + dependencies: + agent-base "^7.1.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.1" + lru-cache "^10.0.1" + socks-proxy-agent "^8.0.3" + +"@npmcli/fs@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.1.tgz#59cdaa5adca95d135fc00f2bb53f5771575ce726" + integrity sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg== + dependencies: + semver "^7.3.5" + +"@npmcli/git@^5.0.0": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-5.0.7.tgz#7ff675e33b4dc0b0adb1f0c4aa302109efc06463" + integrity sha512-WaOVvto604d5IpdCRV2KjQu8PzkfE96d50CQGKgywXh2GxXmDeUO5EWcBC4V57uFyrNqx83+MewuJh3WTR3xPA== + dependencies: + "@npmcli/promise-spawn" "^7.0.0" + lru-cache "^10.0.1" + npm-pick-manifest "^9.0.0" + proc-log "^4.0.0" + promise-inflight "^1.0.1" + promise-retry "^2.0.1" + semver "^7.3.5" + which "^4.0.0" + +"@npmcli/installed-package-contents@^2.0.1": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz#63048e5f6e40947a3a88dcbcb4fd9b76fdd37c17" + integrity sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w== + dependencies: + npm-bundled "^3.0.0" + npm-normalize-package-bin "^3.0.0" + +"@npmcli/node-gyp@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz#101b2d0490ef1aa20ed460e4c0813f0db560545a" + integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== + +"@npmcli/package-json@^5.0.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-5.1.1.tgz#ec7339438ae16fcb2216f1c34a0dad707e62d55b" + integrity sha512-uTq5j/UqUzbOaOxVy+osfOhpqOiLfUZ0Ut33UbcyyAPJbZcJsf4Mrsyb8r58FoIFlofw0iOFsuCA/oDK14VDJQ== + dependencies: + "@npmcli/git" "^5.0.0" + glob "^10.2.2" + hosted-git-info "^7.0.0" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^6.0.0" + proc-log "^4.0.0" + semver "^7.5.3" + +"@npmcli/promise-spawn@^7.0.0": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz#1d53d34ffeb5d151bfa8ec661bcccda8bbdfd532" + integrity sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ== + dependencies: + which "^4.0.0" + +"@npmcli/redact@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/redact/-/redact-1.1.0.tgz#78e53a6a34f013543a73827a07ebdc3a6f10454b" + integrity sha512-PfnWuOkQgu7gCbnSsAisaX7hKOdZ4wSAhAzH3/ph5dSGau52kCRrMMGbiSQLwyTZpgldkZ49b0brkOr1AzGBHQ== + +"@npmcli/run-script@^7.0.0": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-7.0.4.tgz#9f29aaf4bfcf57f7de2a9e28d1ef091d14b2e6eb" + integrity sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg== + dependencies: + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/package-json" "^5.0.0" + "@npmcli/promise-spawn" "^7.0.0" + node-gyp "^10.0.0" + which "^4.0.0" + +"@petamoriken/float16@^3.4.7": + version "3.8.7" + resolved "https://registry.yarnpkg.com/@petamoriken/float16/-/float16-3.8.7.tgz#16073fb1b9867eaa5b254573484d09100700aaa4" + integrity sha512-/Ri4xDDpe12NT6Ex/DRgHzLlobiQXEW/hmG08w1wj/YU7hLemk97c+zHQFp0iZQ9r7YqgLEXZR2sls4HxBf9NA== + +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + +"@rollup/rollup-android-arm-eabi@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz#bbd0e616b2078cd2d68afc9824d1fadb2f2ffd27" + integrity sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ== + +"@rollup/rollup-android-arm64@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz#97255ef6384c5f73f4800c0de91f5f6518e21203" + integrity sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA== + +"@rollup/rollup-darwin-arm64@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz#b6dd74e117510dfe94541646067b0545b42ff096" + integrity sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w== + +"@rollup/rollup-darwin-x64@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz#e07d76de1cec987673e7f3d48ccb8e106d42c05c" + integrity sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA== + +"@rollup/rollup-linux-arm-gnueabihf@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz#9f1a6d218b560c9d75185af4b8bb42f9f24736b8" + integrity sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA== + +"@rollup/rollup-linux-arm-musleabihf@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz#53618b92e6ffb642c7b620e6e528446511330549" + integrity sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A== + +"@rollup/rollup-linux-arm64-gnu@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz#99a7ba5e719d4f053761a698f7b52291cefba577" + integrity sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw== + +"@rollup/rollup-linux-arm64-musl@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz#f53db99a45d9bc00ce94db8a35efa7c3c144a58c" + integrity sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ== + +"@rollup/rollup-linux-powerpc64le-gnu@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz#cbb0837408fe081ce3435cf3730e090febafc9bf" + integrity sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA== + +"@rollup/rollup-linux-riscv64-gnu@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz#8ed09c1d1262ada4c38d791a28ae0fea28b80cc9" + integrity sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg== + +"@rollup/rollup-linux-s390x-gnu@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz#938138d3c8e0c96f022252a28441dcfb17afd7ec" + integrity sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg== + +"@rollup/rollup-linux-x64-gnu@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz#1a7481137a54740bee1ded4ae5752450f155d942" + integrity sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w== + +"@rollup/rollup-linux-x64-musl@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz#f1186afc601ac4f4fc25fac4ca15ecbee3a1874d" + integrity sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg== + +"@rollup/rollup-win32-arm64-msvc@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz#ed6603e93636a96203c6915be4117245c1bd2daf" + integrity sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA== + +"@rollup/rollup-win32-ia32-msvc@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz#14e0b404b1c25ebe6157a15edb9c46959ba74c54" + integrity sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg== + +"@rollup/rollup-win32-x64-msvc@4.18.0": + version "4.18.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz#5d694d345ce36b6ecf657349e03eb87297e68da4" + integrity sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g== + +"@schematics/angular@17.3.8": + version "17.3.8" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-17.3.8.tgz#0b4adf9d05b22176b99ad8e311a274c102d74822" + integrity sha512-2g4OmSyE9YGq50Uj7fNI26P/TSAFJ7ZuirwTF2O7Xc4XRQ29/tYIIqhezpNlTb6rlYblcQuMcUZBrMfWJHcqJw== + dependencies: + "@angular-devkit/core" "17.3.8" + "@angular-devkit/schematics" "17.3.8" + jsonc-parser "3.2.1" + +"@sigstore/bundle@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-2.3.2.tgz#ad4dbb95d665405fd4a7a02c8a073dbd01e4e95e" + integrity sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA== + dependencies: + "@sigstore/protobuf-specs" "^0.3.2" + +"@sigstore/core@^1.0.0", "@sigstore/core@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@sigstore/core/-/core-1.1.0.tgz#5583d8f7ffe599fa0a89f2bf289301a5af262380" + integrity sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg== + +"@sigstore/protobuf-specs@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz#5becf88e494a920f548d0163e2978f81b44b7d6f" + integrity sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw== + +"@sigstore/sign@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-2.3.2.tgz#d3d01e56d03af96fd5c3a9b9897516b1233fc1c4" + integrity sha512-5Vz5dPVuunIIvC5vBb0APwo7qKA4G9yM48kPWJT+OEERs40md5GoUR1yedwpekWZ4m0Hhw44m6zU+ObsON+iDA== + dependencies: + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.0.0" + "@sigstore/protobuf-specs" "^0.3.2" + make-fetch-happen "^13.0.1" + proc-log "^4.2.0" + promise-retry "^2.0.1" + +"@sigstore/tuf@^2.3.4": + version "2.3.4" + resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-2.3.4.tgz#da1d2a20144f3b87c0172920cbc8dcc7851ca27c" + integrity sha512-44vtsveTPUpqhm9NCrbU8CWLe3Vck2HO1PNLw7RIajbB7xhtn5RBPm1VNSCMwqGYHhDsBJG8gDF0q4lgydsJvw== + dependencies: + "@sigstore/protobuf-specs" "^0.3.2" + tuf-js "^2.2.1" + +"@sigstore/verify@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@sigstore/verify/-/verify-1.2.1.tgz#c7e60241b432890dcb8bd8322427f6062ef819e1" + integrity sha512-8iKx79/F73DKbGfRf7+t4dqrc0bRr0thdPrxAtCKWRm/F0tG71i6O1rvlnScncJLLBZHn3h8M3c1BSUAb9yu8g== + dependencies: + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.1.0" + "@sigstore/protobuf-specs" "^0.3.2" + +"@socket.io/component-emitter@~3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== + +"@tufjs/canonical-json@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a" + integrity sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA== + +"@tufjs/models@2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-2.0.1.tgz#e429714e753b6c2469af3212e7f320a6973c2812" + integrity sha512-92F7/SFyufn4DXsha9+QfKnN03JGqtMFMXgSHbZOo8JG59WkTni7UzAouNQDf7AuP9OAMxVOPQcqG3sB7w+kkg== + dependencies: + "@tufjs/canonical-json" "2.0.0" + minimatch "^9.0.4" + +"@types/body-parser@*": + version "1.19.5" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.5.tgz#04ce9a3b677dc8bd681a17da1ab9835dc9d3ede4" + integrity sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/bonjour@^3.5.9": + version "3.5.13" + resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.13.tgz#adf90ce1a105e81dd1f9c61fdc5afda1bfb92956" + integrity sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ== + dependencies: + "@types/node" "*" + +"@types/connect-history-api-fallback@^1.3.5": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz#7de71645a103056b48ac3ce07b3520b819c1d5b3" + integrity sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw== + dependencies: + "@types/express-serve-static-core" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.17" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b" + integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA== + dependencies: + "@types/node" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.56.10" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d" + integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": + version "4.19.3" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.3.tgz#e469a13e4186c9e1c0418fb17be8bc8ff1b19a7a" + integrity sha512-KOzM7MhcBFlmnlr/fzISFF5vGWVSvN6fTd4T+ExOt08bA/dA5kpSzY52nMsI1KDFmUREpJelPYyuslLRSjjgCg== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@*", "@types/express@^4.17.13": + version "4.17.21" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" + integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/geojson@*": + version "7946.0.14" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" + integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== + +"@types/http-errors@*": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.4.tgz#7eb47726c391b7345a6ec35ad7f4de469cf5ba4f" + integrity sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA== + +"@types/http-proxy@^1.17.8": + version "1.17.14" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.14.tgz#57f8ccaa1c1c3780644f8a94f9c6b5000b5e2eec" + integrity sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w== + dependencies: + "@types/node" "*" + +"@types/jasmine@~5.1.0": + version "5.1.4" + resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-5.1.4.tgz#0de3f6ca753e10d1600ce1864ae42cfd47cf9924" + integrity sha512-px7OMFO/ncXxixDe1zR13V1iycqWae0MxTaw62RpFlksUi5QuNWgQJFkTQjIOvrmutJbI7Fp2Y2N1F6D2R4G6w== + +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/mapbox-gl@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/mapbox-gl/-/mapbox-gl-3.1.0.tgz#81b80950b2e2d8763bdb797fc0f1bd09d80e4fdb" + integrity sha512-hI6cQDjw1bkJw7MC/eHMqq5TWUamLwsujnUUeiIX2KDRjxRNSYMjnHz07+LATz9I9XIsKumOtUz4gRYnZOJ/FA== + dependencies: + "@types/geojson" "*" + +"@types/mime@^1": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" + integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== + +"@types/node-forge@^1.3.0": + version "1.3.11" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da" + integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== + dependencies: + "@types/node" "*" + +"@types/node@*", "@types/node@>=10.0.0": + version "20.14.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.0.tgz#49ceec7b34f8621470cff44677fa9d461a477f17" + integrity sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA== + dependencies: + undici-types "~5.26.4" + +"@types/qs@*": + version "6.9.15" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" + integrity sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg== + +"@types/range-parser@*": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" + integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== + +"@types/retry@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" + integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + +"@types/send@*": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" + integrity sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-index@^1.9.1": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.4.tgz#e6ae13d5053cb06ed36392110b4f9a49ac4ec898" + integrity sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug== + dependencies: + "@types/express" "*" + +"@types/serve-static@*", "@types/serve-static@^1.13.10": + version "1.15.7" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.7.tgz#22174bbd74fb97fe303109738e9b5c2f3064f714" + integrity sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "*" + +"@types/sockjs@^0.3.33": + version "0.3.36" + resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.36.tgz#ce322cf07bcc119d4cbf7f88954f3a3bd0f67535" + integrity sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q== + dependencies: + "@types/node" "*" + +"@types/ws@^8.5.5": + version "8.5.10" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" + integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== + dependencies: + "@types/node" "*" + +"@vitejs/plugin-basic-ssl@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.1.0.tgz#8b840305a6b48e8764803435ec0c716fa27d3802" + integrity sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A== + +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.11.5": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.11.5": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +"@yarnpkg/lockfile@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +abbrev@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" + integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== + +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-import-assertions@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + +acorn@^8.7.1, acorn@^8.8.2: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +adjust-sourcemap-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz#fc4a0fd080f7d10471f30a7320f25560ade28c99" + integrity sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A== + dependencies: + loader-utils "^2.0.0" + regex-parser "^2.2.11" + +agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv-formats@2.1.1, ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv-keywords@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + +ajv@8.12.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + 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" + +ajv@^8.0.0, ajv@^8.9.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.14.0.tgz#f514ddfd4756abb200e1704414963620a625ebbb" + integrity sha512-oYs1UUtO97ZO2lJ4bwnWeQW8/zvOIQLGKcvPTsWmvc2SYgBb+upuNS5NxoLaMU4h8Ju3Nbj6Cq8mD2LQoqVKFA== + dependencies: + fast-deep-equal "^3.1.3" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.4.1" + +ansi-colors@4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-html-community@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" + integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +autoprefixer@10.4.18: + version "10.4.18" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.18.tgz#fcb171a3b017be7cb5d8b7a825f5aacbf2045163" + integrity sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g== + dependencies: + browserslist "^4.23.0" + caniuse-lite "^1.0.30001591" + fraction.js "^4.3.7" + normalize-range "^0.1.2" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" + +babel-loader@9.1.3: + version "9.1.3" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.3.tgz#3d0e01b4e69760cc694ee306fe16d358aa1c6f9a" + integrity sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw== + dependencies: + find-cache-dir "^4.0.0" + schema-utils "^4.0.0" + +babel-plugin-istanbul@6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-polyfill-corejs2@^0.4.8: + version "0.4.11" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz#30320dfe3ffe1a336c15afdcdafd6fd615b25e33" + integrity sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q== + dependencies: + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.6.2" + semver "^6.3.1" + +babel-plugin-polyfill-corejs3@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz#9eea32349d94556c2ad3ab9b82ebb27d4bf04a81" + integrity sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.5.0" + core-js-compat "^3.34.0" + +babel-plugin-polyfill-regenerator@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz#8b0c8fc6434239e5d7b8a9d1f832bb2b0310f06a" + integrity sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.5.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +body-parser@1.20.2, body-parser@^1.19.0: + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +bonjour-service@^1.0.11: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.2.1.tgz#eb41b3085183df3321da1264719fbada12478d02" + integrity sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw== + dependencies: + fast-deep-equal "^3.1.3" + multicast-dns "^7.2.5" + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.21.10, browserslist@^4.21.5, browserslist@^4.22.2, browserslist@^4.23.0: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +cacache@^18.0.0: + version "18.0.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.3.tgz#864e2c18414e1e141ae8763f31e46c2cb96d1b21" + integrity sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg== + dependencies: + "@npmcli/fs" "^3.1.0" + fs-minipass "^3.0.0" + glob "^10.2.2" + lru-cache "^10.0.1" + minipass "^7.0.3" + minipass-collect "^2.0.1" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + p-map "^4.0.0" + ssri "^10.0.0" + tar "^6.1.11" + unique-filename "^3.0.0" + +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + 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" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001591: + version "1.0.30001627" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz#8071c42d468e06ed2fb2c545efe79a663fd326ab" + integrity sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +chart.js@^4.4.3: + version "4.4.3" + resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-4.4.3.tgz#3b2e11e7010fefa99b07d0349236f5098e5226ad" + integrity sha512-qK1gkGSRYcJzqrrzdR6a+I0vQ4/R+SoODXyAjscQ/4mzuNzySaMCd+hyVxitSY1+L2fjPD1Gbn+ibNqRmwQeLw== + dependencies: + "@kurkle/color" "^0.3.0" + +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.5.1, chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + +chrome-trace-event@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" + integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.5.0: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + +cli-width@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" + integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-2.0.0.tgz#03ff6b1b5aec9bb3cf1ed82400c2790dfcd01d2d" + integrity sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-parse@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/color-parse/-/color-parse-2.0.2.tgz#37b46930424924060988edf25b24e6ffb4a1dc3f" + integrity sha512-eCtOz5w5ttWIUcaKLiktF+DxZO1R9KLNY/xhbV6CkhM7sR3GhVghmt6X6yOnzeaM24po+Z9/S1apbXMwA3Iepw== + dependencies: + color-name "^2.0.0" + +color-rgba@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/color-rgba/-/color-rgba-3.0.0.tgz#77090bdcdb2951c1735e20099ddd50401675375b" + integrity sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg== + dependencies: + color-parse "^2.0.0" + color-space "^2.0.0" + +color-space@^2.0.0, color-space@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-space/-/color-space-2.0.1.tgz#da39871175baf4a5785ba519397df04b8d67e0fa" + integrity sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA== + +colorette@^2.0.10: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +common-path-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" + integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== + +compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +connect-history-api-fallback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" + integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== + +connect@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +convert-source-map@^1.5.1, convert-source-map@^1.7.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" + integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== + +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +copy-anything@^2.0.1: + version "2.0.6" + resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.6.tgz#092454ea9584a7b7ad5573062b2a87f5900fc480" + integrity sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw== + dependencies: + is-what "^3.14.1" + +copy-webpack-plugin@11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz#96d4dbdb5f73d02dd72d0528d1958721ab72e04a" + integrity sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ== + dependencies: + fast-glob "^3.2.11" + glob-parent "^6.0.1" + globby "^13.1.1" + normalize-path "^3.0.0" + schema-utils "^4.0.0" + serialize-javascript "^6.0.0" + +core-js-compat@^3.31.0, core-js-compat@^3.34.0: + version "3.37.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.37.1.tgz#c844310c7852f4bdf49b8d339730b97e17ff09ee" + integrity sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg== + dependencies: + browserslist "^4.23.0" + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cosmiconfig@^8.1.3: + version "8.3.6" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" + integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== + dependencies: + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + path-type "^4.0.0" + +cosmiconfig@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== + dependencies: + env-paths "^2.2.1" + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + +critters@0.0.22: + version "0.0.22" + resolved "https://registry.yarnpkg.com/critters/-/critters-0.0.22.tgz#ce76b1cbc70078c89d23725646357e3850236dae" + integrity sha512-NU7DEcQZM2Dy8XTKFHxtdnIM/drE312j2T4PCVaSUcS0oBeyT/NImpRw/Ap0zOr/1SE7SgPK9tGPg1WK/sVakw== + dependencies: + chalk "^4.1.0" + css-select "^5.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.2" + htmlparser2 "^8.0.2" + postcss "^8.4.23" + postcss-media-query-parser "^0.2.3" + +cross-spawn@^7.0.0, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +css-loader@6.10.0: + version "6.10.0" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.10.0.tgz#7c172b270ec7b833951b52c348861206b184a4b7" + integrity sha512-LTSA/jWbwdMlk+rhmElbDR2vbtQoTBPr7fkJE+mxrHj+7ru0hUmHafDRzWIjIHTwpitWVaqY2/UWGRca3yUgRw== + dependencies: + icss-utils "^5.1.0" + postcss "^8.4.33" + postcss-modules-extract-imports "^3.0.0" + postcss-modules-local-by-default "^4.0.4" + postcss-modules-scope "^3.1.1" + postcss-modules-values "^4.0.0" + postcss-value-parser "^4.2.0" + semver "^7.5.4" + +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== + +date-format@^4.0.14: + version "4.0.14" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" + integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + +default-gateway@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" + integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== + dependencies: + execa "^5.0.0" + +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-node@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" + integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dns-packet@^5.2.2: + version "5.6.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.1.tgz#ae888ad425a9d1478a0674256ab866de1012cf2f" + integrity sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw== + dependencies: + "@leichtgewicht/ip-codec" "^2.0.1" + +dom-serialize@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" + integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + +earcut@^2.2.3: + version "2.2.4" + resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a" + integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ== + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +echarts@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/echarts/-/echarts-5.5.0.tgz#c13945a7f3acdd67c134d8a9ac67e917830113ac" + integrity sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw== + dependencies: + tslib "2.3.0" + zrender "5.5.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.4.668: + version "1.4.788" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.788.tgz#a3545959d5cfa0a266d3e551386c040be34e7e06" + integrity sha512-ubp5+Ev/VV8KuRoWnfP2QF2Bg+O2ZFdb49DiiNbz2VmgkIqrnyYaqIOqj8A6K/3p1xV0QcU5hBQ1+BmB6ot1OA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +encoding@^0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + +engine.io-parser@~5.2.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.2.tgz#37b48e2d23116919a3453738c5720455e64e1c49" + integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== + +engine.io@~6.5.2: + version "6.5.4" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.4.tgz#6822debf324e781add2254e912f8568508850cdc" + integrity sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.11.0" + +enhanced-resolve@^5.15.0: + version "5.16.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" + integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +entities@^4.2.0, entities@^4.3.0, entities@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +env-paths@^2.2.0, env-paths@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + +errno@^0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-module-lexer@^1.2.1: + version "1.5.3" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.3.tgz#25969419de9c0b1fbe54279789023e8a9a788412" + integrity sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg== + +esbuild-wasm@0.20.1: + version "0.20.1" + resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.20.1.tgz#fdc14b95e3e16ec8e082dd641edb96140c1723f7" + integrity sha512-6v/WJubRsjxBbQdz6izgvx7LsVFvVaGmSdwrFHmEzoVgfXL89hkKPoQHsnVI2ngOkcBUQT9kmAM1hVL1k/Av4A== + +esbuild@0.20.1: + version "0.20.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.1.tgz#1e4cbb380ad1959db7609cb9573ee77257724a3e" + integrity sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA== + optionalDependencies: + "@esbuild/aix-ppc64" "0.20.1" + "@esbuild/android-arm" "0.20.1" + "@esbuild/android-arm64" "0.20.1" + "@esbuild/android-x64" "0.20.1" + "@esbuild/darwin-arm64" "0.20.1" + "@esbuild/darwin-x64" "0.20.1" + "@esbuild/freebsd-arm64" "0.20.1" + "@esbuild/freebsd-x64" "0.20.1" + "@esbuild/linux-arm" "0.20.1" + "@esbuild/linux-arm64" "0.20.1" + "@esbuild/linux-ia32" "0.20.1" + "@esbuild/linux-loong64" "0.20.1" + "@esbuild/linux-mips64el" "0.20.1" + "@esbuild/linux-ppc64" "0.20.1" + "@esbuild/linux-riscv64" "0.20.1" + "@esbuild/linux-s390x" "0.20.1" + "@esbuild/linux-x64" "0.20.1" + "@esbuild/netbsd-x64" "0.20.1" + "@esbuild/openbsd-x64" "0.20.1" + "@esbuild/sunos-x64" "0.20.1" + "@esbuild/win32-arm64" "0.20.1" + "@esbuild/win32-ia32" "0.20.1" + "@esbuild/win32-x64" "0.20.1" + +esbuild@^0.19.3: + version "0.19.12" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.12.tgz#dc82ee5dc79e82f5a5c3b4323a2a641827db3e04" + integrity sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.19.12" + "@esbuild/android-arm" "0.19.12" + "@esbuild/android-arm64" "0.19.12" + "@esbuild/android-x64" "0.19.12" + "@esbuild/darwin-arm64" "0.19.12" + "@esbuild/darwin-x64" "0.19.12" + "@esbuild/freebsd-arm64" "0.19.12" + "@esbuild/freebsd-x64" "0.19.12" + "@esbuild/linux-arm" "0.19.12" + "@esbuild/linux-arm64" "0.19.12" + "@esbuild/linux-ia32" "0.19.12" + "@esbuild/linux-loong64" "0.19.12" + "@esbuild/linux-mips64el" "0.19.12" + "@esbuild/linux-ppc64" "0.19.12" + "@esbuild/linux-riscv64" "0.19.12" + "@esbuild/linux-s390x" "0.19.12" + "@esbuild/linux-x64" "0.19.12" + "@esbuild/netbsd-x64" "0.19.12" + "@esbuild/openbsd-x64" "0.19.12" + "@esbuild/sunos-x64" "0.19.12" + "@esbuild/win32-arm64" "0.19.12" + "@esbuild/win32-ia32" "0.19.12" + "@esbuild/win32-x64" "0.19.12" + +escalade@^3.1.1, escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exponential-backoff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== + +express@^4.17.3: + version "4.19.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" + integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.2" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.6.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@3.3.2, fast-glob@^3.2.11, fast-glob@^3.3.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + 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" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fastq@^1.6.0: + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== + dependencies: + reusify "^1.0.4" + +faye-websocket@^0.11.3: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== + dependencies: + websocket-driver ">=0.5.1" + +figures@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-cache-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-4.0.0.tgz#a30ee0448f81a3990708f6453633c733e2f6eec2" + integrity sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg== + dependencies: + common-path-prefix "^3.0.0" + pkg-dir "^7.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" + integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== + dependencies: + locate-path "^7.1.0" + path-exists "^5.0.0" + +flat@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-6.0.1.tgz#09070cf918293b401577f20843edeadf4d3e8755" + integrity sha512-/3FfIa8mbrg3xE7+wAhWeV+bd7L2Mof+xtZb5dRDKZ+wDvYJK4WDYeIOuOhre5Yv5aQObZrlbRmk3RTSiuQBtw== + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.7: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== + +follow-redirects@^1.0.0: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + +foreground-child@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fraction.js@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" + integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs-extra@^11.0.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs-minipass@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54" + integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw== + dependencies: + minipass "^7.0.3" + +fs-monkey@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.6.tgz#8ead082953e88d992cf3ff844faa907b26756da2" + integrity sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +geotiff@^2.0.7: + version "2.1.3" + resolved "https://registry.yarnpkg.com/geotiff/-/geotiff-2.1.3.tgz#993f40f2aa6aa65fb1e0451d86dd22ca8e66910c" + integrity sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA== + dependencies: + "@petamoriken/float16" "^3.4.7" + lerc "^3.0.0" + pako "^2.0.4" + parse-headers "^2.0.2" + quick-lru "^6.1.1" + web-worker "^1.2.0" + xml-utils "^1.0.2" + zstddec "^0.1.0" + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + 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" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@^10.0.0, glob@^10.2.2, glob@^10.3.10: + version "10.4.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2" + integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + path-scurry "^1.11.1" + +glob@^7.1.3, glob@^7.1.4, glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + 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" + +glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globby@^13.1.1: + version "13.2.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" + integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.3.0" + ignore "^5.2.4" + merge2 "^1.4.1" + slash "^4.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +hosted-git-info@^7.0.0: + version "7.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.2.tgz#9b751acac097757667f30114607ef7b661ff4f17" + integrity sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w== + dependencies: + lru-cache "^10.0.1" + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + integrity sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ== + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-entities@^2.3.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" + integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +htmlparser2@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + entities "^4.4.0" + +http-cache-semantics@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-parser-js@>=0.5.1: + version "0.5.8" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" + integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== + +http-proxy-agent@^7.0.0: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +http-proxy-middleware@2.0.6, http-proxy-middleware@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" + integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== + dependencies: + "@types/http-proxy" "^1.17.8" + http-proxy "^1.18.1" + is-glob "^4.0.1" + is-plain-obj "^3.0.0" + micromatch "^4.0.2" + +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +https-proxy-agent@7.0.4, https-proxy-agent@^7.0.1: + version "7.0.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" + integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== + dependencies: + agent-base "^7.0.2" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.2, iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +icss-utils@^5.0.0, icss-utils@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" + integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== + +ieee754@^1.1.12, ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore-walk@^6.0.4: + version "6.0.5" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.5.tgz#ef8d61eab7da169078723d1f82833b36e200b0dd" + integrity sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A== + dependencies: + minimatch "^9.0.0" + +ignore@^5.2.4: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + +image-size@~0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== + +immutable@^4.0.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.6.tgz#6a05f7858213238e587fb83586ffa3b4b27f0447" + integrity sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ== + +import-fresh@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== + +ini@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/ini/-/ini-4.1.2.tgz#7f646dbd9caea595e61f88ef60bfff8b01f8130a" + integrity sha512-AMB1mvwR1pyBFY/nSevUX6y8nJWS63/SzUKD3JyQn97s4xgIdgQPT75IRouIiBAN4yLQBUShNYVW0+UG25daCw== + +inquirer@9.2.15: + version "9.2.15" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.2.15.tgz#2135a36190a6e5c92f5d205e0af1fea36b9d3492" + integrity sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg== + dependencies: + "@ljharb/through" "^2.3.12" + ansi-escapes "^4.3.2" + chalk "^5.3.0" + cli-cursor "^3.1.0" + cli-width "^4.1.0" + external-editor "^3.1.0" + figures "^3.2.0" + lodash "^4.17.21" + mute-stream "1.0.0" + ora "^5.4.1" + run-async "^3.0.0" + rxjs "^7.8.1" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wrap-ansi "^6.2.0" + +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +ipaddr.js@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz#d33fa7bac284f4de7af949638c9d68157c6b92e8" + integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-core-module@^2.13.0, is-core-module@^2.8.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" + integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-what@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" + integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isbinaryfile@^4.0.8: + version "4.0.10" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" + integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.0.5: + version "3.1.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jackspeak@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.1.2.tgz#eada67ea949c6b71de50f1b09c92a961897b90ab" + integrity sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + +jasmine-core@^4.1.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-4.6.1.tgz#5ebb8afa07282078f8d7b15871737a83b74e58f2" + integrity sha512-VYz/BjjmC3klLJlLwA4Kw8ytk0zDSmbbDLNs794VnWmkcCB7I9aAL/D48VNQtmITyPvea2C3jdUMfc3kAoy0PQ== + +jasmine-core@~5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-5.1.2.tgz#8f2789faa79ef1ffad7abab6bff8d4bd661094f7" + integrity sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA== + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jiti@^1.20.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" + integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== + +json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-parse-even-better-errors@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz#b43d35e89c0f3be6b5fbbe9dc6c82467b30c28da" + integrity sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json5@^2.1.2, json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonc-parser@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonparse@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + +karma-chrome-launcher@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" + integrity sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q== + dependencies: + which "^1.2.1" + +karma-coverage@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-2.2.1.tgz#e1cc074f93ace9dc4fb7e7aeca7135879c2e358c" + integrity sha512-yj7hbequkQP2qOSb20GuNSIyE//PgJWHwC2IydLE6XRtsnaflv+/OSGNssPjobYUlhVVagy99TQpqUt3vAUG7A== + dependencies: + istanbul-lib-coverage "^3.2.0" + istanbul-lib-instrument "^5.1.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.1" + istanbul-reports "^3.0.5" + minimatch "^3.0.4" + +karma-jasmine-html-reporter@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.1.0.tgz#f951ad00b08d61d03595402c914d1a589c4930e3" + integrity sha512-sPQE1+nlsn6Hwb5t+HHwyy0A1FNCVKuL1192b+XNauMYWThz2kweiBVW1DqloRpVvZIJkIoHVB7XRpK78n1xbQ== + +karma-jasmine@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-5.1.0.tgz#3af4558a6502fa16856a0f346ec2193d4b884b2f" + integrity sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ== + dependencies: + jasmine-core "^4.1.0" + +karma-source-map-support@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz#58526ceccf7e8730e56effd97a4de8d712ac0d6b" + integrity sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A== + dependencies: + source-map-support "^0.5.5" + +karma@~6.4.0: + version "6.4.3" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.3.tgz#763e500f99597218bbb536de1a14acc4ceea7ce8" + integrity sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q== + dependencies: + "@colors/colors" "1.5.0" + body-parser "^1.19.0" + braces "^3.0.2" + chokidar "^3.5.1" + connect "^3.7.0" + di "^0.0.1" + dom-serialize "^2.2.1" + glob "^7.1.7" + graceful-fs "^4.2.6" + http-proxy "^1.18.1" + isbinaryfile "^4.0.8" + lodash "^4.17.21" + log4js "^6.4.1" + mime "^2.5.2" + minimatch "^3.0.4" + mkdirp "^0.5.5" + qjobs "^1.2.0" + range-parser "^1.2.1" + rimraf "^3.0.2" + socket.io "^4.7.2" + source-map "^0.6.1" + tmp "^0.2.1" + ua-parser-js "^0.7.30" + yargs "^16.1.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +klona@^2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" + integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== + +launch-editor@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.6.1.tgz#f259c9ef95cbc9425620bbbd14b468fcdb4ffe3c" + integrity sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw== + dependencies: + picocolors "^1.0.0" + shell-quote "^1.8.1" + +lerc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lerc/-/lerc-3.0.0.tgz#36f36fbd4ba46f0abf4833799fff2e7d6865f5cb" + integrity sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww== + +less-loader@11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-11.1.0.tgz#a452384259bdf8e4f6d5fdcc39543609e6313f82" + integrity sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug== + dependencies: + klona "^2.0.4" + +less@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/less/-/less-4.2.0.tgz#cbefbfaa14a4cd388e2099b2b51f956e1465c450" + integrity sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA== + dependencies: + copy-anything "^2.0.1" + parse-node-version "^1.0.1" + tslib "^2.3.0" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + make-dir "^2.1.0" + mime "^1.4.1" + needle "^3.1.0" + source-map "~0.6.0" + +license-webpack-plugin@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz#1e18442ed20b754b82f1adeff42249b81d11aec6" + integrity sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw== + dependencies: + webpack-sources "^3.0.0" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +loader-utils@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" + integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== + +loader-utils@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" + integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" + integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== + dependencies: + p-locate "^6.0.0" + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== + +lodash.kebabcase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g== + +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log4js@^6.4.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" + integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + flatted "^3.2.7" + rfdc "^1.3.0" + streamroller "^3.1.5" + +lru-cache@^10.0.1, lru-cache@^10.2.0: + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +magic-string@0.30.8: + version "0.30.8" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.8.tgz#14e8624246d2bedba70d5462aa99ac9681844613" + integrity sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +make-fetch-happen@^13.0.0, make-fetch-happen@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36" + integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA== + dependencies: + "@npmcli/agent" "^2.0.0" + cacache "^18.0.0" + http-cache-semantics "^4.1.1" + is-lambda "^1.0.1" + minipass "^7.0.2" + minipass-fetch "^3.0.0" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + proc-log "^4.2.0" + promise-retry "^2.0.1" + ssri "^10.0.0" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +memfs@^3.4.12, memfs@^3.4.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" + integrity sha512-EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ== + dependencies: + fs-monkey "^1.0.4" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.2, micromatch@^4.0.4: + version "4.0.7" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" + integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0, mime@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mime@^2.5.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mini-css-extract-plugin@2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.8.1.tgz#75245f3f30ce3a56dbdd478084df6fe475f02dc7" + integrity sha512-/1HDlyFRxWIZPI1ZpgqlZ8jMw/1Dp/dl3P0L1jtZ+zVcHqwPhGwaJwKL00WVgfnBy6PWCde9W65or7IIETImuA== + dependencies: + schema-utils "^4.0.0" + tapable "^2.2.1" + +minimalistic-assert@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.0, minimatch@^9.0.4: + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== + dependencies: + minipass "^7.0.3" + +minipass-fetch@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.5.tgz#f0f97e40580affc4a35cc4a1349f05ae36cb1e4c" + integrity sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg== + dependencies: + minipass "^7.0.3" + minipass-sized "^1.0.3" + minizlib "^2.1.2" + optionalDependencies: + encoding "^0.1.13" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-json-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" + integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== + dependencies: + jsonparse "^1.3.1" + minipass "^3.0.0" + +minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + +minipass@^3.0.0: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + +minizlib@^2.1.1, minizlib@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mrmime@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" + integrity sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multicast-dns@^7.2.5: + version "7.2.5" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" + integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== + dependencies: + dns-packet "^5.2.2" + thunky "^1.0.2" + +mute-stream@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" + integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== + +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + +needle@^3.1.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-3.3.1.tgz#63f75aec580c2e77e209f3f324e2cdf3d29bd049" + integrity sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q== + dependencies: + iconv-lite "^0.6.3" + sax "^1.2.4" + +negotiator@0.6.3, negotiator@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +ngx-echarts@^17.1.0: + version "17.2.0" + resolved "https://registry.yarnpkg.com/ngx-echarts/-/ngx-echarts-17.2.0.tgz#df56d8822e45f4a2d487a08cee6717dcd0e883e1" + integrity sha512-i3XDE9d53zmJH4bp8RQ/271oPlhBkczO1M3VtWk8nCXdxQq9qx8UckjWEQ7oV1AbSDLGK5sRiFu5EaY5hvdWPA== + dependencies: + tslib "^2.3.0" + +nice-napi@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nice-napi/-/nice-napi-1.0.2.tgz#dc0ab5a1eac20ce548802fc5686eaa6bc654927b" + integrity sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA== + dependencies: + node-addon-api "^3.0.0" + node-gyp-build "^4.2.2" + +node-addon-api@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" + integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== + +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + +node-gyp-build@^4.2.2: + version "4.8.1" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5" + integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw== + +node-gyp@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.1.0.tgz#75e6f223f2acb4026866c26a2ead6aab75a8ca7e" + integrity sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA== + dependencies: + env-paths "^2.2.0" + exponential-backoff "^3.1.1" + glob "^10.3.10" + graceful-fs "^4.2.6" + make-fetch-happen "^13.0.0" + nopt "^7.0.0" + proc-log "^3.0.0" + semver "^7.3.5" + tar "^6.1.2" + which "^4.0.0" + +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + +nopt@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7" + integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== + dependencies: + abbrev "^2.0.0" + +normalize-package-data@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.1.tgz#fa69e9452210f0fabf4d79ee08d0c2870c51ed88" + integrity sha512-6rvCfeRW+OEZagAB4lMLSNuTNYZWLVtKccK79VSTf//yTY5VOCgcpH80O+bZK8Neps7pUnd5G+QlMg1yV/2iZQ== + dependencies: + hosted-git-info "^7.0.0" + is-core-module "^2.8.1" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== + +npm-bundled@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-3.0.1.tgz#cca73e15560237696254b10170d8f86dad62da25" + integrity sha512-+AvaheE/ww1JEwRHOrn4WHNzOxGtVp+adrg2AeZS/7KuxGUYFuBta98wYpfHBbJp6Tg6j1NKSEVHNcfZzJHQwQ== + dependencies: + npm-normalize-package-bin "^3.0.0" + +npm-install-checks@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.3.0.tgz#046552d8920e801fa9f919cad569545d60e826fe" + integrity sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw== + dependencies: + semver "^7.1.1" + +npm-normalize-package-bin@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832" + integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ== + +npm-package-arg@11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.1.tgz#f208b0022c29240a1c532a449bdde3f0a4708ebc" + integrity sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ== + dependencies: + hosted-git-info "^7.0.0" + proc-log "^3.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" + +npm-package-arg@^11.0.0: + version "11.0.2" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.2.tgz#1ef8006c4a9e9204ddde403035f7ff7d718251ca" + integrity sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw== + dependencies: + hosted-git-info "^7.0.0" + proc-log "^4.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" + +npm-packlist@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-8.0.2.tgz#5b8d1d906d96d21c85ebbeed2cf54147477c8478" + integrity sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA== + dependencies: + ignore-walk "^6.0.4" + +npm-pick-manifest@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-9.0.0.tgz#f87a4c134504a2c7931f2bb8733126e3c3bb7e8f" + integrity sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg== + dependencies: + npm-install-checks "^6.0.0" + npm-normalize-package-bin "^3.0.0" + npm-package-arg "^11.0.0" + semver "^7.3.5" + +npm-pick-manifest@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-9.0.1.tgz#c90658bd726fe5bca9d2869f3e99359b8fcda046" + integrity sha512-Udm1f0l2nXb3wxDpKjfohwgdFUSV50UVwzEIpDXVsbDMXVIEF81a/i0UhuQbhrPMMmdiq3+YMFLFIRVLs3hxQw== + dependencies: + npm-install-checks "^6.0.0" + npm-normalize-package-bin "^3.0.0" + npm-package-arg "^11.0.0" + semver "^7.3.5" + +npm-registry-fetch@^16.0.0: + version "16.2.1" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-16.2.1.tgz#c367df2d770f915da069ff19fd31762f4bca3ef1" + integrity sha512-8l+7jxhim55S85fjiDGJ1rZXBWGtRLi1OSb4Z3BPLObPuIaeKRlPRiYMSHU4/81ck3t71Z+UwDDl47gcpmfQQA== + dependencies: + "@npmcli/redact" "^1.1.0" + make-fetch-happen "^13.0.0" + minipass "^7.0.2" + minipass-fetch "^3.0.0" + minipass-json-stream "^1.0.1" + minizlib "^2.1.2" + npm-package-arg "^11.0.0" + proc-log "^4.0.0" + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + +obuf@^1.0.0, obuf@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== + +ol@^9.2.2: + version "9.2.4" + resolved "https://registry.yarnpkg.com/ol/-/ol-9.2.4.tgz#07dcefdceb66ddbde13089bca136f4d4852b772b" + integrity sha512-bsbu4ObaAlbELMIZWnYEvX4Z9jO+OyCBshtODhDKmqYTPEfnKOX3RieCr97tpJkqWTZvyV4tS9UQDvHoCdxS+A== + dependencies: + color-rgba "^3.0.0" + color-space "^2.0.1" + earcut "^2.2.3" + geotiff "^2.0.7" + pbf "3.2.1" + rbush "^3.0.1" + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@8.4.2, open@^8.0.9: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +ora@5.4.1, ora@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" + integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== + dependencies: + p-limit "^4.0.0" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-retry@^4.5.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" + integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== + dependencies: + "@types/retry" "0.12.0" + retry "^0.13.1" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pacote@17.0.6: + version "17.0.6" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-17.0.6.tgz#874bb59cda5d44ab784d0b6530fcb4a7d9b76a60" + integrity sha512-cJKrW21VRE8vVTRskJo78c/RCvwJCn1f4qgfxL4w77SOWrTCRcmfkYHlHtS0gqpgjv3zhXflRtgsrUCX5xwNnQ== + dependencies: + "@npmcli/git" "^5.0.0" + "@npmcli/installed-package-contents" "^2.0.1" + "@npmcli/promise-spawn" "^7.0.0" + "@npmcli/run-script" "^7.0.0" + cacache "^18.0.0" + fs-minipass "^3.0.0" + minipass "^7.0.2" + npm-package-arg "^11.0.0" + npm-packlist "^8.0.0" + npm-pick-manifest "^9.0.0" + npm-registry-fetch "^16.0.0" + proc-log "^3.0.0" + promise-retry "^2.0.1" + read-package-json "^7.0.0" + read-package-json-fast "^3.0.0" + sigstore "^2.2.0" + ssri "^10.0.0" + tar "^6.1.11" + +pako@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-headers@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" + integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parse-node-version@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + +parse5-html-rewriting-stream@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-7.0.0.tgz#e376d3e762d2950ccbb6bb59823fc1d7e9fdac36" + integrity sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg== + dependencies: + entities "^4.3.0" + parse5 "^7.0.0" + parse5-sax-parser "^7.0.0" + +parse5-sax-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz#4c05064254f0488676aca75fb39ca069ec96dee5" + integrity sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg== + dependencies: + parse5 "^7.0.0" + +parse5@^7.0.0, parse5@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + +parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-exists@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" + integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pbf@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/pbf/-/pbf-3.2.1.tgz#b4c1b9e72af966cd82c6531691115cc0409ffe2a" + integrity sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ== + dependencies: + ieee754 "^1.1.12" + resolve-protobuf-schema "^2.1.0" + +picocolors@^1.0.0, picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + +picomatch@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.1.tgz#68c26c8837399e5819edce48590412ea07f17a07" + integrity sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +piscina@4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/piscina/-/piscina-4.4.0.tgz#e3af8e5721d8fad08c6ccaf8a64f9f42279efbb5" + integrity sha512-+AQduEJefrOApE4bV7KRmp3N2JnnyErlVqq4P/jmko4FPz9Z877BCccl/iB3FdrWSUkvbGV9Kan/KllJgat3Vg== + optionalDependencies: + nice-napi "^1.0.2" + +pkg-dir@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-7.0.0.tgz#8f0c08d6df4476756c5ff29b3282d0bab7517d11" + integrity sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA== + dependencies: + find-up "^6.3.0" + +postcss-loader@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-8.1.1.tgz#2822589e7522927344954acb55bbf26e8b195dfe" + integrity sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ== + dependencies: + cosmiconfig "^9.0.0" + jiti "^1.20.0" + semver "^7.5.4" + +postcss-media-query-parser@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" + integrity sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig== + +postcss-modules-extract-imports@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz#b4497cb85a9c0c4b5aabeb759bb25e8d89f15002" + integrity sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== + +postcss-modules-local-by-default@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz#f1b9bd757a8edf4d8556e8d0f4f894260e3df78f" + integrity sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw== + dependencies: + icss-utils "^5.0.0" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.1.0" + +postcss-modules-scope@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz#a43d28289a169ce2c15c00c4e64c0858e43457d5" + integrity sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ== + dependencies: + postcss-selector-parser "^6.0.4" + +postcss-modules-values@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" + integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== + dependencies: + icss-utils "^5.0.0" + +postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: + version "6.1.0" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.0.tgz#49694cb4e7c649299fea510a29fa6577104bcf53" + integrity sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== + +postcss@8.4.35: + version "8.4.35" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" + integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +postcss@^8.2.14, postcss@^8.4.23, postcss@^8.4.33, postcss@^8.4.35: + version "8.4.38" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" + integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.2.0" + +primeicons@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/primeicons/-/primeicons-7.0.0.tgz#6b25c3fdcb29bb745a3035bdc1ed5902f4a419cf" + integrity sha512-jK3Et9UzwzTsd6tzl2RmwrVY/b8raJ3QZLzoDACj+oTJ0oX7L9Hy+XnVwgo4QVKlKpnP/Ur13SXV/pVh4LzaDw== + +primeng@17.16.1: + version "17.16.1" + resolved "https://registry.yarnpkg.com/primeng/-/primeng-17.16.1.tgz#740db77926f84a16f9ceb4721627cda10b945e25" + integrity sha512-bNCUxdXgT4ikOG/aKA2PW9FCFnD/EtB+fLoGLuQXAGB1PJU72x5c0yQoGFDQcAgx78o3d/4LjZOdOPYwovN9Lg== + dependencies: + tslib "^2.3.0" + +proc-log@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" + integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== + +proc-log@^4.0.0, proc-log@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034" + integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== + +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + +protocol-buffers-schema@^3.3.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz#77bc75a48b2ff142c1ad5b5b90c94cd0fa2efd03" + integrity sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw== + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qjobs@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +quick-lru@^6.1.1: + version "6.1.2" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-6.1.2.tgz#e9a90524108629be35287d0b864e7ad6ceb3659e" + integrity sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ== + +quickselect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018" + integrity sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rbush@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/rbush/-/rbush-3.0.1.tgz#5fafa8a79b3b9afdfe5008403a720cc1de882ecf" + integrity sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w== + dependencies: + quickselect "^2.0.0" + +read-package-json-fast@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049" + integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw== + dependencies: + json-parse-even-better-errors "^3.0.0" + npm-normalize-package-bin "^3.0.0" + +read-package-json@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-7.0.1.tgz#8b5f6aab97a796cfb436516ade24c011d10964a9" + integrity sha512-8PcDiZ8DXUjLf687Ol4BR8Bpm2umR7vhoZOzNRt+uxD9GpBh/K+CAAALVIiYFknmvlmyg7hM7BSNUXPaCCqd0Q== + dependencies: + glob "^10.2.2" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^6.0.0" + npm-normalize-package-bin "^3.0.0" + +readable-stream@^2.0.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.6, readable-stream@^3.4.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +reflect-metadata@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.2.2.tgz#400c845b6cba87a21f2c65c4aeb158f4fa4d9c5b" + integrity sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q== + +regenerate-unicode-properties@^10.1.0: + version "10.1.1" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz#6b0e05489d9076b04c436f318d9b067bba459480" + integrity sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q== + dependencies: + regenerate "^1.4.2" + +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +regenerator-transform@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4" + integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== + dependencies: + "@babel/runtime" "^7.8.4" + +regex-parser@^2.2.11: + version "2.3.0" + resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.3.0.tgz#4bb61461b1a19b8b913f3960364bb57887f920ee" + integrity sha512-TVILVSz2jY5D47F4mA4MppkBrafEaiUWJO/TcZHEIuI13AqoZMkK1WMA4Om1YkYbTx+9Ki1/tSUXbceyr9saRg== + +regexpu-core@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" + integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== + dependencies: + "@babel/regjsgen" "^0.8.0" + regenerate "^1.4.2" + regenerate-unicode-properties "^10.1.0" + regjsparser "^0.9.1" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.1.0" + +regjsparser@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" + integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== + dependencies: + jsesc "~0.5.0" + +replace-in-file@^7.0.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-7.2.0.tgz#bd66f97202ae2196fc9126d3bceab1dda68b7cc2" + integrity sha512-CiLXVop3o8/h2Kd1PwKPPimmS9wUV0Ki6Fl8+1ITD35nB3Gl/PrW5IONpTE0AXk0z4v8WYcpEpdeZqMXvSnWpg== + dependencies: + chalk "^4.1.2" + glob "^8.1.0" + yargs "^17.7.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-protobuf-schema@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz#9ca9a9e69cf192bbdaf1006ec1973948aa4a3758" + integrity sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ== + dependencies: + protocol-buffers-schema "^3.3.1" + +resolve-url-loader@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz#ee3142fb1f1e0d9db9524d539cfa166e9314f795" + integrity sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg== + dependencies: + adjust-sourcemap-loader "^4.0.0" + convert-source-map "^1.7.0" + loader-utils "^2.0.0" + postcss "^8.2.14" + source-map "0.6.1" + +resolve@1.22.8, resolve@^1.14.2: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rfdc@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rollup@^4.2.0: + version "4.18.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.18.0.tgz#497f60f0c5308e4602cf41136339fbf87d5f5dda" + integrity sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg== + dependencies: + "@types/estree" "1.0.5" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.18.0" + "@rollup/rollup-android-arm64" "4.18.0" + "@rollup/rollup-darwin-arm64" "4.18.0" + "@rollup/rollup-darwin-x64" "4.18.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.18.0" + "@rollup/rollup-linux-arm-musleabihf" "4.18.0" + "@rollup/rollup-linux-arm64-gnu" "4.18.0" + "@rollup/rollup-linux-arm64-musl" "4.18.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.18.0" + "@rollup/rollup-linux-riscv64-gnu" "4.18.0" + "@rollup/rollup-linux-s390x-gnu" "4.18.0" + "@rollup/rollup-linux-x64-gnu" "4.18.0" + "@rollup/rollup-linux-x64-musl" "4.18.0" + "@rollup/rollup-win32-arm64-msvc" "4.18.0" + "@rollup/rollup-win32-ia32-msvc" "4.18.0" + "@rollup/rollup-win32-x64-msvc" "4.18.0" + fsevents "~2.3.2" + +run-async@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-3.0.0.tgz#42a432f6d76c689522058984384df28be379daad" + integrity sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rxjs@7.8.1, rxjs@^7.8.1, rxjs@~7.8.0: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +safevalues@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/safevalues/-/safevalues-0.3.4.tgz#82e846a02b6956d7d40bf9f41e92e13fce0186db" + integrity sha512-LRneZZRXNgjzwG4bDQdOTSbze3fHm1EAKN/8bePxnlEZiBmkYEDggaHbuvHI9/hoqHbGfsEA7tWS9GhYHZBBsw== + +sass-loader@14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-14.1.1.tgz#2c9d2277c5b1c5fe789cd0570c046d8ad23cb7ca" + integrity sha512-QX8AasDg75monlybel38BZ49JP5Z+uSKfKwF2rO7S74BywaRmGQMUBw9dtkS+ekyM/QnP+NOrRYq8ABMZ9G8jw== + dependencies: + neo-async "^2.6.2" + +sass@1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.71.1.tgz#dfb09c63ce63f89353777bbd4a88c0a38386ee54" + integrity sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg== + dependencies: + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" + source-map-js ">=0.6.2 <2.0.0" + +sax@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" + integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== + +schema-utils@^3.1.1, schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" + integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== + +selfsigned@^2.1.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" + integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== + dependencies: + "@types/node-forge" "^1.3.0" + node-forge "^1" + +semver@7.6.0: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + +semver@^5.6.0: + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.0.0, semver@^7.1.1, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serialize-javascript@^6.0.0, serialize-javascript@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + 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" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shell-quote@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + +side-channel@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +sigstore@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-2.3.1.tgz#0755dd2cc4820f2e922506da54d3d628e13bfa39" + integrity sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ== + dependencies: + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.0.0" + "@sigstore/protobuf-specs" "^0.3.2" + "@sigstore/sign" "^2.3.2" + "@sigstore/tuf" "^2.3.4" + "@sigstore/verify" "^1.2.1" + +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socket.io-adapter@~2.5.2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz#4fdb1358667f6d68f25343353bd99bd11ee41006" + integrity sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg== + dependencies: + debug "~4.3.4" + ws "~8.11.0" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@^4.7.2: + version "4.7.5" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" + integrity sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + cors "~2.8.5" + debug "~4.3.2" + engine.io "~6.5.2" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.4" + +sockjs@^0.3.24: + version "0.3.24" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" + integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== + dependencies: + faye-websocket "^0.11.3" + uuid "^8.3.2" + websocket-driver "^0.7.4" + +socks-proxy-agent@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz#6b2da3d77364fde6292e810b496cb70440b9b89d" + integrity sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A== + dependencies: + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.7.1" + +socks@^2.7.1: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2, source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + +source-map-loader@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-5.0.0.tgz#f593a916e1cc54471cfc8851b905c8a845fc7e38" + integrity sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA== + dependencies: + iconv-lite "^0.6.3" + source-map-js "^1.0.2" + +source-map-support@0.5.21, source-map-support@^0.5.5, source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" + integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.18" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz#22aa922dcf2f2885a6494a261f2d8b75345d0326" + integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ== + +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" + +spdy@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== + dependencies: + debug "^4.1.0" + handle-thing "^2.0.0" + http-deceiver "^1.2.7" + select-hose "^2.0.0" + spdy-transport "^3.0.0" + +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +ssri@^10.0.0: + version "10.0.6" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5" + integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ== + dependencies: + minipass "^7.0.3" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +"statuses@>= 1.4.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + +streamroller@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + fs-extra "^8.1.0" + +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +symbol-observable@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" + integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== + +tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +tar@^6.1.11, tar@^6.1.2: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + +terser@5.29.1: + version "5.29.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.29.1.tgz#44e58045b70c09792ba14bfb7b4e14ca8755b9fa" + integrity sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +terser@^5.26.0: + version "5.31.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.0.tgz#06eef86f17007dbad4593f11a574c7f5eb02c6a1" + integrity sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +thunky@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +tmp@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tree-kill@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + +tslib@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" + integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== + +tslib@2.6.2, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + +tuf-js@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-2.2.1.tgz#fdd8794b644af1a75c7aaa2b197ddffeb2911b56" + integrity sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA== + dependencies: + "@tufjs/models" "2.0.1" + debug "^4.3.4" + make-fetch-happen "^13.0.1" + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typed-assert@^1.0.8: + version "1.0.9" + resolved "https://registry.yarnpkg.com/typed-assert/-/typed-assert-1.0.9.tgz#8af9d4f93432c4970ec717e3006f33f135b06213" + integrity sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg== + +typescript@~5.4.2: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + +ua-parser-js@^0.7.30: + version "0.7.38" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.38.tgz#f497d8a4dc1fec6e854e5caa4b2f9913422ef054" + integrity sha512-fYmIy7fKTSFAhG3fuPlubeGaMoAd6r0rSnfEsO5nEY55i26KSLt9EH7PLQiiqPUhNqYIJvSkTy1oArIcXAbPbA== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +undici@6.11.1: + version "6.11.1" + resolved "https://registry.yarnpkg.com/undici/-/undici-6.11.1.tgz#75ab573677885b421ca2e6f5f17ff1185b24c68d" + integrity sha512-KyhzaLJnV1qa3BSHdj4AZ2ndqI0QWPxYzaIOio0WzcEJB9gvuysprJSLtpvc2D9mhR9jPDUk7xlJlZbH2KR5iw== + +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== + +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + +unicode-match-property-value-ecmascript@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" + integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== + +unicode-property-aliases-ecmascript@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" + integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== + +unique-filename@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" + integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== + dependencies: + unique-slug "^4.0.0" + +unique-slug@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" + integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== + dependencies: + imurmurhash "^0.1.4" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.13: + version "1.0.16" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" + integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + +uri-js@^4.2.2, uri-js@^4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +validate-npm-package-license@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validate-npm-package-name@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz#a316573e9b49f3ccd90dbb6eb52b3f06c6d604e8" + integrity sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +vite@5.1.7: + version "5.1.7" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.1.7.tgz#9f685a2c4c70707fef6d37341b0e809c366da619" + integrity sha512-sgnEEFTZYMui/sTlH1/XEnVNHMujOahPLGMxn1+5sIT45Xjng1Ec1K78jRP15dSmVgg5WBin9yO81j3o9OxofA== + dependencies: + esbuild "^0.19.3" + postcss "^8.4.35" + rollup "^4.2.0" + optionalDependencies: + fsevents "~2.3.3" + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== + +watchpack@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +watchpack@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff" + integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +wbuf@^1.1.0, wbuf@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== + dependencies: + minimalistic-assert "^1.0.0" + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + +web-worker@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.3.0.tgz#e5f2df5c7fe356755a5fb8f8410d4312627e6776" + integrity sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA== + +webpack-dev-middleware@6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-6.1.2.tgz#0463232e59b7d7330fa154121528d484d36eb973" + integrity sha512-Wu+EHmX326YPYUpQLKmKbTyZZJIB8/n6R09pTmB03kJmnMsVPTo9COzHZFr01txwaCAuZvfBJE4ZCHRcKs5JaQ== + dependencies: + colorette "^2.0.10" + memfs "^3.4.12" + mime-types "^2.1.31" + range-parser "^1.2.1" + schema-utils "^4.0.0" + +webpack-dev-middleware@^5.3.1: + version "5.3.4" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz#eb7b39281cbce10e104eb2b8bf2b63fce49a3517" + integrity sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q== + dependencies: + colorette "^2.0.10" + memfs "^3.4.3" + mime-types "^2.1.31" + range-parser "^1.2.1" + schema-utils "^4.0.0" + +webpack-dev-server@4.15.1: + version "4.15.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz#8944b29c12760b3a45bdaa70799b17cb91b03df7" + integrity sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA== + dependencies: + "@types/bonjour" "^3.5.9" + "@types/connect-history-api-fallback" "^1.3.5" + "@types/express" "^4.17.13" + "@types/serve-index" "^1.9.1" + "@types/serve-static" "^1.13.10" + "@types/sockjs" "^0.3.33" + "@types/ws" "^8.5.5" + ansi-html-community "^0.0.8" + bonjour-service "^1.0.11" + chokidar "^3.5.3" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^2.0.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.3.2" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.0.1" + launch-editor "^2.6.0" + open "^8.0.9" + p-retry "^4.5.0" + rimraf "^3.0.2" + schema-utils "^4.0.0" + selfsigned "^2.1.1" + serve-index "^1.9.1" + sockjs "^0.3.24" + spdy "^4.0.2" + webpack-dev-middleware "^5.3.1" + ws "^8.13.0" + +webpack-merge@5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.0" + +webpack-sources@^3.0.0, webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack-subresource-integrity@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-5.1.0.tgz#8b7606b033c6ccac14e684267cb7fb1f5c2a132a" + integrity sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q== + dependencies: + typed-assert "^1.0.8" + +webpack@5.90.3: + version "5.90.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.3.tgz#37b8f74d3ded061ba789bb22b31e82eed75bd9ac" + integrity sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.11.5" + "@webassemblyjs/wasm-edit" "^1.11.5" + "@webassemblyjs/wasm-parser" "^1.11.5" + acorn "^8.7.1" + acorn-import-assertions "^1.9.0" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.15.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + +websocket-driver@>=0.5.1, websocket-driver@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +which@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +which@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" + integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== + dependencies: + isexe "^3.1.1" + +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: + name wrap-ansi-cjs + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^8.13.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== + +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +xml-utils@^1.0.2: + version "1.10.1" + resolved "https://registry.yarnpkg.com/xml-utils/-/xml-utils-1.10.1.tgz#fa0c9b38545760532d4cf89003f90c3b24e7200f" + integrity sha512-Dn6vJ1Z9v1tepSjvnCpwk5QqwIPcEFKdgnjqfYOABv1ngSofuAhtlugcUC3ehS1OHdgDWSG6C5mvj+Qm15udTQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@17.7.2, yargs@^17.2.1, yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yocto-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== + +zone.js@~0.14.3: + version "0.14.6" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.14.6.tgz#9a74284f4812b807c97d942e78166cb2da8b5614" + integrity sha512-vyRNFqofdaHVdWAy7v3Bzmn84a1JHWSjpuTZROT/uYn8I3p2cmo7Ro9twFmYRQDPhiYOV7QLk0hhY4JJQVqS6Q== + +zrender@5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/zrender/-/zrender-5.5.0.tgz#54d0d6c4eda81a96d9f60a9cd74dc48ea026bc1e" + integrity sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w== + dependencies: + tslib "2.3.0" + +zstddec@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/zstddec/-/zstddec-0.1.0.tgz#7050f3f0e0c3978562d0c566b3e5a427d2bad7ec" + integrity sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg== diff --git a/indexer-interfaces/package.json b/indexer-interfaces/package.json index a0d8d55486..7146574e17 100644 --- a/indexer-interfaces/package.json +++ b/indexer-interfaces/package.json @@ -21,5 +21,5 @@ "prepack": "npm run build" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/indexer-interfaces/src/interfaces/details-results.interface.ts b/indexer-interfaces/src/interfaces/details-results.interface.ts deleted file mode 100644 index 0d51d7a47d..0000000000 --- a/indexer-interfaces/src/interfaces/details-results.interface.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface IDetailsResults { - id: string; - uuid?: string; - item?: any; - history?: any[]; - row?: any; - [field: string]: any; -} diff --git a/indexer-interfaces/src/interfaces/details/contract.details.ts b/indexer-interfaces/src/interfaces/details/contract.details.ts new file mode 100644 index 0000000000..6c9c390027 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/contract.details.ts @@ -0,0 +1,42 @@ +import { ContractType } from '../../types/index.js'; +import { Details } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Contract options + */ +export interface ContractOptions { + /** + * Contract identifier + */ + contractId: string; + /** + * Description + */ + description: string; + /** + * Contract Type + */ + contractType: ContractType; + /** + * Owner + */ + owner: string; +} + +/** + * Contract analytics + */ +export interface ContractAnalytics { + textSearch?: string; +} + +/** + * Contract + */ +export type Contract = Message; + +/** + * Contract details + */ +export type ContractDetails = Details; diff --git a/indexer-interfaces/src/interfaces/details/details.interface.ts b/indexer-interfaces/src/interfaces/details/details.interface.ts new file mode 100644 index 0000000000..7766090db9 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/details.interface.ts @@ -0,0 +1,57 @@ +import { Message } from '../message.interface.js'; +import { RawMessage } from '../raw-message.interface.js'; +import { NFT } from './nft.details.js'; +import { Token } from './token.details.js'; + +/** + * Deatils result + */ +export interface Details { + /** + * Message identifier + */ + id: string; + /** + * Message UUID + */ + uuid?: string; + /** + * Parsed message + */ + item?: T; + /** + * Raw message + */ + row?: RT; +} + +/** + * Details result with history + */ +export interface DetailsHistory + extends Details { + /** + * Message history + */ + history?: T[]; +} + +/** + * Details result with activity + */ +export interface DetailsActivity + extends Details { + /** + * Entity activity + */ + activity?: AT; +} + +/** + * Details with history and activity + */ +export type DetailsHistoryActivity< + T extends Message, + AT, + RT = RawMessage +> = DetailsHistory & DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/did.details.ts b/indexer-interfaces/src/interfaces/details/did.details.ts new file mode 100644 index 0000000000..5bb9dab371 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/did.details.ts @@ -0,0 +1,37 @@ +import { DetailsHistory } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * DID options + */ +export interface DIDOptions { + /** + * DID + */ + did: string; + + /** + * Relationships + */ + relationships: string[]; +} + +/** + * DID analytics + */ +export interface DIDAnalytics { + /** + * Text search + */ + textSearch?: string; +} + +/** + * DID + */ +export type DID = Message; + +/** + * DID Details + */ +export type DIDDetails = DetailsHistory; diff --git a/indexer-interfaces/src/interfaces/details/index.ts b/indexer-interfaces/src/interfaces/details/index.ts new file mode 100644 index 0000000000..7b73e3a06f --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/index.ts @@ -0,0 +1,15 @@ +export * from './registry.details.js'; +export * from './details.interface.js'; +export * from './registry-user.details.js'; +export * from './policy.details.js'; +export * from './tool.details.js'; +export * from './module.details.js'; +export * from './schema.details.js'; +export * from './role.details.js'; +export * from './vp.details.js'; +export * from './vc.details.js'; +export * from './did.details.js'; +export * from './contract.details.js'; +export * from './topic.details.js'; +export * from './token.details.js'; +export * from './nft.details.js'; diff --git a/indexer-interfaces/src/interfaces/details/module.details.ts b/indexer-interfaces/src/interfaces/details/module.details.ts new file mode 100644 index 0000000000..d3339dda4f --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/module.details.ts @@ -0,0 +1,48 @@ +import { Details } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Module options + */ +export interface ModuleOptions { + /** + * UUID + */ + uuid: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Owner + */ + owner: string; + /** + * Module topic identifier + */ + moduleTopicId: string; +} + +/** + * Module analytics + */ +export interface ModuleAnalytics { + /** + * Text search + */ + textSearch?: string; +} + +/** + * Module + */ +export type Module = Message; + +/** + * Module details + */ +export type ModuleDetails = Details; diff --git a/indexer-interfaces/src/interfaces/details/nft.details.ts b/indexer-interfaces/src/interfaces/details/nft.details.ts new file mode 100644 index 0000000000..7bfcd799f5 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/nft.details.ts @@ -0,0 +1,12 @@ +import { Details } from './details.interface.js'; +import { RawNFT } from '../raw-nft.interface.js'; + +/** + * NFT + */ +export type NFT = RawNFT; + +/** + * NFT details + */ +export type NFTDetails = Details & { history: any[] }; diff --git a/indexer-interfaces/src/interfaces/details/policy.details.ts b/indexer-interfaces/src/interfaces/details/policy.details.ts new file mode 100644 index 0000000000..d88d8204a5 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/policy.details.ts @@ -0,0 +1,134 @@ +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Policy options + */ +export interface PolicyOptions { + /** + * UUID + */ + uuid: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Topic description + */ + topicDescription: string; + /** + * Version + */ + version: string; + /** + * Policy tag + */ + policyTag: string; + /** + * Owner + */ + owner: string; + /** + * Policy topic identifier + */ + policyTopicId: string; + /** + * Instance topic identifier + */ + instanceTopicId: string; + /** + * Synchronization topic identifier + */ + synchronizationTopicId: string; + /** + * Discontinued date + */ + discontinuedDate?: string; +} + +/** + * Policy analytics + */ +export interface PolicyAnalytics { + /** + * Text search + */ + textSearch?: string; + /** + * Tools + */ + tools?: string[]; + /** + * Registry message identifier + */ + registryId?: string; + /** + * Owner + */ + owner?: string; + /** + * Tokens + */ + tokens?: string[]; + /** + * VC count + */ + vcCount?: number; + /** + * VP count + */ + vpCount?: number; + /** + * Tokens count + */ + tokensCount?: number; + /** + * Tags + */ + tags?: string[]; + /** + * Hash + */ + hash?: string; + /** + * Hash map + */ + hashMap?: any; +} + +/** + * Policy activity + */ +export interface PolicyActivity { + /** + * VCs + */ + vcs: number; + /** + * VPs + */ + vps: number; + /** + * Roles + */ + roles: number; + /** + * Schemas + */ + schemas: number; +} + +/** + * Policy + */ +export type Policy = Message; + +/** + * Policy details + */ +export type PolicyDetails = DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/registry-user.details.ts b/indexer-interfaces/src/interfaces/details/registry-user.details.ts new file mode 100644 index 0000000000..aa893b0129 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/registry-user.details.ts @@ -0,0 +1,53 @@ +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Registry user options + */ +export interface RegistryUserOptions { + /** + * DID + */ + did: string; +} + +/** + * Registry user analytics + */ +export interface RegistryUserAnalytics { + /** + * Text search + */ + textSearch?: string; +} + +/** + * Registry user activity + */ +export interface RegistryUserActivity { + /** + * VCs + */ + vcs: number; + /** + * VPs + */ + vps: number; + /** + * Roles + */ + roles: number; +} + +/** + * Registry user + */ +export type RegistryUser = Message; + +/** + * Registry user details + */ +export type RegistryUserDetails = DetailsActivity< + RegistryUser, + RegistryUserActivity +>; diff --git a/indexer-interfaces/src/interfaces/details/registry.details.ts b/indexer-interfaces/src/interfaces/details/registry.details.ts new file mode 100644 index 0000000000..fb794abcf2 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/registry.details.ts @@ -0,0 +1,86 @@ +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Registry options + */ +export interface RegistryOptions { + /** + * DID + */ + did: string; + /** + * Registrant topic identifier + */ + registrantTopicId: string; + /** + * Lang + */ + lang: string; + /** + * Attributes + */ + attributes: any; +} + +/** + * Registry analytics + */ +export interface RegistryAnalytics { + /** + * Text search + */ + textSearch?: string; +} + +/** + * Registry activity + */ +export interface RegistryActivity { + /** + * VCs + */ + vcs: number; + /** + * VPs + */ + vps: number; + /** + * Policies + */ + policies: number; + /** + * Roles + */ + roles: number; + /** + * Tools + */ + tools: number; + /** + * Modules + */ + modules: number; + /** + * Tokens + */ + tokens: number; + /** + * Users + */ + users: number; + /** + * Contracts + */ + contracts: number; +} + +/** + * Registry + */ +export type Registry = Message; + +/** + * Registry details + */ +export type RegistryDetails = DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/role.details.ts b/indexer-interfaces/src/interfaces/details/role.details.ts new file mode 100644 index 0000000000..70420f1637 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/role.details.ts @@ -0,0 +1,54 @@ +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Role options + */ +export interface RoleOptions { + /** + * Issuer + */ + issuer: string; + /** + * Role + */ + role: string; + /** + * Group + */ + group: string; +} + +/** + * Role analytics + */ +export interface RoleAnalytics { + /** + * Text search + */ + textSearch?: string; + /** + * Policy message identifier + */ + policyId?: string; +} + +/** + * Role activity + */ +export interface RoleActivity { + /** + * VCs + */ + vcs: number; +} + +/** + * Role + */ +export type Role = Message; + +/** + * Role details + */ +export type RoleDetails = DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/schema.details.ts b/indexer-interfaces/src/interfaces/details/schema.details.ts new file mode 100644 index 0000000000..e64b5b082c --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/schema.details.ts @@ -0,0 +1,100 @@ +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Schema options + */ +export interface SchemaOptions { + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Entity + */ + entity: string; + /** + * Owner + */ + owner: string; + /** + * UUID + */ + uuid: string; + /** + * Version + */ + version: string; + /** + * Code version + */ + codeVersion: string; + /** + * Relationships + */ + relationships: string[]; +} + +/** + * Child schema + */ +export interface ChildSchema { + /** + * Message identifier + */ + id: string; + /** + * Name + */ + name: string; +} + +/** + * Schema analytics + */ +export interface SchemaAnalytics { + /** + * Text search + */ + textSearch?: string; + /** + * Policy message identifiers + */ + policyIds?: string[]; + /** + * Child schemas identifiers + */ + childSchemas?: ChildSchema[]; + /** + * Schema properties + */ + properties?: string[]; +} + +/** + * Schema activity + */ +export interface SchemaActivity { + /** + * VCs + */ + vcs: number; + /** + * VPs + */ + vps: number; +} + +/** + * Schema + */ +export type ISchema = Message; + +/** + * Schema details + */ +export type SchemaDetails = DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/token.details.ts b/indexer-interfaces/src/interfaces/details/token.details.ts new file mode 100644 index 0000000000..5247b6c173 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/token.details.ts @@ -0,0 +1,12 @@ +import { Details } from './details.interface.js'; +import { RawToken } from '../raw-token.interface.js'; + +/** + * Token + */ +export type Token = RawToken; + +/** + * Token details + */ +export type TokenDetails = Details; diff --git a/indexer-interfaces/src/interfaces/details/tool.details.ts b/indexer-interfaces/src/interfaces/details/tool.details.ts new file mode 100644 index 0000000000..b67ff9e768 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/tool.details.ts @@ -0,0 +1,70 @@ +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * Tool options + */ +export interface ToolOptions { + /** + * UUID + */ + uuid: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Owner + */ + owner: string; + /** + * Hash + */ + hash: string; + /** + * Tool topic identifier + */ + toolTopicId: string; + /** + * Tags topic identifier + */ + tagsTopicId: string; +} + +/** + * Tool analytics + */ +export interface ToolAnalytics { + /** + * Text search + */ + textSearch?: string; +} + +/** + * Tool activity + */ +export interface ToolActivity { + /** + * Policies + */ + policies: number; + /** + * Schemas + */ + schemas: number; +} + +/** + * Tool + */ +export type Tool = Message; + +/** + * Tool details + */ +export type ToolDetails = DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/topic.details.ts b/indexer-interfaces/src/interfaces/details/topic.details.ts new file mode 100644 index 0000000000..5b3483ce79 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/topic.details.ts @@ -0,0 +1,112 @@ +import { TopicType } from '../../types/index.js'; +import { DetailsActivity } from './details.interface.js'; +import { Message } from '../message.interface.js'; +import { RawTopic } from '../raw-topic.interface.js'; + +/** + * Topic options + */ +export interface TopicOptions { + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Owner + */ + owner: string; + /** + * Message type + */ + messageType: TopicType; + /** + * Child topic identifier + */ + childId: string; + /** + * Parent topic identifier + */ + parentId: string; + /** + * Rationale + */ + rationale: string; +} + +/** + * Topic analytics + */ +export interface TopicAnalytics { + /** + * Text search + */ + textSearch?: string; +} + +/** + * Topic activity + */ +export interface TopicActivity { + /** + * Registries + */ + registries: number; + /** + * Topics + */ + topics: number; + /** + * Policies + */ + policies: number; + /** + * Tools + */ + tools: number; + /** + * Modules + */ + modules: number; + /** + * Schemas + */ + schemas: number; + /** + * Tokens + */ + tokens: number; + /** + * Roles + */ + roles: number; + /** + * DIDs + */ + dids: number; + /** + * VCs + */ + vcs: number; + /** + * VPs + */ + vps: number; + /** + * Contracts + */ + contracts: number; +} + +/** + * Topic + */ +export type Topic = Message; + +/** + * Topic details + */ +export type TopicDetails = DetailsActivity; diff --git a/indexer-interfaces/src/interfaces/details/vc.details.ts b/indexer-interfaces/src/interfaces/details/vc.details.ts new file mode 100644 index 0000000000..c76be180e8 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/vc.details.ts @@ -0,0 +1,56 @@ +import { DetailsHistory } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * VC options + */ +export interface VCOptions { + /** + * Issuer + */ + issuer: string; + /** + * Relationships + */ + relationships: string[]; + /** + * Document status + */ + documentStatus: string; + /** + * Encoded data + */ + encodedData: boolean; +} + +/** + * VC analytics + */ +export interface VCAnalytics { + /** + * Text search + */ + textSearch?: string; + /** + * Policy message identifier + */ + policyId?: string; + /** + * Schema message identifier + */ + schemaId?: string; + /** + * Schema name + */ + schemaName?: string; +} + +/** + * VC + */ +export type VC = Message; + +/** + * VC details + */ +export type VCDetails = DetailsHistory & { schema?: any }; diff --git a/indexer-interfaces/src/interfaces/details/vp.details.ts b/indexer-interfaces/src/interfaces/details/vp.details.ts new file mode 100644 index 0000000000..7317c6e1e8 --- /dev/null +++ b/indexer-interfaces/src/interfaces/details/vp.details.ts @@ -0,0 +1,48 @@ +import { DetailsHistory } from './details.interface.js'; +import { Message } from '../message.interface.js'; + +/** + * VP options + */ +export interface VPOptions { + /** + * Issuer + */ + issuer: string; + /** + * Relationships + */ + relationships: string[]; +} + +/** + * VP analytics + */ +export interface VPAnalytics { + /** + * Text search + */ + textSearch?: string; + /** + * Policy message identifier + */ + policyId?: string; + /** + * Schema message identifiers + */ + schemaIds?: string[]; + /** + * Schema names + */ + schemaNames?: string[]; +} + +/** + * VP + */ +export type VP = Message; + +/** + * VP details + */ +export type VPDetails = DetailsHistory; diff --git a/indexer-interfaces/src/interfaces/grid/index.ts b/indexer-interfaces/src/interfaces/grid/index.ts new file mode 100644 index 0000000000..4ac3b23bbb --- /dev/null +++ b/indexer-interfaces/src/interfaces/grid/index.ts @@ -0,0 +1,2 @@ +export * from './page-filters.interface.js'; +export * from './page.interface.js'; diff --git a/indexer-interfaces/src/interfaces/grid/page-filters.interface.ts b/indexer-interfaces/src/interfaces/grid/page-filters.interface.ts new file mode 100644 index 0000000000..ed941850ea --- /dev/null +++ b/indexer-interfaces/src/interfaces/grid/page-filters.interface.ts @@ -0,0 +1,29 @@ +/** + * Page filters + */ +export interface PageFilters { + /** + * Page index + */ + pageIndex?: number | string; + /** + * Page size + */ + pageSize?: number | string; + /** + * Order direction + */ + orderDir?: string; + /** + * Order field + */ + orderField?: string; + /** + * Keywords + */ + keywords?: string; + /** + * Other filters + */ + [field: string]: any; +} diff --git a/indexer-common/src/messages/message-body.ts b/indexer-interfaces/src/interfaces/grid/page.interface.ts similarity index 64% rename from indexer-common/src/messages/message-body.ts rename to indexer-interfaces/src/interfaces/grid/page.interface.ts index 89f6e6456b..cb7d6c2aaf 100644 --- a/indexer-common/src/messages/message-body.ts +++ b/indexer-interfaces/src/interfaces/grid/page.interface.ts @@ -1,7 +1,7 @@ /** - * Message response interface + * Page response */ -export interface IPage { +export interface Page { /** * Items */ @@ -23,13 +23,3 @@ export interface IPage { */ readonly order?: { [field: string]: string }; } - -/** - * Message response interface - */ -export interface IResults { - /** - * Items - */ - readonly results: T; -} \ No newline at end of file diff --git a/indexer-interfaces/src/interfaces/index.ts b/indexer-interfaces/src/interfaces/index.ts index c1b9e66f0f..4d71f652c6 100644 --- a/indexer-interfaces/src/interfaces/index.ts +++ b/indexer-interfaces/src/interfaces/index.ts @@ -1,7 +1,13 @@ -export * from './details-results.interface.js'; -export * from './page-filters.interface.js'; -export * from './relationships-results.interface.js'; -export * from './schema-condition.interface.js'; -export * from './schema-document.interface.js'; -export * from './schema-field.interface.js'; -export * from './schema-tree-results.interface.js'; +export * from './details/index.js'; +export * from './schema/index.js'; +export * from './grid/index.js'; +export * from './relationships.interface.js'; +export * from './langing-analytics.interface.js'; +export * from './project-coordinates.interface.js'; +export * from './search-item.interface.js'; +export * from './message.interface.js'; +export * from './raw-message.interface.js'; +export * from './raw-nft.interface.js'; +export * from './raw-token.interface.js'; +export * from './raw-topic.interface.js'; +export * from './search-policy.interface.js'; diff --git a/indexer-interfaces/src/interfaces/langing-analytics.interface.ts b/indexer-interfaces/src/interfaces/langing-analytics.interface.ts new file mode 100644 index 0000000000..8e0b38e27f --- /dev/null +++ b/indexer-interfaces/src/interfaces/langing-analytics.interface.ts @@ -0,0 +1,25 @@ +/** + * Landing Analytics + */ +export interface LandingAnalytics { + /** + * Registries + */ + registries: number; + /** + * Methodologies + */ + methodologies: number; + /** + * Projects + */ + projects: number; + /** + * Total Issuance + */ + totalIssuance: number; + /** + * Date + */ + date: Date; +} diff --git a/indexer-interfaces/src/interfaces/message.interface.ts b/indexer-interfaces/src/interfaces/message.interface.ts new file mode 100644 index 0000000000..da9aadbfc7 --- /dev/null +++ b/indexer-interfaces/src/interfaces/message.interface.ts @@ -0,0 +1,80 @@ +import { MessageAction } from '../types/message-action.js'; +import { MessageType } from '../types/message-type.js'; + +/** + * Parsed message + */ +export interface Message { + /** + * Identifier + */ + id: string; + /** + * Topic identifier + */ + topicId: string; + /** + * Message identifier + */ + consensusTimestamp: string; + /** + * Owner + */ + owner: string; + /** + * UUID + */ + uuid: string; + /** + * Status + */ + status: string; + /** + * Status reason + */ + statusReason: string; + /** + * Type + */ + type: MessageType; + /** + * Action + */ + action: MessageAction; + /** + * Lang + */ + lang: string; + /** + * Response type + */ + responseType: string; + /** + * Status message + */ + statusMessage: string; + /** + * Options + */ + options: O; + /** + * Analytics + */ + analytics?: A; + /** + * Files + */ + files: string[]; + /** + * Documents + */ + documents: any[]; + /** + * Topics + */ + topics: string[]; + /** + * Tokens + */ + tokens: string[]; +} diff --git a/indexer-interfaces/src/interfaces/page-filters.interface.ts b/indexer-interfaces/src/interfaces/page-filters.interface.ts deleted file mode 100644 index 6c5b3ee89f..0000000000 --- a/indexer-interfaces/src/interfaces/page-filters.interface.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface IPageFilters { - pageIndex?: number | string; - pageSize?: number | string; - orderDir?: string; - orderField?: string; - keywords?: string; - [field: string]: any; -} diff --git a/indexer-interfaces/src/interfaces/project-coordinates.interface.ts b/indexer-interfaces/src/interfaces/project-coordinates.interface.ts new file mode 100644 index 0000000000..b1675ac687 --- /dev/null +++ b/indexer-interfaces/src/interfaces/project-coordinates.interface.ts @@ -0,0 +1,14 @@ +/** + * Project Coordinates + */ +export class ProjectCoordinates { + /** + * Coordinates of point in following format: + * lng|lat + */ + coordinates: string; + /** + * Project message identifier + */ + projectId: string; +} diff --git a/indexer-interfaces/src/interfaces/raw-message.interface.ts b/indexer-interfaces/src/interfaces/raw-message.interface.ts new file mode 100644 index 0000000000..72bbe84f1c --- /dev/null +++ b/indexer-interfaces/src/interfaces/raw-message.interface.ts @@ -0,0 +1,57 @@ +/** + * Raw message + */ +export interface RawMessage { + /** + * Identifier + */ + id: string; + /** + * Message identifier + */ + consensusTimestamp: string; + /** + * Topic identifier + */ + topicId: string; + /** + * Status + */ + status: string; + /** + * Last update + */ + lastUpdate: number; + /** + * Message + */ + message: string; + /** + * Sequence number + */ + sequenceNumber: number; + /** + * Owner + */ + owner: string; + /** + * Chunk identifier + */ + chunkId: string; + /** + * Chunk number + */ + chunkNumber: number; + /** + * Chunk total + */ + chunkTotal: number; + /** + * Chunk type + */ + type: string; + /** + * Data + */ + data?: string; +} diff --git a/indexer-interfaces/src/interfaces/raw-nft.interface.ts b/indexer-interfaces/src/interfaces/raw-nft.interface.ts new file mode 100644 index 0000000000..c9e3e52f0a --- /dev/null +++ b/indexer-interfaces/src/interfaces/raw-nft.interface.ts @@ -0,0 +1,30 @@ + +/** + * NFT + */ +export class RawNFT { + /** + * Identifier + */ + id!: string; + + /** + * Token identifier + */ + tokenId: string; + + /** + * Last update + */ + lastUpdate: number; + + /** + * Serial number + */ + serialNumber: number; + + /** + * Metadata + */ + metadata: string; +} diff --git a/indexer-interfaces/src/interfaces/raw-token.interface.ts b/indexer-interfaces/src/interfaces/raw-token.interface.ts new file mode 100644 index 0000000000..85bd254fca --- /dev/null +++ b/indexer-interfaces/src/interfaces/raw-token.interface.ts @@ -0,0 +1,57 @@ +/** + * Token + */ +export class RawToken { + /** + * Identifier + */ + id!: string; + /** + * Token identifier + */ + tokenId: string; + /** + * Status + */ + status: string; + /** + * Last update + */ + lastUpdate: number; + /** + * Serial number + */ + serialNumber: number; + /** + * Has next + */ + hasNext: boolean; + /** + * Name + */ + name: string; + /** + * Symbol + */ + symbol: string; + /** + * Type + */ + type: string; + /** + * Treasury + */ + treasury: string; + /** + * Memo + */ + memo: string; + /** + * Total supply + */ + totalSupply: any; + /** + * Decimals + */ + decimals?: string; +} diff --git a/indexer-interfaces/src/interfaces/raw-topic.interface.ts b/indexer-interfaces/src/interfaces/raw-topic.interface.ts new file mode 100644 index 0000000000..db1d46d372 --- /dev/null +++ b/indexer-interfaces/src/interfaces/raw-topic.interface.ts @@ -0,0 +1,29 @@ +/** + * Raw topic + */ +export class RawTopic { + /** + * Identifier + */ + id!: string; + /** + * Topic identifier + */ + topicId: string; + /** + * Status + */ + status: string; + /** + * Last update + */ + lastUpdate: number; + /** + * Messages + */ + messages: number; + /** + * Has next + */ + hasNext: boolean; +} diff --git a/indexer-interfaces/src/interfaces/relationships-results.interface.ts b/indexer-interfaces/src/interfaces/relationships-results.interface.ts deleted file mode 100644 index 2309688719..0000000000 --- a/indexer-interfaces/src/interfaces/relationships-results.interface.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface IRelationshipsResults { - id: string; - item?: any; - target?: any; - relationships?: any[]; - links?: any[]; - categories?: any; -} diff --git a/indexer-interfaces/src/interfaces/relationships.interface.ts b/indexer-interfaces/src/interfaces/relationships.interface.ts new file mode 100644 index 0000000000..3581b5b222 --- /dev/null +++ b/indexer-interfaces/src/interfaces/relationships.interface.ts @@ -0,0 +1,108 @@ +import { MessageType } from '../types/message-type'; +import { Message } from './message.interface'; + +/** + * Relationship category + */ +export enum RelationshipCategory { + Registry = 'Registry', + Policy = 'Policy', + Schema = 'Schema', + Role = 'Role', + VC = 'VC', + VP = 'VP', +} + +/** + * Relationship categories + */ +export const RELATIONSHIP_CATEGORIES = [ + { + name: RelationshipCategory.Registry, + }, + { + name: RelationshipCategory.Policy, + }, + { + name: RelationshipCategory.Schema, + }, + { + name: RelationshipCategory.Role, + }, + { + name: RelationshipCategory.VC, + }, + { + name: RelationshipCategory.VP, + }, +]; + +/** + * Relationship + */ +export interface Relationship { + /** + * Message identifier + */ + id: string; + /** + * UUID + */ + uuid: string; + /** + * Type + */ + type: MessageType; + /** + * Category + */ + category: number; + /** + * Name + */ + name: string; +} + +/** + * Relationship link + */ +export interface RelationshipLink { + /** + * Source + */ + source: string; + /** + * Target + */ + target: string; +} + +/** + * Relationships + */ +export interface Relationships { + /** + * Identifier + */ + id: string; + /** + * Item + */ + item?: Message; + /** + * Target + */ + target?: Relationship; + /** + * Relationships + */ + relationships?: Relationship[]; + /** + * Links + */ + links?: RelationshipLink[]; + /** + * Categories + */ + categories?: typeof RELATIONSHIP_CATEGORIES; +} diff --git a/indexer-interfaces/src/interfaces/schema-tree-results.interface.ts b/indexer-interfaces/src/interfaces/schema-tree-results.interface.ts deleted file mode 100644 index 4baa1f0e51..0000000000 --- a/indexer-interfaces/src/interfaces/schema-tree-results.interface.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ISchemaTreeResult { - id: string; - item?: any; - root?: any; -} diff --git a/indexer-interfaces/src/interfaces/schema/index.ts b/indexer-interfaces/src/interfaces/schema/index.ts new file mode 100644 index 0000000000..4757dade53 --- /dev/null +++ b/indexer-interfaces/src/interfaces/schema/index.ts @@ -0,0 +1,4 @@ +export * from './schema-condition.interface.js'; +export * from './schema-document.interface.js'; +export * from './schema-field.interface.js'; +export * from './schema-tree.interface.js'; diff --git a/indexer-interfaces/src/interfaces/schema-condition.interface.ts b/indexer-interfaces/src/interfaces/schema/schema-condition.interface.ts similarity index 100% rename from indexer-interfaces/src/interfaces/schema-condition.interface.ts rename to indexer-interfaces/src/interfaces/schema/schema-condition.interface.ts diff --git a/indexer-interfaces/src/interfaces/schema-document.interface.ts b/indexer-interfaces/src/interfaces/schema/schema-document.interface.ts similarity index 100% rename from indexer-interfaces/src/interfaces/schema-document.interface.ts rename to indexer-interfaces/src/interfaces/schema/schema-document.interface.ts diff --git a/indexer-interfaces/src/interfaces/schema-field.interface.ts b/indexer-interfaces/src/interfaces/schema/schema-field.interface.ts similarity index 96% rename from indexer-interfaces/src/interfaces/schema-field.interface.ts rename to indexer-interfaces/src/interfaces/schema/schema-field.interface.ts index 8c695389f5..3c13f0acc4 100644 --- a/indexer-interfaces/src/interfaces/schema-field.interface.ts +++ b/indexer-interfaces/src/interfaces/schema/schema-field.interface.ts @@ -1,4 +1,4 @@ -import { SchemaCondition } from '../interfaces'; +import { SchemaCondition } from './schema-condition.interface.js'; /** * Schema field diff --git a/indexer-interfaces/src/interfaces/schema/schema-tree.interface.ts b/indexer-interfaces/src/interfaces/schema/schema-tree.interface.ts new file mode 100644 index 0000000000..a9212760cb --- /dev/null +++ b/indexer-interfaces/src/interfaces/schema/schema-tree.interface.ts @@ -0,0 +1,49 @@ +import { ISchema } from '../details'; + +/** + * Schema tree node data + */ +export interface SchemaTreeNodeData { + id: string; + color: string; +} + +/** + * Schema tree node + */ +export interface SchemaTreeNode { + /** + * Label + */ + label: string; + /** + * Expanded + */ + expanded: boolean; + /** + * Data + */ + data: SchemaTreeNodeData; + /** + * Children + */ + children: SchemaTreeNode[]; +} + +/** + * Schema tree + */ +export interface SchemaTree { + /** + * Identifier + */ + id: string; + /** + * Schema + */ + item?: ISchema; + /** + * Root + */ + root?: SchemaTreeNode; +} diff --git a/indexer-interfaces/src/interfaces/search-item.interface.ts b/indexer-interfaces/src/interfaces/search-item.interface.ts new file mode 100644 index 0000000000..1999ab77ce --- /dev/null +++ b/indexer-interfaces/src/interfaces/search-item.interface.ts @@ -0,0 +1,13 @@ +/** + * Search item + */ +export class SearchItem { + /** + * Message identifier + */ + consensusTimestamp: string; + /** + * Message type + */ + type: string; +} diff --git a/indexer-interfaces/src/interfaces/search-policy.interface.ts b/indexer-interfaces/src/interfaces/search-policy.interface.ts new file mode 100644 index 0000000000..85d61f1ada --- /dev/null +++ b/indexer-interfaces/src/interfaces/search-policy.interface.ts @@ -0,0 +1,121 @@ +/** + * Search policy blocks + */ +export interface SearchPolicyBlocks { + /** + * Hash + */ + hash: string; + /** + * Hash map + */ + hashMap: any; + /** + * Threshold + */ + threshold: number; +} + +/** + * Search policy params + */ +export interface SearchPolicyParams { + /** + * Text + */ + text?: string; + /** + * Mint VC count + */ + minVcCount?: number; + /** + * Mint VP count + */ + minVpCount?: number; + /** + * Mint tokens count + */ + minTokensCount?: number; + /** + * Threshold + */ + threshold?: number; + /** + * Owner + */ + owner?: string; + /** + * Blocks + */ + blocks?: SearchPolicyBlocks; +} + +/** + * Search policy result + */ +export interface SearchPolicyResult { + /** + * Type + */ + type: 'Global'; + /** + * Topic identifier + */ + topicId: string; + /** + * UUID + */ + uuid: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Version + */ + version: string; + /** + * Status + */ + status: 'PUBLISH'; + /** + * Message identifier + */ + messageId: string; + /** + * Owner + */ + owner: string; + /** + * Text search + */ + textSearch: string; + /** + * Registry identifier + */ + registryId: string; + /** + * VC Count + */ + vcCount: number; + /** + * VP Count + */ + vpCount: number; + /** + * Tokens Count + */ + tokensCount: number; + /** + * Rate + */ + rate: number; + /** + * Tags + */ + tags: string[]; +} diff --git a/indexer-interfaces/src/types/contract.type.ts b/indexer-interfaces/src/types/contract.type.ts new file mode 100644 index 0000000000..b59dcc56fb --- /dev/null +++ b/indexer-interfaces/src/types/contract.type.ts @@ -0,0 +1,7 @@ +/** + * Contract type + */ +export enum ContractType { + WIPE = 'WIPE', + RETIRE = 'RETIRE', +} diff --git a/indexer-interfaces/src/types/index.ts b/indexer-interfaces/src/types/index.ts index 4a1684983c..51f6d877bd 100644 --- a/indexer-interfaces/src/types/index.ts +++ b/indexer-interfaces/src/types/index.ts @@ -1,2 +1,4 @@ export * from './message-type.js'; export * from './message-action.js'; +export * from './topic.type.js'; +export * from './contract.type.js'; diff --git a/indexer-interfaces/src/types/topic.type.ts b/indexer-interfaces/src/types/topic.type.ts new file mode 100644 index 0000000000..011601ce88 --- /dev/null +++ b/indexer-interfaces/src/types/topic.type.ts @@ -0,0 +1,17 @@ +/** + * Topic type + */ +export enum TopicType { + UserTopic = 'USER_TOPIC', + PolicyTopic = 'POLICY_TOPIC', + InstancePolicyTopic = 'INSTANCE_POLICY_TOPIC', + DynamicTopic = 'DYNAMIC_TOPIC', + SchemaTopic = 'SCHEMA_TOPIC', + SynchronizationTopic = 'SYNCHRONIZATION_TOPIC', + RetireTopic = 'RETIRE_TOPIC', + TokenTopic = 'TOKEN_TOPIC', + ModuleTopic = 'MODULE_TOPIC', + ContractTopic = 'CONTRACT_TOPIC', + ToolTopic = 'TOOL_TOPIC', + TagsTopic = 'TAGS_TOPIC', +} diff --git a/indexer-service/package.json b/indexer-service/package.json index c471963f27..387d52d7eb 100644 --- a/indexer-service/package.json +++ b/indexer-service/package.json @@ -2,8 +2,8 @@ "author": "Envision Blockchain Solutions ", "dependencies": { "@elastic/elasticsearch": "^8.12.2", - "@indexer/common": "^2.26.2", - "@indexer/interfaces": "^2.26.2", + "@indexer/common": "^2.27.0", + "@indexer/interfaces": "^2.27.0", "mongodb": "6.5.0", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", @@ -60,5 +60,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/indexer-service/src/_dev/api/log.service.ts b/indexer-service/src/_dev/api/log.service.ts index f75a41816d..4cd5475590 100644 --- a/indexer-service/src/_dev/api/log.service.ts +++ b/indexer-service/src/_dev/api/log.service.ts @@ -4,7 +4,6 @@ import { IndexerMessageAPI, MessageResponse, MessageError, - IPage, DataBaseHelper, MessageCache, DataBaseUtils, @@ -13,6 +12,7 @@ import { TokenCache, NftCache } from '@indexer/common'; +import { Page } from '@indexer/interfaces'; @Controller() export class LogService { @@ -55,7 +55,7 @@ export class LogService { const options = DataBaseUtils.pageParams(pageSize, pageIndex, 100, orderField, orderDir); const [rows, count] = await em.findAndCount(MessageCache, filters, options); - const result: IPage = { + const result: Page = { items: rows, pageIndex, pageSize, @@ -94,7 +94,7 @@ export class LogService { const options = DataBaseUtils.pageParams(pageSize, pageIndex, 100, orderField, orderDir); const [rows, count] = await em.findAndCount(TopicCache, filters, options); - const result: IPage = { + const result: Page = { items: rows, pageIndex, pageSize, @@ -171,7 +171,7 @@ export class LogService { } } - const result: IPage = { + const result: Page = { items: rows, pageIndex, pageSize, @@ -248,7 +248,7 @@ export class LogService { const options = DataBaseUtils.pageParams(pageSize, pageIndex, 100, orderField, orderDir); const [rows, count] = await em.findAndCount(TokenCache, filters, options); - const result: IPage = { + const result: Page = { items: rows, pageIndex, pageSize, @@ -308,7 +308,7 @@ export class LogService { const options = DataBaseUtils.pageParams(pageSize, pageIndex, 100, orderField, orderDir); const [rows, count] = await em.findAndCount(NftCache, filters, options); - const result: IPage = { + const result: Page = { items: rows, pageIndex, pageSize, @@ -320,4 +320,4 @@ export class LogService { return new MessageError(error); } } -} \ No newline at end of file +} diff --git a/indexer-service/src/api/analytics.service.ts b/indexer-service/src/api/analytics.service.ts index 2d9663b694..8d9fe2e7a9 100644 --- a/indexer-service/src/api/analytics.service.ts +++ b/indexer-service/src/api/analytics.service.ts @@ -5,10 +5,11 @@ import { MessageResponse, MessageError, DataBaseHelper, - Message + Message, + AnyResponse } from '@indexer/common'; import escapeStringRegexp from 'escape-string-regexp'; -import { MessageAction, MessageType } from '@indexer/interfaces'; +import { MessageAction, MessageType, SearchPolicyParams, SearchPolicyResult } from '@indexer/interfaces'; import { HashComparator } from '../analytics/index.js'; @Controller() @@ -16,20 +17,8 @@ export class AnalyticsService { @MessagePattern(IndexerMessageAPI.GET_ANALYTICS_SEARCH_POLICY) async search( @Payload() - msg: { - text: string; - minVcCount?: number; - minVpCount?: number; - minTokensCount?: number; - threshold?: number; - owner?: string; - blocks?: { - hash: string; - hashMap: any; - threshold: number; - }; - } - ) { + msg: SearchPolicyParams + ): Promise> { try { const { text, @@ -126,9 +115,9 @@ export class AnalyticsService { tokensCount: row.analytics.tokensCount, rate: row.rate, tags: policyTags - } + } as SearchPolicyResult }).slice(0, 100); - return new MessageResponse(results); + return new MessageResponse(results); } catch (error) { return new MessageError(error); } diff --git a/indexer-service/src/api/entities.service.ts b/indexer-service/src/api/entities.service.ts index f0dd13bdbd..d4a9072e0f 100644 --- a/indexer-service/src/api/entities.service.ts +++ b/indexer-service/src/api/entities.service.ts @@ -1,27 +1,55 @@ import { Controller } from '@nestjs/common'; import { MessagePattern, Payload } from '@nestjs/microservices'; import { + Message, IndexerMessageAPI, MessageResponse, MessageError, AnyResponse, - IPage, DataBaseHelper, MessageCache, TopicCache, - Message, TokenCache, NftCache, } from '@indexer/common'; import escapeStringRegexp from 'escape-string-regexp'; import { Relationships } from '../utils/relationships.js'; import { + Message as IMessage, MessageType, MessageAction, - IPageFilters, - IDetailsResults, - IRelationshipsResults, - ISchemaTreeResult, + PageFilters, + RegistryDetails, + Registry, + Page, + RegistryUser, + RegistryUserDetails, + Policy, + PolicyDetails, + Tool, + ToolDetails, + Module, + ModuleDetails, + ISchema, + SchemaDetails, + Role, + RoleDetails, + DID, + DIDDetails, + VP, + VPDetails, + VC, + VCDetails, + Contract, + ContractDetails, + Topic, + TopicDetails, + TokenDetails, + Token, + NFTDetails, + NFT, + SchemaTree, + Relationships as IRelationships } from '@indexer/interfaces'; import { parsePageParams } from '../utils/parse-page-params.js'; import axios from 'axios'; @@ -35,7 +63,7 @@ const pageOptions = new Set([ 'keywords', ]); -function parsePageFilters(msg: IPageFilters) { +function parsePageFilters(msg: PageFilters) { let filters: any = {}; const keys = Object.keys(msg).filter((name) => !pageOptions.has(name)); for (const key of keys) { @@ -71,7 +99,7 @@ function parseKeywordFilter(keywordsString: string) { return filter; } -async function loadDocuments(row: Message): Promise { +async function loadDocuments(row: IMessage): Promise { if (row?.files?.length) { row.documents = []; for (const fileName of row.files) { @@ -88,8 +116,8 @@ export class EntityService { //#region STANDARD REGISTRIES @MessagePattern(IndexerMessageAPI.GET_REGISTRIES) async getRegistries( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = Object.assign( @@ -98,19 +126,19 @@ export class EntityService { ); filters.type = MessageType.STANDARD_REGISTRY; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [Registry[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -119,20 +147,20 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_REGISTRY) async getRegistry( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.STANDARD_REGISTRY, - }); - const row = await em.findOne(MessageCache, { + })) as Registry; + const row: any = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, }); @@ -181,7 +209,13 @@ export class EntityService { treasury: item.owner, } as any); - return new MessageResponse({ + const contracts = await em.count(Message, { + type: MessageType.CONTRACT, + action: MessageAction.CreateContract, + owner: item.owner, + } as any); + + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -195,6 +229,7 @@ export class EntityService { modules, tokens, users, + contracts }, }); } catch (error) { @@ -206,8 +241,8 @@ export class EntityService { //#region REGISTRY USERS @MessagePattern(IndexerMessageAPI.GET_REGISTRY_USERS) async getRegistryUsers( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); @@ -247,19 +282,19 @@ export class EntityService { }, ]; } - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [RegistryUser[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -268,7 +303,7 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_REGISTRY_USER) async getRegistryUser( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); @@ -281,7 +316,7 @@ export class EntityService { fields: ['options'], } ); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { topicId: { $in: registryOptions.map( (reg) => reg.options.registrantTopicId @@ -292,13 +327,13 @@ export class EntityService { }, consensusTimestamp: messageId, type: MessageType.DID_DOCUMENT, - } as any); + } as any)) as RegistryUser; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, }); @@ -321,7 +356,7 @@ export class EntityService { 'options.issuer': item.options.did, } as any); - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -343,27 +378,27 @@ export class EntityService { //#region POLICIES @MessagePattern(IndexerMessageAPI.GET_POLICIES) async getPolicies( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.INSTANCE_POLICY; filters.action = MessageAction.PublishPolicy; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [Policy[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -372,15 +407,15 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_POLICY) async getPolicy( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.INSTANCE_POLICY, action: MessageAction.PublishPolicy, - } as any); + } as any)) as Policy; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); @@ -413,14 +448,14 @@ export class EntityService { roles, }; if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, activity, }); } - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -435,27 +470,27 @@ export class EntityService { //#region TOOLS @MessagePattern(IndexerMessageAPI.GET_TOOLS) async getTools( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.TOOL; filters.action = MessageAction.PublishTool; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [Tool[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -464,15 +499,15 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_TOOL) async getTool( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.TOOL, action: MessageAction.PublishTool, - } as any); + } as any)) as Tool; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); @@ -498,14 +533,14 @@ export class EntityService { }; if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, activity, }); } - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -520,27 +555,27 @@ export class EntityService { //#region MODULES @MessagePattern(IndexerMessageAPI.GET_MODULES) async getModules( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.MODULE; filters.action = MessageAction.PublishModule; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [Module[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -549,27 +584,27 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_MODULE) async getModule( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.MODULE, action: MessageAction.PublishModule, - } as any); + } as any)) as Module; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, }); } - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -583,20 +618,20 @@ export class EntityService { //#region SCHEMAS @MessagePattern(IndexerMessageAPI.GET_SCHEMAS) async getSchemas( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.SCHEMA; filters.action = MessageAction.PublishSchema; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [ISchema[], number]; + const result = { items: rows.map((item) => { delete item.analytics; return item; @@ -606,7 +641,7 @@ export class EntityService { total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -615,11 +650,11 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_SCHEMA) async getSchema( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.SCHEMA, action: { @@ -628,7 +663,7 @@ export class EntityService { MessageAction.PublishSystemSchema, ], }, - } as any); + } as any)) as ISchema; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); @@ -649,7 +684,7 @@ export class EntityService { }; if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, activity, @@ -658,7 +693,7 @@ export class EntityService { await loadDocuments(item); - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -672,7 +707,7 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_SCHEMA_TREE) async getSchemaTree( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); @@ -684,9 +719,9 @@ export class EntityService { MessageAction.PublishSystemSchema, ], }, - }); + }) as ISchema; if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, }); } @@ -697,7 +732,7 @@ export class EntityService { em ); await root.loadChildren(item.analytics?.childSchemas || []); - return new MessageResponse({ + return new MessageResponse({ id: messageId, item, root: root.toObject(), @@ -711,8 +746,8 @@ export class EntityService { //#region TOKENS @MessagePattern(IndexerMessageAPI.GET_TOKENS) async getTokens( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); @@ -722,14 +757,14 @@ export class EntityService { filters, options ); - const result: IPage = { + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -738,14 +773,14 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_TOKEN) async getToken( @Payload() msg: { tokenId: string } - ): Promise> { + ): Promise> { try { const { tokenId } = msg; const em = DataBaseHelper.getEntityManager(); const row = await em.findOne(TokenCache, { tokenId, }); - return new MessageResponse({ + return new MessageResponse({ id: tokenId, row, }); @@ -757,26 +792,26 @@ export class EntityService { //#region ROLES @MessagePattern(IndexerMessageAPI.GET_ROLES) async getRoles( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.ROLE_DOCUMENT; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [Role[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -785,14 +820,14 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_ROLE) async getRole( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.ROLE_DOCUMENT, - } as any); + } as any)) as Role; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); @@ -807,7 +842,7 @@ export class EntityService { }; if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, activity, @@ -816,7 +851,7 @@ export class EntityService { await loadDocuments(item); - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -834,26 +869,26 @@ export class EntityService { //#region DIDS @MessagePattern(IndexerMessageAPI.GET_DID_DOCUMENTS) async getDidDocuments( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.DID_DOCUMENT; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [DID[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -861,42 +896,42 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_DID_DOCUMENT) async getDidDocument( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.DID_DOCUMENT, - }); + })) as DID; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, }); } await loadDocuments(item); - const history = await em.find( + const history = (await em.find( Message, { uuid: item.uuid, - type: MessageType.VP_DOCUMENT, + type: MessageType.DID_DOCUMENT, }, { orderBy: { consensusTimestamp: 'ASC', }, } - ); + )) as DID[]; for (const historyItem of history) { await loadDocuments(historyItem); } - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -910,7 +945,7 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_DID_RELATIONSHIPS) async getDidRelationships( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); @@ -919,7 +954,7 @@ export class EntityService { type: MessageType.DID_DOCUMENT, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, }); } @@ -927,7 +962,7 @@ export class EntityService { const utils = new Relationships(item); const { target, relationships, links } = await utils.load(); - return new MessageResponse({ + return new MessageResponse({ id: messageId, item, target, @@ -943,19 +978,19 @@ export class EntityService { //#region VPS @MessagePattern(IndexerMessageAPI.GET_VP_DOCUMENTS) async getVpDocuments( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.VP_DOCUMENT; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [VP[], number]; + const result = { items: rows.map((item) => { delete item.analytics; return item; @@ -965,7 +1000,7 @@ export class EntityService { total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -973,27 +1008,27 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_VP_DOCUMENT) async getVpDocument( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.VP_DOCUMENT, - }); + })) as VP; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, }); } await loadDocuments(item); - const history = await em.find( + const history = (await em.find( Message, { uuid: item.uuid, @@ -1004,11 +1039,11 @@ export class EntityService { consensusTimestamp: 'ASC', }, } - ); + )) as VP[]; for (const historyItem of history) { await loadDocuments(historyItem); } - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -1022,7 +1057,7 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_VP_RELATIONSHIPS) async getVpRelationships( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); @@ -1031,7 +1066,7 @@ export class EntityService { type: MessageType.VP_DOCUMENT, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, }); } @@ -1040,7 +1075,7 @@ export class EntityService { const { target, relationships, links, categories } = await utils.load(); - return new MessageResponse({ + return new MessageResponse({ id: messageId, item, target, @@ -1057,19 +1092,19 @@ export class EntityService { //#region VCS @MessagePattern(IndexerMessageAPI.GET_VC_DOCUMENTS) async getVcDocuments( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); filters.type = MessageType.VC_DOCUMENT; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [VC[], number]; + const result = { items: rows.map((item) => { if (item.analytics) { item.analytics = Object.assign(item.analytics, { @@ -1083,7 +1118,7 @@ export class EntityService { total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -1091,20 +1126,20 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_VC_DOCUMENT) async getVcDocument( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { consensusTimestamp: messageId, type: MessageType.VC_DOCUMENT, - }); + })) as VC; const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, }); @@ -1125,7 +1160,7 @@ export class EntityService { schema = JSON.parse(schemaFileString); } } - const history = await em.find( + const history = (await em.find( Message, { uuid: item.uuid, @@ -1136,11 +1171,11 @@ export class EntityService { consensusTimestamp: 'ASC', }, } - ); + )) as VC[]; for (const historyItem of history) { await loadDocuments(historyItem); } - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, @@ -1155,7 +1190,7 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_VC_RELATIONSHIPS) async getVcRelationships( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); @@ -1164,7 +1199,7 @@ export class EntityService { type: MessageType.VC_DOCUMENT, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, }); } @@ -1173,7 +1208,7 @@ export class EntityService { const { target, relationships, links, categories } = await utils.load(); - return new MessageResponse({ + return new MessageResponse({ id: messageId, item, target, @@ -1193,8 +1228,8 @@ export class EntityService { //#region NFTS @MessagePattern(IndexerMessageAPI.GET_NFTS) async getNFTs( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); @@ -1204,14 +1239,14 @@ export class EntityService { filters, options ); - const result: IPage = { + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -1220,7 +1255,7 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_NFT) async getNFT( @Payload() msg: { tokenId: string; serialNumber: string } - ): Promise> { + ): Promise> { try { const { tokenId } = msg; const serialNumber = parseInt(msg.serialNumber, 10); @@ -1232,8 +1267,7 @@ export class EntityService { const nftHistory: any = await axios.get( `https://${process.env.HEDERA_NET}.mirrornode.hedera.com/api/v1/tokens/${tokenId}/nfts/${serialNumber}/transactions?limit=100` ); - console.log(nftHistory); - return new MessageResponse({ + return new MessageResponse({ id: tokenId, row, history: nftHistory.data?.transactions || [], @@ -1246,8 +1280,8 @@ export class EntityService { //#region TOPICS @MessagePattern(IndexerMessageAPI.GET_TOPICS) async getTopics( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); @@ -1255,19 +1289,19 @@ export class EntityService { filters.action = MessageAction.CreateTopic; filters['options.childId'] = null; const em = DataBaseHelper.getEntityManager(); - const [rows, count] = await em.findAndCount( + const [rows, count] = (await em.findAndCount( Message, filters, options - ); - const result: IPage = { + )) as [Topic[], number]; + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -1275,16 +1309,16 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_TOPIC) async getTopic( @Payload() msg: { topicId: string } - ): Promise> { + ): Promise> { try { const { topicId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { type: MessageType.TOPIC, action: MessageAction.CreateTopic, 'options.childId': null, topicId, - } as any); + } as any)) as Topic; const row = await em.findOne(TopicCache, { topicId, }); @@ -1364,13 +1398,13 @@ export class EntityService { }; if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: topicId, row, activity, }); } - return new MessageResponse({ + return new MessageResponse({ id: topicId, uuid: item.uuid, item, @@ -1385,8 +1419,8 @@ export class EntityService { //#region CONTRACTS @MessagePattern(IndexerMessageAPI.GET_CONTRACTS) async getContracts( - @Payload() msg: IPageFilters - ): Promise>> { + @Payload() msg: PageFilters + ): Promise>> { try { const options = parsePageParams(msg); const filters = parsePageFilters(msg); @@ -1398,14 +1432,14 @@ export class EntityService { filters, options ); - const result: IPage = { + const result = { items: rows, pageIndex: options.offset / options.limit, pageSize: options.limit, total: count, order: options.orderBy, }; - return new MessageResponse(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } @@ -1413,25 +1447,25 @@ export class EntityService { @MessagePattern(IndexerMessageAPI.GET_CONTRACT) async getContract( @Payload() msg: { messageId: string } - ): Promise> { + ): Promise> { try { const { messageId } = msg; const em = DataBaseHelper.getEntityManager(); - const item = await em.findOne(Message, { + const item = (await em.findOne(Message, { type: MessageType.CONTRACT, action: MessageAction.CreateContract, - messageId, - } as any); - const row = await em.findOne(Message, { + consensusTimestamp: messageId, + } as any)) as Contract; + const row = await em.findOne(MessageCache, { consensusTimestamp: messageId, }); if (!item) { - return new MessageResponse({ + return new MessageResponse({ id: messageId, row, }); } - return new MessageResponse({ + return new MessageResponse({ id: messageId, uuid: item.uuid, item, diff --git a/indexer-service/src/api/landing.service.ts b/indexer-service/src/api/landing.service.ts index 506d3f26b7..0c2888ebd1 100644 --- a/indexer-service/src/api/landing.service.ts +++ b/indexer-service/src/api/landing.service.ts @@ -8,6 +8,10 @@ import { ProjectCoordinates, Analytics, } from '@indexer/common'; +import { + LandingAnalytics as IAnalytics, + ProjectCoordinates as IProjectCoordinates, +} from '@indexer/interfaces'; @Controller() export class LandingService { @@ -31,12 +35,14 @@ export class LandingService { ], } ); - return new MessageResponse(stats.reverse()); + return new MessageResponse(stats.reverse()); } @MessagePattern(IndexerMessageAPI.GET_PROJECTS_COORDINATES) async getProjects(): Promise> { const em = DataBaseHelper.getEntityManager(); - return new MessageResponse(await em.findAll(ProjectCoordinates)); + return new MessageResponse( + await em.findAll(ProjectCoordinates) + ); } } diff --git a/indexer-service/src/api/search.service.ts b/indexer-service/src/api/search.service.ts index e5a4c9e9da..d7e1110f34 100644 --- a/indexer-service/src/api/search.service.ts +++ b/indexer-service/src/api/search.service.ts @@ -6,9 +6,9 @@ import { MessageError, DataBaseHelper, Message, - IPage, } from '@indexer/common'; import { parsePageParams } from '../utils/parse-page-params.js'; +import { Page, SearchItem } from '@indexer/interfaces'; @Controller() export class SearchService { @@ -26,7 +26,7 @@ export class SearchService { const { search } = msg; const em = DataBaseHelper.getEntityManager(); - const [results, count] = await em.findAndCount( + const [results, count] = (await em.findAndCount( Message, { $text: { @@ -34,7 +34,7 @@ export class SearchService { }, } as any, options - ); + )) as any as [SearchItem[], number]; const result = { items: results, @@ -44,7 +44,7 @@ export class SearchService { order: options.orderBy, }; - return new MessageResponse>(result); + return new MessageResponse>(result); } catch (error) { return new MessageError(error); } diff --git a/indexer-service/src/app.ts b/indexer-service/src/app.ts index 134fc724e7..f127f61ca0 100644 --- a/indexer-service/src/app.ts +++ b/indexer-service/src/app.ts @@ -34,6 +34,7 @@ import { syncRoles, syncTools, syncTopics, + syncContracts } from './helpers/synchronizers/index.js'; const channelName = ( @@ -232,7 +233,14 @@ Promise.all([ process.env.SYNC_POLICIES_MASK || '0 * * * *' ); policy.start(process.env.START_SYNC_POLICIES?.toLowerCase() === 'true'); - + const contractsSync = new SynchronizationTask( + 'contracts', + syncContracts, + process.env.SYNC_CONTRACTS_MASK || '0 * * * *' + ); + contractsSync.start( + process.env.START_SYNC_CONTRACTS?.toLowerCase() === 'true' + ); // synchronizePolicies() }, (reason) => { diff --git a/indexer-service/src/config.ts b/indexer-service/src/config.ts index c687c68151..196dee2fa0 100644 --- a/indexer-service/src/config.ts +++ b/indexer-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false'){ } } } -console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/indexer-service/src/helpers/synchronizers/index.ts b/indexer-service/src/helpers/synchronizers/index.ts index b318867b5d..4127a28e1f 100644 --- a/indexer-service/src/helpers/synchronizers/index.ts +++ b/indexer-service/src/helpers/synchronizers/index.ts @@ -10,3 +10,4 @@ export * from './synchronize-schema.js'; export * from './synchronize-tool.js'; export * from './synchronize-topic.js'; export * from './synchronize-vp.js'; +export * from './synchronize-contracts.js'; diff --git a/indexer-service/src/helpers/synchronizers/synchronize-contracts.ts b/indexer-service/src/helpers/synchronizers/synchronize-contracts.ts new file mode 100644 index 0000000000..27727154be --- /dev/null +++ b/indexer-service/src/helpers/synchronizers/synchronize-contracts.ts @@ -0,0 +1,46 @@ +import { DataBaseHelper } from '@indexer/common'; +import { MessageType, MessageAction } from '@indexer/interfaces'; +import { textSearch } from '../text-search-options.js'; + +function filter() { + return { + $or: [ + { + 'analytics.textSearch': null, + }, + ], + }; +} + +export async function syncContracts() { + const em = DataBaseHelper.getEntityManager(); + const collection = em.getCollection('message'); + const contracts = await collection.find({ + type: { $in: [MessageType.CONTRACT] }, + action: MessageAction.CreateContract, + ...filter(), + }); + let index = 0; + const count = await contracts.count(); + while (await contracts.hasNext()) { + index++; + console.log(`Sync contracts ${index}/${count}`); + const document = await contracts.next(); + const analytics: any = { + textSearch: textSearch(document) + }; + await collection.updateOne( + { + _id: document._id, + }, + { + $set: { + analytics, + }, + }, + { + upsert: false, + } + ); + } +} diff --git a/indexer-service/src/helpers/synchronizers/synchronize-policy.ts b/indexer-service/src/helpers/synchronizers/synchronize-policy.ts index 292643c0fe..035ee6746c 100644 --- a/indexer-service/src/helpers/synchronizers/synchronize-policy.ts +++ b/indexer-service/src/helpers/synchronizers/synchronize-policy.ts @@ -1,30 +1,16 @@ import { DataBaseHelper, Message, TokenCache } from '@indexer/common'; -import { MessageType, MessageAction } from '@indexer/interfaces'; +import { MessageType, MessageAction, PolicyAnalytics } from '@indexer/interfaces'; import { textSearch } from '../text-search-options.js'; import { safetyRunning } from '../../utils/safety-running.js'; import { parsePolicyFile } from '../parsers/policy.parser.js'; import { HashComparator, PolicyLoader } from '../../analytics/index.js'; -interface IAnalytics { - owner: string | undefined; - textSearch: string | undefined; - tools: any[] | undefined; - tokens: string[] | undefined; - registryId: string | undefined; - vcCount: number | undefined; - vpCount: number | undefined; - tokensCount: number | undefined; - tags: string[] | undefined; - hash: string | undefined; - hashMap: any | undefined; -} - enum TokenType { FT = 'FUNGIBLE_COMMON', NFT = 'NON_FUNGIBLE_UNIQUE', } -async function findSR(policyRow: any, analytics: IAnalytics): Promise { +async function findSR(policyRow: any, analytics: PolicyAnalytics): Promise { const em = DataBaseHelper.getEntityManager(); const topicDescription = await em.findOne(Message, { type: MessageType.TOPIC, @@ -50,7 +36,7 @@ async function findSR(policyRow: any, analytics: IAnalytics): Promise { +async function findDocuments(policyRow: any, analytics: PolicyAnalytics): Promise { const em = DataBaseHelper.getEntityManager(); const topics = new Set(); topics.add(policyRow.options?.instanceTopicId); @@ -82,7 +68,7 @@ async function findDocuments(policyRow: any, analytics: IAnalytics): Promise { +async function findNFTs(policyRow: any, analytics: PolicyAnalytics): Promise { if (!analytics.tokens || !analytics.tokens.length) { analytics.tokensCount = 0; return analytics; @@ -103,7 +89,7 @@ async function findNFTs(policyRow: any, analytics: IAnalytics): Promise { +async function findTags(policyRow: any, analytics: PolicyAnalytics): Promise { analytics.tags = []; return analytics; } @@ -121,7 +107,7 @@ export async function synchronizePolicies() { index++; console.log(`Sync policies: ${index}/${count}`); const policyRow = await policies.next(); - const analytics: IAnalytics = { + const analytics: PolicyAnalytics = { owner: undefined, textSearch: textSearch(policyRow), tools: [], diff --git a/indexer-service/src/utils/parse-page-params.ts b/indexer-service/src/utils/parse-page-params.ts index e68df4e38f..ae052c2037 100644 --- a/indexer-service/src/utils/parse-page-params.ts +++ b/indexer-service/src/utils/parse-page-params.ts @@ -1,7 +1,7 @@ import { DataBaseUtils } from '@indexer/common'; -import { IPageFilters } from '@indexer/interfaces'; +import { PageFilters } from '@indexer/interfaces'; -export function parsePageParams(msg: IPageFilters, limit = 100) { +export function parsePageParams(msg: PageFilters, limit = 100) { return DataBaseUtils.pageParams( msg.pageSize, msg.pageIndex, diff --git a/indexer-service/src/utils/relationships.ts b/indexer-service/src/utils/relationships.ts index 2729848435..5cf15f9632 100644 --- a/indexer-service/src/utils/relationships.ts +++ b/indexer-service/src/utils/relationships.ts @@ -1,6 +1,6 @@ import { DataBaseHelper, Message } from '@indexer/common'; import { MongoDriver, MongoEntityManager } from '@mikro-orm/mongodb'; -import { MessageType } from '@indexer/interfaces'; +import { MessageType, Relationship, RELATIONSHIP_CATEGORIES } from '@indexer/interfaces'; const categories = [ MessageType.STANDARD_REGISTRY, @@ -15,7 +15,7 @@ class RelationshipItem { public readonly id: string; public readonly uuid: string; public readonly item: Message; - public readonly type: string; + public readonly type: MessageType; public readonly topicId: string; public readonly ids: Set; @@ -33,7 +33,7 @@ class RelationshipItem { this.item = item; this.topicId = item.topicId; this.uuid = item.uuid; - this.type = item.type; + this.type = item.type as MessageType; } this.ids = new Set(); @@ -81,7 +81,7 @@ class RelationshipItem { return this.ids.has(messageId); } - public toObject() { + public toObject(): Relationship { return { id: this.groupId, uuid: this.uuid, @@ -115,26 +115,7 @@ export class Relationships { message.toObject() ), links: this.links, - categories: [ - { - name: 'Registry', - }, - { - name: 'Policy', - }, - { - name: 'Schema', - }, - { - name: 'Role', - }, - { - name: 'VC', - }, - { - name: 'VP', - }, - ], + categories: RELATIONSHIP_CATEGORIES, }; } diff --git a/indexer-worker-service/package.json b/indexer-worker-service/package.json index d5db24e3c8..1d900a744f 100644 --- a/indexer-worker-service/package.json +++ b/indexer-worker-service/package.json @@ -1,8 +1,8 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@indexer/interfaces": "^2.26.2", - "@indexer/common": "^2.26.2", + "@indexer/interfaces": "^2.27.0", + "@indexer/common": "^2.27.0", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", "@nestjs/microservices": "^9.4.1", @@ -55,5 +55,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/indexer-worker-service/src/config.ts b/indexer-worker-service/src/config.ts index c687c68151..196dee2fa0 100644 --- a/indexer-worker-service/src/config.ts +++ b/indexer-worker-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false'){ } } } -console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/interfaces/package.json b/interfaces/package.json index 6dafbdc0e4..b6bbc97cc4 100644 --- a/interfaces/package.json +++ b/interfaces/package.json @@ -33,5 +33,5 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/interfaces/src/helpers/index.ts b/interfaces/src/helpers/index.ts index 7a0e4ffee3..977cbf24d9 100644 --- a/interfaces/src/helpers/index.ts +++ b/interfaces/src/helpers/index.ts @@ -7,4 +7,5 @@ export * from './sort-objects-array.js'; export * from './geojson-schema/index.js'; export * from './generate-document.js'; export * from './sentinel-hub/index.js'; -export * from './permissions-helper.js'; \ No newline at end of file +export * from './permissions-helper.js'; +export * from './policy-helper.js'; \ No newline at end of file diff --git a/interfaces/src/helpers/policy-helper.ts b/interfaces/src/helpers/policy-helper.ts new file mode 100644 index 0000000000..6496ddcf7a --- /dev/null +++ b/interfaces/src/helpers/policy-helper.ts @@ -0,0 +1,68 @@ +import { PolicyType } from '../type/index.js'; + +/** + * Policy helper + */ +export class PolicyHelper { + /** + * If policy running + * @param policy + */ + public static isRun(policy: { status?: PolicyType }): boolean { + if (policy && ( + policy.status === PolicyType.DRY_RUN || + policy.status === PolicyType.DEMO || + policy.status === PolicyType.PUBLISH || + policy.status === PolicyType.DISCONTINUED + )) { + return true; + } else { + return false; + } + } + + /** + * If policy running in dry run mode + * @param policy + */ + public static isDryRunMode(policy: { status?: PolicyType }): boolean { + if (policy && ( + policy.status === PolicyType.DRY_RUN || + policy.status === PolicyType.DEMO + )) { + return true; + } else { + return false; + } + } + + /** + * If policy running in publish mode + * @param policy + */ + public static isPublishMode(policy: { status?: PolicyType }): boolean { + if (policy && ( + policy.status === PolicyType.PUBLISH || + policy.status === PolicyType.DISCONTINUED + )) { + return true; + } else { + return false; + } + } + + /** + * If policy not running + * @param policy + */ + public static isEditMode(policy: { status?: PolicyType }): boolean { + if (policy && ( + policy.status === PolicyType.DRAFT || + policy.status === PolicyType.PUBLISH_ERROR + )) { + return true; + } else { + return false; + } + } +} diff --git a/interfaces/src/interface/owner.interface.ts b/interfaces/src/interface/owner.interface.ts index 62fcf21457..c7ac04fd34 100644 --- a/interfaces/src/interface/owner.interface.ts +++ b/interfaces/src/interface/owner.interface.ts @@ -4,6 +4,10 @@ import { AccessType } from '../type/access.type.js' * Entity owner */ export interface IOwner { + /** + * User ID + */ + id: string /** * Current user username */ diff --git a/interfaces/src/interface/user.interface.ts b/interfaces/src/interface/user.interface.ts index b46b5132b4..5afc95cb89 100644 --- a/interfaces/src/interface/user.interface.ts +++ b/interfaces/src/interface/user.interface.ts @@ -39,6 +39,11 @@ export interface IGroup { * User interface */ export interface IUser { + /** + * User ID + */ + id?: string; + /** * Was confirmed */ diff --git a/interfaces/src/models/entity-owner.ts b/interfaces/src/models/entity-owner.ts index 49306111d0..5e3fb5281e 100644 --- a/interfaces/src/models/entity-owner.ts +++ b/interfaces/src/models/entity-owner.ts @@ -6,6 +6,7 @@ import { Permissions } from '../type/permissions.type.js'; import { UserRole } from '../type/user-role.type.js'; export class EntityOwner implements IOwner { + public readonly id: string; public readonly parent: string; public readonly creator: string; public readonly owner: string; @@ -14,8 +15,9 @@ export class EntityOwner implements IOwner { constructor(user?: IUser) { if (user) { - this.parent = this.parent; + this.parent = user.parent; this.username = user.username; + this.id = user.id?.toString(); if (user.role === UserRole.USER) { this.creator = user.did; this.owner = user.parent; @@ -52,8 +54,9 @@ export class EntityOwner implements IOwner { } } - public static sr(did: string): IOwner { + public static sr(userId: string, did: string): IOwner { return { + id: userId, creator: did, owner: did, username: null, diff --git a/interfaces/src/type/index.ts b/interfaces/src/type/index.ts index ccf846f3f2..c7f6586e77 100644 --- a/interfaces/src/type/index.ts +++ b/interfaces/src/type/index.ts @@ -42,4 +42,6 @@ export * from './mint-transaction-status.type.js'; export * from './permissions.type.js'; export * from './document-category.type.js'; export * from './assigned-entity.type.js'; -export * from './access.type.js'; \ No newline at end of file +export * from './access.type.js'; +export * from './pino-log.type.js'; +export * from './policy-test-status.type.js'; diff --git a/interfaces/src/type/messages/message-api.type.ts b/interfaces/src/type/messages/message-api.type.ts index 432bc80305..3cf7a01b33 100644 --- a/interfaces/src/type/messages/message-api.type.ts +++ b/interfaces/src/type/messages/message-api.type.ts @@ -154,6 +154,7 @@ export enum MessageAPI { ERROR_EVENT = 'error-event', UPDATE_USER_INFO_EVENT = 'update-user-info-event', UPDATE_RECORD = 'update-record-event', + UPDATE_TEST_EVENT = 'update-test-event', MEECO_AUTH_REQUEST = 'MEECO_AUTH_REQUEST', MEECO_AUTH_PRESENT_VP = 'MEECO_AUTH_PRESENT_VP', MEECO_VERIFY_VP = 'MEECO_VERIFY_VP', @@ -214,7 +215,8 @@ export enum MessageAPI { CREATE_ROLE = 'CREATE_ROLE_VC', UPDATE_ROLE = 'UPDATE_ROLE_VC', DELETE_ROLE = 'DELETE_ROLE_VC', - SET_ROLE = 'SET_ROLE_VC' + SET_ROLE = 'SET_ROLE_VC', + CHECK_KEY_PERMISSIONS = 'CHECK_KEY_PERMISSIONS', } /** diff --git a/interfaces/src/type/messages/policy-engine-events.ts b/interfaces/src/type/messages/policy-engine-events.ts index 52accf0662..d352650eb6 100644 --- a/interfaces/src/type/messages/policy-engine-events.ts +++ b/interfaces/src/type/messages/policy-engine-events.ts @@ -62,6 +62,11 @@ export enum PolicyEngineEvents { UPLOAD_POLICY_DATA = 'policy-engine-event-upload-policy-data', UPLOAD_VIRTUAL_KEYS = 'policy-engine-event-upload-virtual-keys', GET_TAG_BLOCK_MAP = 'policy-engine-event-get-tag-block-map', - + ADD_POLICY_TEST = 'policy-engine-event-add-policy-test', + GET_POLICY_TEST= 'policy-engine-event-get-policy-test', + START_POLICY_TEST = 'policy-engine-event-start-policy-test', + STOP_POLICY_TEST = 'policy-engine-event-stop-policy-test', + DELETE_POLICY_TEST = 'policy-engine-event-delete-policy-test', + GET_POLICY_TEST_DETAILS = 'policy-engine-event-get-policy-test-details', ACCESS_POLICY = 'policy-engine-event-access-policy' } diff --git a/interfaces/src/type/messages/policy-events.ts b/interfaces/src/type/messages/policy-events.ts index 4d2b77d7f1..c3b1f8cd1a 100644 --- a/interfaces/src/type/messages/policy-events.ts +++ b/interfaces/src/type/messages/policy-events.ts @@ -28,6 +28,7 @@ export enum PolicyEvents { SET_VIRTUAL_USER = 'policy-event-login-virtual-user', GET_POLICY_NAVIGATION = 'policy-event-get-policy-navigation', RECORD_UPDATE_BROADCAST = 'policy-event-record-update-broadcast', + TEST_UPDATE_BROADCAST = 'policy-event-test-update-broadcast', GET_RECORD_STATUS = 'policy-event-get-record-status', START_RECORDING = 'policy-event-start-recording', STOP_RECORDING = 'policy-event-stop-recording', diff --git a/interfaces/src/type/pino-log.type.ts b/interfaces/src/type/pino-log.type.ts new file mode 100644 index 0000000000..a586fa768f --- /dev/null +++ b/interfaces/src/type/pino-log.type.ts @@ -0,0 +1,8 @@ +export enum PinoLogType { + TRACE = 'trace', + DEBUG = 'debug', + INFO = 'info', + WARN = 'warn', + ERROR = 'error', + FATAL = 'fatal', +} \ No newline at end of file diff --git a/interfaces/src/type/policy-test-status.type.ts b/interfaces/src/type/policy-test-status.type.ts new file mode 100644 index 0000000000..d36d110304 --- /dev/null +++ b/interfaces/src/type/policy-test-status.type.ts @@ -0,0 +1,10 @@ +/** + * Test Status + */ +export enum PolicyTestStatus { + New = 'New', + Running = 'Running', + Stopped = 'Stopped', + Success = 'Success', + Failure = 'Failure' +} diff --git a/interfaces/src/type/policy.type.ts b/interfaces/src/type/policy.type.ts index 9f67af74ec..ad6fac5b41 100644 --- a/interfaces/src/type/policy.type.ts +++ b/interfaces/src/type/policy.type.ts @@ -6,5 +6,6 @@ export enum PolicyType { DRAFT = 'DRAFT', PUBLISH_ERROR = 'PUBLISH_ERROR', PUBLISH = 'PUBLISH', - DISCONTINUED = 'DISCONTINUED' + DISCONTINUED = 'DISCONTINUED', + DEMO = 'DEMO' } \ No newline at end of file diff --git a/interfaces/src/type/schema-status.type.ts b/interfaces/src/type/schema-status.type.ts index 116de7e541..2fcb5a87c9 100644 --- a/interfaces/src/type/schema-status.type.ts +++ b/interfaces/src/type/schema-status.type.ts @@ -6,4 +6,5 @@ export enum SchemaStatus { PUBLISHED = 'PUBLISHED', UNPUBLISHED = 'UNPUBLISHED', ERROR = 'ERROR', + DEMO = 'DEMO' } diff --git a/logger-service/configs/.env.logger b/logger-service/configs/.env.logger index 0c889c0919..d1bba4bac0 100644 --- a/logger-service/configs/.env.logger +++ b/logger-service/configs/.env.logger @@ -11,7 +11,18 @@ DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" #MQ_MESSAGE_CHUNK=5000000 -# Mongo init +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/logger-service/configs/.env.logger.develop b/logger-service/configs/.env.logger.develop index 0c889c0919..d1bba4bac0 100644 --- a/logger-service/configs/.env.logger.develop +++ b/logger-service/configs/.env.logger.develop @@ -11,7 +11,18 @@ DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" #MQ_MESSAGE_CHUNK=5000000 -# Mongo init +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/logger-service/configs/.env.logger.template b/logger-service/configs/.env.logger.template index d20c53b64d..5363e445b2 100644 --- a/logger-service/configs/.env.logger.template +++ b/logger-service/configs/.env.logger.template @@ -11,7 +11,18 @@ DB_HOST="" MQ_MAX_PAYLOAD="" #MQ_MESSAGE_CHUNK=5000000 -# Mongo init -MIN_POOL_SIZE="1" -MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" \ No newline at end of file +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/logger-service/environments/environment.prod.ts b/logger-service/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/logger-service/environments/environment.prod.ts +++ b/logger-service/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/logger-service/package.json b/logger-service/package.json index 2abd7ef889..e8b777fab6 100644 --- a/logger-service/package.json +++ b/logger-service/package.json @@ -5,8 +5,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", "@nestjs/common": "^9.4.1", @@ -57,5 +57,5 @@ "watch": "nodemon src/index.ts" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/logger-service/src/api/logger.service.ts b/logger-service/src/api/logger.service.ts index 53705dbb46..b6da40a040 100644 --- a/logger-service/src/api/logger.service.ts +++ b/logger-service/src/api/logger.service.ts @@ -1,5 +1,4 @@ -import { Log } from '../entity/log.js'; -import { DataBaseHelper, LargePayloadContainer, MessageError, MessageResponse } from '@guardian/common'; +import { DataBaseHelper, LargePayloadContainer, MessageError, MessageResponse, Log } from '@guardian/common'; import { MessageAPI } from '@guardian/interfaces'; import { Controller, Module } from '@nestjs/common'; import { ClientsModule, Ctx, MessagePattern, NatsContext, Payload, Transport } from '@nestjs/microservices'; diff --git a/logger-service/src/app.ts b/logger-service/src/app.ts index c02c48b0d7..df8278344f 100644 --- a/logger-service/src/app.ts +++ b/logger-service/src/app.ts @@ -1,12 +1,9 @@ -import { ApplicationState, COMMON_CONNECTION_CONFIG, DataBaseHelper, LargePayloadContainer, MessageBrokerChannel, Migration } from '@guardian/common'; +import { ApplicationState, COMMON_CONNECTION_CONFIG, DataBaseHelper, LargePayloadContainer, MessageBrokerChannel, Migration, Log, mongoForLoggingInitialization } from '@guardian/common'; import { ApplicationStates } from '@guardian/interfaces'; -import { MikroORM } from '@mikro-orm/core'; -import { MongoDriver } from '@mikro-orm/mongodb'; import { NestFactory } from '@nestjs/core'; import { Deserializer, IncomingRequest, MicroserviceOptions, Serializer, Transport } from '@nestjs/microservices'; import process from 'process'; import { AppModule } from './app.module.js'; -import { DEFAULT_MONGO } from '#constants'; export class LoggerSerializer implements Serializer { serialize(value: any, options?: Record): any { @@ -27,18 +24,10 @@ Promise.all([ migrations: { path: 'dist/migrations', transactional: false - } - }), - MikroORM.init({ - ...COMMON_CONNECTION_CONFIG, - driverOptions: { - useUnifiedTopology: true, - minPoolSize: parseInt(process.env.MIN_POOL_SIZE ?? DEFAULT_MONGO.MIN_POOL_SIZE, 10), - maxPoolSize: parseInt(process.env.MAX_POOL_SIZE ?? DEFAULT_MONGO.MAX_POOL_SIZE, 10), - maxIdleTimeMS: parseInt(process.env.MAX_IDLE_TIME_MS ?? DEFAULT_MONGO.MAX_IDLE_TIME_MS, 10) }, - ensureIndexes: true, + entities: [Log], }), + mongoForLoggingInitialization(), MessageBrokerChannel.connect('LOGGER_SERVICE'), NestFactory.createMicroservice(AppModule,{ transport: Transport.NATS, @@ -68,7 +57,14 @@ Promise.all([ new LargePayloadContainer().runServer(); } - state.updateState(ApplicationStates.READY); + const isMongoTransport = process.env.TRANSPORTS.includes('MONGO') + + if(isMongoTransport) { + await state.updateState(ApplicationStates.READY); + } else { + await state.updateState(ApplicationStates.STOPPED); + } + // const maxPayload = parseInt(process.env.MQ_MAX_PAYLOAD, 10); // if (Number.isInteger(maxPayload)) { // new LargePayloadContainer().runServer(); diff --git a/logger-service/src/config.ts b/logger-service/src/config.ts index fe52645dd0..0129e97476 100644 --- a/logger-service/src/config.ts +++ b/logger-service/src/config.ts @@ -22,4 +22,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false'){ } } } -console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/mrv-sender/package.json b/mrv-sender/package.json index a4ba628408..d6d1f4261f 100644 --- a/mrv-sender/package.json +++ b/mrv-sender/package.json @@ -5,7 +5,7 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^2.26.2", + "@guardian/common": "^2.27.0", "@transmute/credentials-context": "0.7.0-unstable.80", "@transmute/did-context": "0.7.0-unstable.80", "@transmute/ed25519-signature-2018": "0.7.0-unstable.80", @@ -44,5 +44,5 @@ "start": "node dist/index.js" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/notification-service/configs/.env.notification b/notification-service/configs/.env.notification index d79a40ed55..230122e571 100644 --- a/notification-service/configs/.env.notification +++ b/notification-service/configs/.env.notification @@ -5,7 +5,18 @@ MQ_ADDRESS="localhost" DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" -# Mongo init +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" MAX_IDLE_TIME_MS="30000" diff --git a/notification-service/configs/.env.notification.develop b/notification-service/configs/.env.notification.develop index eadc762546..bd358c5962 100644 --- a/notification-service/configs/.env.notification.develop +++ b/notification-service/configs/.env.notification.develop @@ -5,7 +5,18 @@ MQ_ADDRESS="localhost" DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" -# Mongo init +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/notification-service/configs/.env.notification.template b/notification-service/configs/.env.notification.template index eadc762546..03d7341d57 100644 --- a/notification-service/configs/.env.notification.template +++ b/notification-service/configs/.env.notification.template @@ -5,7 +5,18 @@ MQ_ADDRESS="localhost" DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" -# Mongo init -MIN_POOL_SIZE="1" -MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" \ No newline at end of file +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/notification-service/environments/environment.prod.ts b/notification-service/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/notification-service/environments/environment.prod.ts +++ b/notification-service/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/notification-service/package.json b/notification-service/package.json index 595b4cb55d..a78823fa6e 100644 --- a/notification-service/package.json +++ b/notification-service/package.json @@ -5,8 +5,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@mikro-orm/core": "6.2.2", "@mikro-orm/mongodb": "6.2.2", "@nestjs/common": "^9.4.1", @@ -56,5 +56,5 @@ "watch": "nodemon src/index.ts" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/notification-service/src/app.ts b/notification-service/src/app.ts index 05d2d5ad71..e74bb99ac5 100644 --- a/notification-service/src/app.ts +++ b/notification-service/src/app.ts @@ -1,4 +1,4 @@ -import { ApplicationState, COMMON_CONNECTION_CONFIG, DataBaseHelper, Logger, MessageBrokerChannel, Migration, } from '@guardian/common'; +import { ApplicationState, COMMON_CONNECTION_CONFIG, DataBaseHelper, MessageBrokerChannel, Migration, mongoForLoggingInitialization, PinoLogger, pinoLoggerInitialization } from '@guardian/common'; import { ApplicationStates } from '@guardian/interfaces'; import { MikroORM } from '@mikro-orm/core'; import { MongoDriver } from '@mikro-orm/mongodb'; @@ -35,14 +35,15 @@ Promise.all([ servers: [`nats://${process.env.MQ_ADDRESS}:4222`], }, }), + mongoForLoggingInitialization() ]).then( async (values) => { - const [_, db, mqConnection, app] = values; + const [_, db, mqConnection, app, loggerMongo] = values; DataBaseHelper.orm = db; app.listen(); - new Logger().setConnection(mqConnection); + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); const state = new ApplicationState(); await state @@ -52,7 +53,7 @@ Promise.all([ state.updateState(ApplicationStates.STARTED); state.updateState(ApplicationStates.INITIALIZING); state.updateState(ApplicationStates.READY); - await new Logger().info('notification service started', ['NOTIFICATION_SERVICE']); + await logger.info('notification service started', ['NOTIFICATION_SERVICE']); }, (reason) => { console.log(reason); diff --git a/notification-service/src/config.ts b/notification-service/src/config.ts index 5738c47dd3..97299eb58a 100644 --- a/notification-service/src/config.ts +++ b/notification-service/src/config.ts @@ -24,4 +24,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false') { } } } -console.log('Charged Environment', process.env, '\r\n___ . ___'); diff --git a/package.json b/package.json index 721873c437..0b9a3fa3fe 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "indexer-service", "indexer-worker-service" ], - "version": "2.26.2", + "version": "2.27.0", "devDependencies": { "detect-secrets": "^1.0.6" }, diff --git a/policy-service/configs/.env.policy b/policy-service/configs/.env.policy index 00d054208a..71f942111e 100644 --- a/policy-service/configs/.env.policy +++ b/policy-service/configs/.env.policy @@ -47,7 +47,17 @@ HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" HASHICORP_ENCRIPTION_ALG="sha512" -# Mongo init +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/policy-service/configs/.env.policy.develop b/policy-service/configs/.env.policy.develop index 373b76b714..7ffa40e6da 100644 --- a/policy-service/configs/.env.policy.develop +++ b/policy-service/configs/.env.policy.develop @@ -46,7 +46,17 @@ HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" HASHICORP_ENCRIPTION_ALG="sha512" -# Mongo init +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT MIN_POOL_SIZE="1" MAX_POOL_SIZE="5" MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/policy-service/configs/.env.policy.template b/policy-service/configs/.env.policy.template index c42ad969fc..b6710f6d70 100644 --- a/policy-service/configs/.env.policy.template +++ b/policy-service/configs/.env.policy.template @@ -47,7 +47,17 @@ HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" HASHICORP_ENCRIPTION_ALG="sha512" -# Mongo init -MIN_POOL_SIZE="1" -MAX_POOL_SIZE="5" -MAX_IDLE_TIME_MS="30000" \ No newline at end of file +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/policy-service/environments/environment.prod.ts b/policy-service/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/policy-service/environments/environment.prod.ts +++ b/policy-service/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/policy-service/package.json b/policy-service/package.json index bff85c3665..f256186470 100644 --- a/policy-service/package.json +++ b/policy-service/package.json @@ -15,8 +15,8 @@ "image-size": "1.0.2" }, "dependencies": { - "@guardian/common": "2.26.2", - "@guardian/interfaces": "2.26.2", + "@guardian/common": "2.27.0", + "@guardian/interfaces": "2.27.0", "@hashgraph/sdk": "2.46.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "2.0.2", @@ -100,5 +100,5 @@ "test:stability": "mocha tests/stability.test.js" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/policy-service/src/api/policy-process.ts b/policy-service/src/api/policy-process.ts index cb8855d228..7845f09536 100644 --- a/policy-service/src/api/policy-process.ts +++ b/policy-service/src/api/policy-process.ts @@ -1,5 +1,24 @@ import '../config.js' -import { COMMON_CONNECTION_CONFIG, DataBaseHelper, DatabaseServer, entities, Environment, ExternalEventChannel, IPFS, LargePayloadContainer, Logger, MessageBrokerChannel, MessageServer, NotificationService, OldSecretManager, Users, Workers } from '@guardian/common'; +import { + COMMON_CONNECTION_CONFIG, + DataBaseHelper, + DatabaseServer, + entities, + Environment, + ExternalEventChannel, + IPFS, + LargePayloadContainer, + mongoForLoggingInitialization, + PinoLogger, + pinoLoggerInitialization, + MessageBrokerChannel, + MessageServer, + NotificationService, + OldSecretManager, + Users, + Wallet, + Workers, +} from '@guardian/common'; import { MikroORM } from '@mikro-orm/core'; import { MongoDriver } from '@mikro-orm/mongodb'; import { BlockTreeGenerator } from '../policy-engine/block-tree-generator.js'; @@ -50,9 +69,10 @@ Promise.all([ `nats://${process.env.MQ_ADDRESS}:4222` ] }, - }) + }), + mongoForLoggingInitialization() ]).then(async values => { - const [db, cn, app] = values; + const [db, cn, app, loggerMongo] = values; app.listen(); DataBaseHelper.orm = db; // @ts-ignore @@ -63,12 +83,14 @@ Promise.all([ const policyConfig = await DatabaseServer.getPolicyById(policyId); + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); + if (process.env.HEDERA_CUSTOM_NODES) { try { const nodes = JSON.parse(process.env.HEDERA_CUSTOM_NODES); Environment.setNodes(nodes); } catch (error) { - await new Logger().warn( + await logger.warn( 'HEDERA_CUSTOM_NODES field in settings: ' + error.message, ['POLICY', policyConfig.name, policyId.toString()] ); @@ -82,7 +104,7 @@ Promise.all([ ); Environment.setMirrorNodes(mirrorNodes); } catch (error) { - await new Logger().warn( + await logger.warn( 'HEDERA_CUSTOM_MIRROR_NODES field in settings: ' + error.message, ['POLICY', policyConfig.name, policyId.toString()] @@ -95,23 +117,23 @@ Promise.all([ const channel = new MessageBrokerChannel(cn, policyServiceName); new CommonVariables().setVariable('channel', channel); - new Logger().setConnection(cn); new BlockTreeGenerator().setConnection(cn); IPFS.setChannel(channel); new ExternalEventChannel().setChannel(channel); await new OldSecretManager().setConnection(cn).init(); await new Users().setConnection(cn).init(); + await new Wallet().setConnection(cn).init(); const workersHelper = new Workers(); await workersHelper.setConnection(cn).init();; workersHelper.initListeners(); // try { - new Logger().info(`Process for with id ${policyId} was started started PID: ${process.pid}`, ['POLICY', policyId]); + await logger.info(`Process for with id ${policyId} was started started PID: ${process.pid}`, ['POLICY', policyId]); const generator = new BlockTreeGenerator(); const policyValidator = new PolicyValidator(policyConfig); - const policyModel = await generator.generate(policyConfig, skipRegistration, policyValidator); + const policyModel = await generator.generate(policyConfig, skipRegistration, policyValidator, logger); if ((policyModel as { type: 'error', message: string }).type === 'error') { await generator.publish(PolicyEvents.POLICY_READY, { policyId: policyId.toString(), @@ -121,10 +143,11 @@ Promise.all([ // throw new Error((policyModel as {type: 'error', message: string}).message); } - const synchronizationService = new SynchronizationService(policyConfig); + const synchronizationService = new SynchronizationService(policyConfig, logger); synchronizationService.start(); - generator.getPolicyMessages(PolicyEvents.DELETE_POLICY, policyId, () => { + generator.getPolicyMessages(PolicyEvents.DELETE_POLICY, policyId, async () => { + await generator.destroyModel(policyId, logger) synchronizationService.stop(); process.exit(0); }); @@ -139,7 +162,7 @@ Promise.all([ new LargePayloadContainer().runServer(); } - new Logger().info('Start policy', ['POLICY', policyConfig.name, policyId.toString()]); + await logger.info('Start policy', ['POLICY', policyConfig.name, policyId.toString()]); // } catch (e) { // process.exit(500); // } diff --git a/policy-service/src/app.ts b/policy-service/src/app.ts index 75d9b5ede4..7fce0e2930 100644 --- a/policy-service/src/app.ts +++ b/policy-service/src/app.ts @@ -1,4 +1,4 @@ -import { ApplicationState, LargePayloadContainer, Logger, MessageBrokerChannel } from '@guardian/common'; +import { ApplicationState, LargePayloadContainer, MessageBrokerChannel, mongoForLoggingInitialization, PinoLogger, pinoLoggerInitialization } from '@guardian/common'; import { ApplicationStates } from '@guardian/interfaces'; import { PolicyContainer } from './helpers/policy-container.js'; import { startMetricsServer } from './utils/metrics.js'; @@ -6,29 +6,29 @@ import { startMetricsServer } from './utils/metrics.js'; export const obj = {}; Promise.all([ - MessageBrokerChannel.connect('policy-service') + MessageBrokerChannel.connect('policy-service'), + mongoForLoggingInitialization() ]).then(async values => { - const [cn] = values; + const [cn, loggerMongo] = values; + + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); - new Logger().setConnection(cn); const state = new ApplicationState(); await state.setServiceName('POLICY_SERVICE').setConnection(cn).init(); await state.updateState(ApplicationStates.STARTED); - ///////////// - state.updateState(ApplicationStates.INITIALIZING); // await new PolicyContainer().setConnection(cn).init(); - const c = new PolicyContainer(); + const c = new PolicyContainer(logger); await c.setConnection(cn).init(); const maxPayload = parseInt(process.env.MQ_MAX_PAYLOAD, 10); if (Number.isInteger(maxPayload)) { new LargePayloadContainer().runServer(); } - await new Logger().info('Policy service started', ['POLICY_SERVICE']); + await logger.info('Policy service started', ['POLICY_SERVICE']); await state.updateState(ApplicationStates.READY); diff --git a/policy-service/src/config.ts b/policy-service/src/config.ts index f56aaa7b28..2f61f4eae4 100644 --- a/policy-service/src/config.ts +++ b/policy-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false'){ } } } -console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/policy-service/src/helpers/mongo-initialization.ts b/policy-service/src/helpers/mongo-initialization.ts new file mode 100644 index 0000000000..41da29f83f --- /dev/null +++ b/policy-service/src/helpers/mongo-initialization.ts @@ -0,0 +1,27 @@ +import { MikroORM } from '@mikro-orm/core'; +import { MongoDriver } from '@mikro-orm/mongodb'; + +import process from 'process'; + +//helpers +import { COMMON_CONNECTION_CONFIG } from '@guardian/common'; + +//constants +import { DEFAULT_MONGO } from '#constants'; + +export async function mongoInitialization() { + if (!process.env.DB_DATABASE) { + return null; + } + + return MikroORM.init({ + ...COMMON_CONNECTION_CONFIG, + driverOptions: { + useUnifiedTopology: true, + minPoolSize: parseInt(process.env.MIN_POOL_SIZE ?? DEFAULT_MONGO.MIN_POOL_SIZE, 10), + maxPoolSize: parseInt(process.env.MAX_POOL_SIZE ?? DEFAULT_MONGO.MAX_POOL_SIZE, 10), + maxIdleTimeMS: parseInt(process.env.MAX_IDLE_TIME_MS ?? DEFAULT_MONGO.MAX_IDLE_TIME_MS, 10), + }, + ensureIndexes: true, + }); +} \ No newline at end of file diff --git a/policy-service/src/helpers/policy-container.ts b/policy-service/src/helpers/policy-container.ts index 5bc56a9209..0f618515e4 100644 --- a/policy-service/src/helpers/policy-container.ts +++ b/policy-service/src/helpers/policy-container.ts @@ -1,4 +1,4 @@ -import { Logger, MessageResponse, NatsService, Singleton } from '@guardian/common'; +import { MessageResponse, NatsService, PinoLogger, Singleton } from '@guardian/common'; import { ChildProcess, execFile, fork } from 'node:child_process'; import process from 'process'; import { GenerateUUIDv4, PolicyEvents } from '@guardian/interfaces'; @@ -130,12 +130,6 @@ export class PolicyContainer extends NatsService { return this.container.size } - /** - * Logger instance - * @private - */ - private readonly logger: Logger - /** * Generate policy subscription * @private @@ -148,14 +142,13 @@ export class PolicyContainer extends NatsService { */ private startNewPolicyServiceTriggered: boolean = false; - constructor() { + constructor(private readonly logger: PinoLogger) { super(); this.container = new Map(); this.maxPolicyInstances = (process.env.MAX_POLICY_INSTANCES) ? parseInt(process.env.MAX_POLICY_INSTANCES, 10) : 1000; this.runServiceScript = process.env.RUN_SERVICE_SCRIPT; this.stopServiceScript = process.env.RUN_SERVICE_SCRIPT; this.instanceId = GenerateUUIDv4(); - this.logger = new Logger(); this._policiInfoArrays = new Map(); } diff --git a/policy-service/src/policy-engine/block-tree-generator.ts b/policy-service/src/policy-engine/block-tree-generator.ts index 0feba77c36..502513d140 100644 --- a/policy-service/src/policy-engine/block-tree-generator.ts +++ b/policy-service/src/policy-engine/block-tree-generator.ts @@ -1,7 +1,7 @@ import { IPolicyBlock, IPolicyInstance, IPolicyInterfaceBlock, IPolicyNavigationStep } from './policy-engine.interface.js'; import { PolicyComponentsUtils } from './policy-components-utils.js'; import { GenerateUUIDv4, IUser, PolicyEvents } from '@guardian/interfaces'; -import { DataBaseHelper, DatabaseServer, Logger, MessageError, MessageResponse, NatsService, Policy, Singleton, Users, } from '@guardian/common'; +import { DataBaseHelper, DatabaseServer, MessageError, MessageResponse, NatsService, PinoLogger, Policy, Singleton, Users } from '@guardian/common'; import { PolicyUser } from './policy-user.js'; import { PolicyValidator } from '../policy-engine/block-validators/index.js' import { headers } from 'nats'; @@ -131,13 +131,13 @@ export class BlockTreeGenerator extends NatsService { this.getPolicyMessages(PolicyEvents.GET_BLOCK_DATA, policyId, async (msg: any) => { - const { user, blockId } = msg; + const { user, blockId, params } = msg; const userFull = await this.getUser(policyInstance, user); const block = PolicyComponentsUtils.GetBlockByUUID(blockId); if (block && (await block.isAvailable(userFull))) { - const data = await block.getData(userFull, blockId, null); + const data = await block.getData(userFull, blockId, params); return new MessageResponse(data); } else { return new MessageResponse(null); @@ -145,7 +145,7 @@ export class BlockTreeGenerator extends NatsService { }); this.getPolicyMessages(PolicyEvents.GET_BLOCK_DATA_BY_TAG, policyId, async (msg: any) => { - const { user, tag } = msg; + const { user, tag, params } = msg; const userFull = await this.getUser(policyInstance, user); const block = PolicyComponentsUtils.GetBlockByTag(policyId, tag); @@ -156,7 +156,7 @@ export class BlockTreeGenerator extends NatsService { 'Block is not supporting get data functions' ); } - const data = await block.getData(userFull, block.uuid, null); + const data = await block.getData(userFull, block.uuid, params); return new MessageResponse(data); } else { return new MessageResponse(null); @@ -323,16 +323,27 @@ export class BlockTreeGenerator extends NatsService { }); } + public async destroyModel(policyId: string, logger: PinoLogger): Promise { + try { + await RecordUtils.DestroyRecording(policyId); + await RecordUtils.DestroyRunning(policyId); + } catch (error) { + await logger.error(`Error destroy policy ${error}`, ['POLICY', policyId.toString()]); + } + } + /** * Generate policy instance from config * @param policy * @param skipRegistration * @param policyValidator + * @param logger */ public async generate( policy: Policy, skipRegistration: boolean, - policyValidator: PolicyValidator + policyValidator: PolicyValidator, + logger: PinoLogger ): Promise { if (!policy || (typeof policy !== 'object')) { throw new Error('Policy was not exist'); @@ -371,7 +382,7 @@ export class BlockTreeGenerator extends NatsService { return rootInstance; } catch (error) { - new Logger().error(`Error build policy ${error}`, ['POLICY', policy.name, policyId.toString()]); + await logger.error(`Error build policy ${error}`, ['POLICY', policy.name, policyId.toString()]); policyValidator.addError(typeof error === 'string' ? error : error.message); return { type: 'error', diff --git a/policy-service/src/policy-engine/blocks/custom-logic-block.ts b/policy-service/src/policy-engine/blocks/custom-logic-block.ts index e08d073223..f444b1b243 100644 --- a/policy-service/src/policy-engine/blocks/custom-logic-block.ts +++ b/policy-service/src/policy-engine/blocks/custom-logic-block.ts @@ -48,12 +48,20 @@ interface IMetadata { PolicyOutputEventType.ErrorEvent ], defaultEvent: true, - properties: [{ - name: 'unsigned', - label: 'Unsigned VC', - title: 'Unsigned document', - type: PropertyType.Checkbox - }] + properties: [ + { + name: 'unsigned', + label: 'Unsigned VC', + title: 'Unsigned document', + type: PropertyType.Checkbox + }, + { + name: 'passOriginal', + label: 'Pass original', + title: 'Pass original document', + type: PropertyType.Checkbox + } + ] }, variables: [ { path: 'options.outputSchema', alias: 'schema', type: 'Schema' } @@ -84,17 +92,19 @@ export class CustomLogicBlock { const ref = PolicyComponentsUtils.GetBlockRef(this); try { - const documents = await this.execute(event.data, event.user); - if (!documents) { - return; + const triggerEvents = (documents: IPolicyDocument | IPolicyDocument[]) => { + if (!documents) { + return; + } + event.data.data = documents; + ref.triggerEvents(PolicyOutputEventType.RunEvent, event.user, event.data); + ref.triggerEvents(PolicyOutputEventType.ReleaseEvent, event.user, null); + ref.triggerEvents(PolicyOutputEventType.RefreshEvent, event.user, event.data); + PolicyComponentsUtils.ExternalEventFn(new ExternalEvent(ExternalEventType.Run, ref, event?.user, { + documents: ExternalDocuments(event?.data?.data) + })); } - event.data.data = documents; - ref.triggerEvents(PolicyOutputEventType.RunEvent, event.user, event.data); - ref.triggerEvents(PolicyOutputEventType.ReleaseEvent, event.user, null); - ref.triggerEvents(PolicyOutputEventType.RefreshEvent, event.user, event.data); - PolicyComponentsUtils.ExternalEventFn(new ExternalEvent(ExternalEventType.Run, ref, event?.user, { - documents: ExternalDocuments(event?.data?.data) - })); + await this.execute(event.data, event.user, triggerEvents); } catch (error) { ref.error(PolicyUtils.getErrorMessage(error)); } @@ -125,7 +135,7 @@ export class CustomLogicBlock { * @param state * @param user */ - execute(state: IPolicyEventState, user: PolicyUser): Promise { + execute(state: IPolicyEventState, user: PolicyUser, triggerEvents: (documents: IPolicyDocument | IPolicyDocument[]) => void): Promise { return new Promise(async (resolve, reject) => { try { const ref = PolicyComponentsUtils.GetBlockRef(this); @@ -143,12 +153,18 @@ export class CustomLogicBlock { metadata = await this.aggregateMetadata(documents, user, ref); } - const done = async (result: any | any[]) => { + const done = async (result: any | any[], final: boolean) => { if (!result) { - resolve(null); + triggerEvents(null); + if (final) { + resolve(null); + } return; } const processing = async (json: any): Promise => { + if (ref.options.passOriginal) { + return json; + } if (ref.options.unsigned) { return await this.createUnsignedDocument(json, ref); } else { @@ -160,10 +176,16 @@ export class CustomLogicBlock { for (const r of result) { items.push(await processing(r)) } - resolve(items); + triggerEvents(items); + if (final) { + resolve(items); + } return; } else { - resolve(await processing(result)); + triggerEvents(await processing(result)); + if (final) { + resolve(await processing(result)); + } return; } } @@ -200,9 +222,9 @@ export class CustomLogicBlock { worker.on('error', (error) => { reject(error); }); - worker.on('message', async (result) => { + worker.on('message', async (data) => { try { - await done(result); + await done(data.result, data.final); } catch (error) { reject(error); } diff --git a/policy-service/src/policy-engine/blocks/documents-source.ts b/policy-service/src/policy-engine/blocks/documents-source.ts index f08f7a4f86..8afba08128 100644 --- a/policy-service/src/policy-engine/blocks/documents-source.ts +++ b/policy-service/src/policy-engine/blocks/documents-source.ts @@ -83,7 +83,14 @@ export class InterfaceDocumentsSource { async getData(user: PolicyUser, uuid: string, queryParams: any): Promise { const ref = PolicyComponentsUtils.GetBlockRef(this); - const filters = ref.getFiltersAddons().map(addon => { + if (!queryParams) { + queryParams = {}; + } + + const {itemsPerPage, page, size, filterByUUID, ...filterIds} = queryParams; + + const filterAddons = ref.getFiltersAddons(); + const filters = filterAddons.map(addon => { return { id: addon.uuid, uiMetaData: addon.options.uiMetaData, @@ -91,6 +98,17 @@ export class InterfaceDocumentsSource { } }); + if (filterIds) { + for (const filterId of Object.keys(filterIds)) { + const filter = filterAddons.find((_filter) => { + return (_filter.uuid === filterId) || (_filter.tag === filterId); + }); + if (filter) { + await (filter as IPolicyAddonBlock).setFilterState(user, {filterValue: filterIds[filterId]}); + } + } + } + const commonAddonBlocks = ref.getCommonAddons(); const commonAddons = commonAddonBlocks.map(addon => { return { @@ -105,7 +123,12 @@ export class InterfaceDocumentsSource { }) as IPolicyAddonBlock; let paginationData = null; + if (pagination) { + if (itemsPerPage && page) { + await pagination.setState(user, {itemsPerPage, page, size}); + } + paginationData = await pagination.getState(user); } @@ -156,6 +179,11 @@ export class InterfaceDocumentsSource { data = await child.joinData(data, user, ref); } + if (filterByUUID) { + const doc = data.find(d => d.document.id === filterByUUID); + data = [doc]; + } + return Object.assign( { data, diff --git a/policy-service/src/policy-engine/blocks/filters-addon-block.ts b/policy-service/src/policy-engine/blocks/filters-addon-block.ts index fdf4301d7f..729e768971 100644 --- a/policy-service/src/policy-engine/blocks/filters-addon-block.ts +++ b/policy-service/src/policy-engine/blocks/filters-addon-block.ts @@ -107,12 +107,7 @@ export class FiltersAddonBlock { return block; } - /** - * Set block data - * @param user - * @param data - */ - async setData(user: PolicyUser, data: any) { + async setFilterState(user: PolicyUser, data: any): Promise { const ref = PolicyComponentsUtils.GetBlockRef(this); const filter: any = {}; if (!data) { @@ -134,6 +129,16 @@ export class FiltersAddonBlock { this.state[user.id] = blockState; } ref.setFilters(filter, user); + } + + /** + * Set block data + * @param user + * @param data + */ + async setData(user: PolicyUser, data: any) { + await this.setFilterState(user, data); + const ref = PolicyComponentsUtils.GetBlockRef(this); PolicyComponentsUtils.ExternalEventFn(new ExternalEvent(ExternalEventType.Set, ref, user, data)); } } diff --git a/policy-service/src/policy-engine/blocks/pagination-addon.ts b/policy-service/src/policy-engine/blocks/pagination-addon.ts index ced2ab27a8..73d2d0c0c4 100644 --- a/policy-service/src/policy-engine/blocks/pagination-addon.ts +++ b/policy-service/src/policy-engine/blocks/pagination-addon.ts @@ -60,6 +60,23 @@ export class PaginationAddon { return this.state[user.id]; } + /** + * Set pagination state + * @param user + * @param data + */ + public async setState(user: PolicyUser, data: any): Promise { + const {size, itemsPerPage, page} = data; + this.state[user.id] = {size, itemsPerPage, page}; + + const ref = PolicyComponentsUtils.GetBlockRef(this); + const totalCount = await (ref.parent as IPolicySourceBlock).getGlobalSources(user, null, true); + + if (this.state[user.id].size !== totalCount) { + this.state[user.id].size = totalCount; + } + } + /** * Get block data * @param user diff --git a/policy-service/src/policy-engine/helpers/components-service.ts b/policy-service/src/policy-engine/helpers/components-service.ts index 9ea88c2b36..3fbf858385 100644 --- a/policy-service/src/policy-engine/helpers/components-service.ts +++ b/policy-service/src/policy-engine/helpers/components-service.ts @@ -6,7 +6,7 @@ import { Schema as SchemaCollection, VcHelper } from '@guardian/common'; -import { GenerateUUIDv4, PolicyType, SchemaEntity } from '@guardian/interfaces'; +import { GenerateUUIDv4, PolicyHelper, SchemaEntity } from '@guardian/interfaces'; import { PrivateKey } from '@hashgraph/sdk'; import { IPolicyBlock } from '../policy-engine.interface.js'; import { PolicyUser } from '../policy-user.js'; @@ -63,7 +63,7 @@ export class ComponentsService { this.owner = policy.owner; this.policyId = policyId; this.topicId = policy.topicId; - if (policy && policy.status === PolicyType.DRY_RUN) { + if (PolicyHelper.isDryRunMode(policy)) { this.dryRunId = policyId; } else { this.dryRunId = null; @@ -300,6 +300,40 @@ export class ComponentsService { this._runningController = null; return old.finished(); } + return true; + } + + /** + * Destroy Recording + */ + public async destroyRecording(): Promise { + if (this._recordingController) { + const old = this._recordingController; + this._recordingController = null; + return await old.destroy(); + } + if (this._runningController) { + const old = this._runningController; + this._runningController = null; + return await old.destroy(); + } + return false; + } + + /** + * Destroy Running + */ + public async destroyRunning(): Promise { + if (this._recordingController) { + const old = this._recordingController; + this._recordingController = null; + return await old.destroy(); + } + if (this._runningController) { + const old = this._runningController; + this._runningController = null; + return await old.destroy(); + } return false; } @@ -313,20 +347,21 @@ export class ComponentsService { actions: any[], results: any[], options: any - ): Promise { + ): Promise { if (this._recordingController) { - return false; + return null; } - if (!this._runningController) { - this._runningController = new Running( - this.root, - this.policyId, - this.owner, - actions, - results, - options - ); + if (this._runningController) { + this._runningController.finished(); } + this._runningController = new Running( + this.root, + this.policyId, + this.owner, + actions, + results, + options + ); return this._runningController.start(); } diff --git a/policy-service/src/policy-engine/helpers/custom-logic-worker.ts b/policy-service/src/policy-engine/helpers/custom-logic-worker.ts index a32910722f..5c3865e52b 100644 --- a/policy-service/src/policy-engine/helpers/custom-logic-worker.ts +++ b/policy-service/src/policy-engine/helpers/custom-logic-worker.ts @@ -6,8 +6,8 @@ import * as formulajs from '@formulajs/formulajs' * Execute function */ function execute(): void { - const done = (result) => { - parentPort.postMessage(result); + const done = (result, final = true) => { + parentPort.postMessage({result, final}); } const { execFunc, user, documents, artifacts, sources } = workerData; diff --git a/policy-service/src/policy-engine/helpers/decorators/basic-block.ts b/policy-service/src/policy-engine/helpers/decorators/basic-block.ts index 569c2c9c58..3a33c89f0b 100644 --- a/policy-service/src/policy-engine/helpers/decorators/basic-block.ts +++ b/policy-service/src/policy-engine/helpers/decorators/basic-block.ts @@ -1,12 +1,12 @@ import { PolicyBlockDefaultOptions } from '../../helpers/policy-block-default-options.js'; import { BlockCacheType, EventConfig } from '../../interfaces/index.js'; import { PolicyBlockDecoratorOptions, PolicyBlockFullArgumentList } from '../../interfaces/block-options.js'; -import { PolicyRole, PolicyType } from '@guardian/interfaces'; +import { PolicyHelper, PolicyRole, PolicyType } from '@guardian/interfaces'; import { AnyBlockType, IPolicyBlock, IPolicyDocument, ISerializedBlock, } from '../../policy-engine.interface.js'; import { PolicyComponentsUtils } from '../../policy-components-utils.js'; import { IPolicyEvent, PolicyLink } from '../../interfaces/policy-event.js'; import { PolicyInputEventType, PolicyOutputEventType } from '../../interfaces/policy-event-type.js'; -import { Logger, DatabaseServer, Policy } from '@guardian/common'; +import { DatabaseServer, Policy, PinoLogger } from '@guardian/common'; import deepEqual from 'deep-equal'; import { PolicyUser } from '../../policy-user.js'; import { ComponentsService } from '../components-service.js'; @@ -92,7 +92,7 @@ export function BasicBlock(options: Partial) { * Logger instance * @protected */ - protected logger: Logger; + protected logger: PinoLogger; /** * Policy id */ @@ -177,7 +177,7 @@ export function BasicBlock(options: Partial) { this.components = _components; this.databaseServer = this.components.databaseServer; this._dryRun = null; - this.logger = new Logger(); + this.logger = new PinoLogger(); if (this.parent) { this.parent.registerChild(this as any as IPolicyBlock); @@ -469,7 +469,7 @@ export function BasicBlock(options: Partial) { public setPolicyInstance(policyId: string, policy: Policy) { this.policyInstance = policy; this.policyId = policyId; - if (this.policyInstance && this.policyInstance.status === PolicyType.DRY_RUN) { + if (PolicyHelper.isDryRunMode(this.policyInstance)) { this._dryRun = this.policyId; } else { this._dryRun = null; diff --git a/policy-service/src/policy-engine/helpers/decorators/catch-errors.ts b/policy-service/src/policy-engine/helpers/decorators/catch-errors.ts index 68af97dc72..2cc3eeb953 100644 --- a/policy-service/src/policy-engine/helpers/decorators/catch-errors.ts +++ b/policy-service/src/policy-engine/helpers/decorators/catch-errors.ts @@ -1,6 +1,6 @@ import { BlockErrorActions } from '@guardian/interfaces'; import { PolicyComponentsUtils } from '../../policy-components-utils.js'; -import { Logger } from '@guardian/common'; +import { PinoLogger } from '@guardian/common'; import { PolicyOutputEventType } from '../../interfaces/index.js'; /** @@ -18,7 +18,7 @@ export function CatchErrors() { try { await target.apply(thisArg, argArray); } catch (error) { - await new Logger().error(error, ['guardian-service', thisArg.uuid, thisArg.blockType, 'block-runtime', thisArg.policyId]); + await new PinoLogger().error(error, ['guardian-service', thisArg.uuid, thisArg.blockType, 'block-runtime', thisArg.policyId]); PolicyComponentsUtils.BlockErrorFn(thisArg.blockType, error.message, user); thisArg.triggerEvents(PolicyOutputEventType.ErrorEvent, user, data); switch (thisArg.options.onErrorAction) { diff --git a/policy-service/src/policy-engine/mint/mint-service.ts b/policy-service/src/policy-engine/mint/mint-service.ts index b2776e72ba..e13e4d391e 100644 --- a/policy-service/src/policy-engine/mint/mint-service.ts +++ b/policy-service/src/policy-engine/mint/mint-service.ts @@ -1,6 +1,6 @@ import { AnyBlockType } from '../policy-engine.interface.js'; import { ContractParamType, ExternalMessageEvents, GenerateUUIDv4, IRootConfig, ISignOptions, NotificationAction, TokenType, WorkerTaskType, } from '@guardian/interfaces'; -import { DatabaseServer, ExternalEventChannel, KeyType, Logger, MessageAction, MessageServer, MintRequest, MultiPolicy, NotificationHelper, SynchronizationMessage, Token, TopicConfig, Users, VcDocumentDefinition as VcDocument, Wallet, Workers, } from '@guardian/common'; +import { DatabaseServer, ExternalEventChannel, KeyType, MessageAction, MessageServer, MintRequest, MultiPolicy, NotificationHelper, PinoLogger, SynchronizationMessage, Token, TopicConfig, Users, VcDocumentDefinition as VcDocument, Wallet, Workers } from '@guardian/common'; import { AccountId, PrivateKey, TokenId } from '@hashgraph/sdk'; import { PolicyUtils } from '../helpers/utils.js'; import { IHederaCredentials, PolicyUser } from '../policy-user.js'; @@ -19,7 +19,7 @@ export class MintService { /** * Logger service */ - private static readonly logger = new Logger(); + private static readonly logger = new PinoLogger(); /** * Active mint processes diff --git a/policy-service/src/policy-engine/mint/types/mint-ft.ts b/policy-service/src/policy-engine/mint/types/mint-ft.ts index 9572889cf8..72d3906e1b 100644 --- a/policy-service/src/policy-engine/mint/types/mint-ft.ts +++ b/policy-service/src/policy-engine/mint/types/mint-ft.ts @@ -170,7 +170,7 @@ export class MintFT extends TypedMint { if (!this._ref?.dryRun) { try { - const startTransactions = await workers.addRetryableTask( + workers.addRetryableTask( { type: WorkerTaskType.GET_TRANSACTIONS, data: { @@ -183,11 +183,15 @@ export class MintFT extends TypedMint { 1, 10, userId - ); - - this._mintRequest.startTransaction = - startTransactions[0]?.consensus_timestamp; - await this._db.saveMintRequest(this._mintRequest); + ).then(async startTransactions => { + try { + this._mintRequest.startTransaction = + startTransactions[0]?.consensus_timestamp; + await this._db.saveMintRequest(this._mintRequest); + } catch (error) { + this.error(error); + } + }).catch(error => this.error(error)); } catch (error) { this.error(error); } @@ -243,7 +247,7 @@ export class MintFT extends TypedMint { if (!this._ref?.dryRun) { try { - const startTransactions = await workers.addRetryableTask( + workers.addRetryableTask( { type: WorkerTaskType.GET_TRANSACTIONS, data: { @@ -256,10 +260,15 @@ export class MintFT extends TypedMint { 1, 10, userId - ); - this._mintRequest.startTransaction = - startTransactions[0]?.consensus_timestamp; - await this._db.saveMintRequest(this._mintRequest); + ).then(async startTransactions => { + try { + this._mintRequest.startTransaction = + startTransactions[0]?.consensus_timestamp; + await this._db.saveMintRequest(this._mintRequest); + } catch (error) { + this.error(error); + } + }).catch(error => this.error(error)); } catch (error) { this.error(error); } diff --git a/policy-service/src/policy-engine/mint/types/mint-nft.ts b/policy-service/src/policy-engine/mint/types/mint-nft.ts index 00897ca87b..0716960a38 100644 --- a/policy-service/src/policy-engine/mint/types/mint-nft.ts +++ b/policy-service/src/policy-engine/mint/types/mint-nft.ts @@ -131,7 +131,7 @@ export class MintNFT extends TypedMint { !Number.isInteger(this._mintRequest.startSerial) ) { try { - const startSerial = await new Workers().addRetryableTask( + new Workers().addRetryableTask( { type: WorkerTaskType.GET_TOKEN_NFTS, data: { @@ -143,9 +143,14 @@ export class MintNFT extends TypedMint { 1, 10, userId - ); - this._mintRequest.startSerial = startSerial[0] || 0; - await this._db.saveMintRequest(this._mintRequest); + ).then(async (startSerial) => { + try { + this._mintRequest.startSerial = startSerial[0] || 0; + await this._db.saveMintRequest(this._mintRequest); + } catch (error) { + this.error(error); + } + }).catch((error) => this.error(error)); } catch (error) { this.error(error); } diff --git a/policy-service/src/policy-engine/multi-policy-service/mint-service.ts b/policy-service/src/policy-engine/multi-policy-service/mint-service.ts index a7fd4f61ce..c63a83118f 100644 --- a/policy-service/src/policy-engine/multi-policy-service/mint-service.ts +++ b/policy-service/src/policy-engine/multi-policy-service/mint-service.ts @@ -1,6 +1,6 @@ import { AnyBlockType } from '../policy-engine.interface.js'; import { ContractParamType, ExternalMessageEvents, GenerateUUIDv4, ISignOptions, NotificationAction, WorkerTaskType } from '@guardian/interfaces'; -import { DatabaseServer, ExternalEventChannel, KeyType, Logger, MessageAction, MessageServer, MultiPolicy, NotificationHelper, SynchronizationMessage, Token, TopicConfig, Users, VcDocumentDefinition as VcDocument, Wallet, Workers, } from '@guardian/common'; +import { DatabaseServer, ExternalEventChannel, KeyType, MessageAction, MessageServer, MultiPolicy, NotificationHelper, PinoLogger, SynchronizationMessage, Token, TopicConfig, Users, VcDocumentDefinition as VcDocument, Wallet, Workers } from '@guardian/common'; import { AccountId, PrivateKey, TokenId } from '@hashgraph/sdk'; import { PolicyUtils } from '../helpers/utils.js'; import { IHederaCredentials, PolicyUser } from '../policy-user.js'; @@ -48,7 +48,7 @@ export class MintService { /** * Logger service */ - private static readonly logger = new Logger(); + private static readonly logger = new PinoLogger(); /** * Mint diff --git a/policy-service/src/policy-engine/multi-policy-service/synchronization-service.ts b/policy-service/src/policy-engine/multi-policy-service/synchronization-service.ts index 7c8273743e..66b44f2872 100644 --- a/policy-service/src/policy-engine/multi-policy-service/synchronization-service.ts +++ b/policy-service/src/policy-engine/multi-policy-service/synchronization-service.ts @@ -1,7 +1,7 @@ import { IRootConfig, PolicyType, WorkerTaskType } from '@guardian/interfaces'; import { CronJob } from 'cron'; import { MintService } from '../mint/mint-service.js'; -import { DatabaseServer, Logger, MessageAction, MessageServer, MultiPolicyTransaction, NotificationHelper, Policy, SynchronizationMessage, Token, TopicConfig, Users, Workers, } from '@guardian/common'; +import { DatabaseServer, MessageAction, MessageServer, MultiPolicyTransaction, NotificationHelper, PinoLogger, Policy, SynchronizationMessage, Token, TopicConfig, Users, Workers } from '@guardian/common'; /** * Synchronization Service @@ -33,7 +33,7 @@ export class SynchronizationService { */ private readonly policy: Policy; - constructor(policy: Policy) { + constructor(policy: Policy, private readonly logger: PinoLogger) { this.policy = policy; } @@ -56,7 +56,7 @@ export class SynchronizationService { this.task().then(); }, null, false, 'UTC'); this.job.start(); - new Logger().info(`Start synchronization: ${cronMask}`, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); + this.logger.info(`Start synchronization: ${cronMask}`, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); return true; } @@ -80,17 +80,17 @@ export class SynchronizationService { if (this.taskStatus) { return; } - new Logger().info('Start synchronization task', ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); + await this.logger.info('Start synchronization task', ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); this.taskStatus = true; await this.taskByPolicy(this.policy); this.taskStatus = false; - new Logger().info('Complete synchronization task', ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); + await this.logger.info('Complete synchronization task', ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); } catch (error) { this.taskStatus = false; console.error(error); - new Logger().error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); + await this.logger.error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); } } @@ -167,7 +167,7 @@ export class SynchronizationService { } } catch (error) { console.error(error); - new Logger().error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); + await this.logger.error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); } } @@ -234,7 +234,7 @@ export class SynchronizationService { transaction.vpMessageId, notifier, ).catch(error => { - new Logger().error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); + this.logger.error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); }); } } @@ -297,7 +297,7 @@ export class SynchronizationService { } catch (error) { transaction.status = 'Failed'; console.error(error); - new Logger().error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); + await this.logger.error(error, ['GUARDIAN_SERVICE', 'SYNCHRONIZATION_SERVICE']); await DatabaseServer.updateMultiPolicyTransactions(transaction); return null; } diff --git a/policy-service/src/policy-engine/policy-components-utils.ts b/policy-service/src/policy-engine/policy-components-utils.ts index 74a033e6d1..3490d97003 100644 --- a/policy-service/src/policy-engine/policy-components-utils.ts +++ b/policy-service/src/policy-engine/policy-components-utils.ts @@ -8,7 +8,7 @@ import { PolicyOutputEventType, PolicyTagMap } from './interfaces/index.js'; -import { BlockType, GenerateUUIDv4, ModuleStatus, PolicyEvents, PolicyType } from '@guardian/interfaces'; +import { BlockType, GenerateUUIDv4, ModuleStatus, PolicyEvents, PolicyHelper, PolicyType } from '@guardian/interfaces'; import { AnyBlockType, IPolicyBlock, @@ -762,7 +762,7 @@ export class PolicyComponentsUtils { policy: Policy, components: ComponentsService ) { - const dryRun = policy.status === PolicyType.DRY_RUN ? policyId : null; + const dryRun = PolicyHelper.isDryRunMode(policy) ? policyId : null; const policyInstance: IPolicyInstance = { policyId, dryRun, @@ -1116,10 +1116,10 @@ export class PolicyComponentsUtils { result.userGroup = null; const policyId = policy.id.toString(); - if (policy.status === PolicyType.DRY_RUN) { - const activeUser = await DatabaseServer.getVirtualUser( - policyId - ); + const dryRun = PolicyHelper.isDryRunMode(policy) ? policyId : null; + + if (dryRun) { + const activeUser = await DatabaseServer.getVirtualUser(policyId); if (activeUser) { did = activeUser.did; } @@ -1130,8 +1130,6 @@ export class PolicyComponentsUtils { result.userRole = 'Administrator'; } - const dryRun = - policy.status === PolicyType.DRY_RUN ? policyId : null; const db = new DatabaseServer(dryRun); const groups = await db.getGroupsByUser(policyId, did, { fields: ['uuid', 'role', 'groupLabel', 'groupName', 'active'], diff --git a/policy-service/src/policy-engine/policy-engine.interface.ts b/policy-service/src/policy-engine/policy-engine.interface.ts index 9e61dabff8..c2b864e66d 100644 --- a/policy-service/src/policy-engine/policy-engine.interface.ts +++ b/policy-service/src/policy-engine/policy-engine.interface.ts @@ -1,4 +1,4 @@ -import { BlockCacheType, PolicyOutputEventType, EventConfig, IPolicyEvent } from './interfaces/index.js'; +import { BlockCacheType, EventConfig, IPolicyEvent, PolicyOutputEventType } from './interfaces/index.js'; import { DatabaseServer, Policy } from '@guardian/common'; import { PolicyUser, UserCredentials } from './policy-user.js'; import { ComponentsService } from './helpers/components-service.js'; @@ -559,6 +559,13 @@ export interface IPolicyAddonBlock extends IPolicyBlock { */ getData(user: PolicyUser | null, uuid: string, queryParams?: any): Promise; + /** + * Set filter state + * @param user + * @param data + */ + setFilterState(user: PolicyUser | null, data: any): Promise; + /** * Get sources * @param user @@ -594,6 +601,13 @@ export interface IPolicyAddonBlock extends IPolicyBlock { */ getState(user: PolicyUser): any; + /** + * Set block state + * @param user + * @param state + */ + setState(user: PolicyUser, state: any): Promise; + /** * Get selective attributes addons */ diff --git a/policy-service/src/policy-engine/record-utils.ts b/policy-service/src/policy-engine/record-utils.ts index 70cd40553f..d7ce61922c 100644 --- a/policy-service/src/policy-engine/record-utils.ts +++ b/policy-service/src/policy-engine/record-utils.ts @@ -74,11 +74,39 @@ export class RecordUtils { public static async StopRunning(policyId: string): Promise { const components = PolicyComponentsUtils.GetPolicyComponents(policyId); if (!components) { - return false; + return true; } return await components.stopRunning(); } + /** + * Destroy recording + * @param policyId + * @public + * @static + */ + public static async DestroyRecording(policyId: string): Promise { + const components = PolicyComponentsUtils.GetPolicyComponents(policyId); + if (!components) { + return false; + } + return await components.destroyRecording(); + } + + /** + * Destroy running + * @param policyId + * @public + * @static + */ + public static async DestroyRunning(policyId: string): Promise { + const components = PolicyComponentsUtils.GetPolicyComponents(policyId); + if (!components) { + return true; + } + return await components.destroyRunning(); + } + /** * Fast Forward * @param policyId @@ -183,10 +211,10 @@ export class RecordUtils { actions: any[], results: any[], options: any - ): Promise { + ): Promise { const components = PolicyComponentsUtils.GetPolicyComponents(policyId); if (!components) { - return false; + return null; } return await components.runRecord(actions, results, options); } diff --git a/policy-service/src/policy-engine/record/recording.ts b/policy-service/src/policy-engine/record/recording.ts index ca7bceb659..bbec0f00a6 100644 --- a/policy-service/src/policy-engine/record/recording.ts +++ b/policy-service/src/policy-engine/record/recording.ts @@ -112,6 +112,16 @@ export class Recording { return true; } + /** + * Destroy recording + * @public + */ + public async destroy(): Promise { + this._status = RecordingStatus.Stopped; + this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + return true; + } + /** * Record event (Select Group) * @param user diff --git a/policy-service/src/policy-engine/record/running.ts b/policy-service/src/policy-engine/record/running.ts index 36d5fe4ba1..1e84183059 100644 --- a/policy-service/src/policy-engine/record/running.ts +++ b/policy-service/src/policy-engine/record/running.ts @@ -6,11 +6,24 @@ import { RecordMethod } from './method.type.js'; import { IPolicyBlock } from '../policy-engine.interface.js'; import { PolicyUser } from '../policy-user.js'; import { PolicyComponentsUtils } from '../policy-components-utils.js'; -import { DatabaseServer, HederaDidDocument, IRecordResult, RecordImportExport, VcHelper } from '@guardian/common'; +import { DatabaseServer, HederaDidDocument, IRecordResult, RecordImportExport, VcDocument, VcHelper, VpDocument } from '@guardian/common'; import { RecordItem } from './record-item.js'; -import { GenerateDID, GenerateUUID, IGenerateValue, RecordItemStack, Utils } from './utils.js'; +import { GenerateDID, GenerateUUID, IGenerateValue, RecordItemStack, RowDocument, Utils } from './utils.js'; import { AccountId, PrivateKey } from '@hashgraph/sdk'; +interface RecordOptions { + mode?: string; + index?: string | number; +} + +interface IActionResult { + index: number; + delay: number; + code: number; + error: string; + action: RecordAction; +}; + /** * Running controller */ @@ -34,7 +47,7 @@ export class Running { /** * Options */ - public readonly options: any; + public readonly options: RecordOptions; /** * Block messenger */ @@ -55,10 +68,18 @@ export class Running { * Recorded result */ private readonly _results: IRecordResult[]; + /** + * Mode + */ + private readonly _mode: string; + /** + * Event delay + */ + private readonly _eventIterationDelay = [2, 4, 6, 8, 10]; //30s /** * Record ID */ - private _id: number; + private _id: string; /** * Status */ @@ -94,16 +115,17 @@ export class Running { owner: string, actions: RecordItem[], results: IRecordResult[], - options: any + options: RecordOptions ) { this.policyInstance = policyInstance; this.policyId = policyId; this.owner = owner; - this.options = options; + this.options = options || {}; this.tree = new BlockTreeGenerator(); + this._mode = this.options.mode; this._status = RunningStatus.New; this._lastError = null; - this._id = -1; + this._id = null; this._actions = new RecordItemStack(); this._generateUUID = new RecordItemStack(); this._generateDID = new RecordItemStack(); @@ -129,19 +151,19 @@ export class Running { * Start running * @public */ - public start(): boolean { + public start(): string { this._status = RunningStatus.Running; this._lastError = null; - this._id = Date.now(); + this._id = GenerateUUIDv4(); this._generatedItems = []; this._generatedDIDs = []; - this._actions.clearIndex(); - this._generateUUID.clearIndex(); - this._generateDID.clearIndex(); + this._actions.clear(); + this._generateUUID.clear(); + this._generateDID.clear(); this._startTime = Date.now(); - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(this._id).then(); this._run(this._id).then(); - return true; + return this._id; } /** @@ -152,7 +174,7 @@ export class Running { this._status = RunningStatus.Stopped; this._lastError = null; this._endTime = Date.now(); - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(this._id).then(); return true; } @@ -161,11 +183,12 @@ export class Running { * @public */ public finished(): boolean { - this._id = -1; + const oldID = this._id; + this._id = null; this._status = RunningStatus.Finished; this._lastError = null; this._endTime = Date.now(); - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(oldID).then(); return true; } @@ -178,7 +201,21 @@ export class Running { this._status = RunningStatus.Error; this._lastError = message; this._endTime = Date.now(); - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(this._id).then(); + return true; + } + + /** + * Destroy + * @public + */ + public async destroy(): Promise { + const oldID = this._id; + this._id = null; + this._status = RunningStatus.Finished; + this._lastError = null; + this._endTime = Date.now(); + await this._updateStatus(oldID); return true; } @@ -189,14 +226,14 @@ export class Running { public async run(): Promise { this._status = RunningStatus.Running; this._lastError = null; - this._id = Date.now(); + this._id = GenerateUUIDv4(); this._generatedItems = []; this._generatedDIDs = []; - this._actions.clearIndex(); - this._generateUUID.clearIndex(); - this._generateDID.clearIndex(); + this._actions.clear(); + this._generateUUID.clear(); + this._generateDID.clear(); this._startTime = Date.now(); - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(this._id).then(); await this._run(this._id); return await this.results(); } @@ -206,7 +243,7 @@ export class Running { * @param options * @public */ - public async fastForward(options: any): Promise { + public async fastForward(options: RecordOptions): Promise { try { const skipIndex = Number(options?.index); if (this._currentDelay) { @@ -233,7 +270,7 @@ export class Running { if (this._status === RunningStatus.Error) { this._status = RunningStatus.Running; this._lastError = null; - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(this._id).then(); this._run(this._id).then(); return true; } else { @@ -254,7 +291,7 @@ export class Running { this._status = RunningStatus.Running; this._lastError = null; this._actions.next(); - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(this._id).then(); this._run(this._id).then(); return true; } else { @@ -304,12 +341,33 @@ export class Running { return results; } + /** + * Update status + * @private + */ + private async _updateStatus(id: string): Promise { + try { + const status: any = this.getStatus(id); + this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, status); + if (this._mode === 'test') { + if (this._status === RunningStatus.Running) { + this.tree.sendMessage(PolicyEvents.TEST_UPDATE_BROADCAST, status); + } else { + status.result = await this.getResults(); + this.tree.sendMessage(PolicyEvents.TEST_UPDATE_BROADCAST, status); + } + } + } catch (error) { + return; + } + } + /** * Run * @param id * @private */ - private async _run(id: number): Promise { + private async _run(id: string): Promise { while (this.isRunning(id)) { const result = await this.next(); if (!this.isRunning(id)) { @@ -323,7 +381,7 @@ export class Running { this.error(result.error); return; } - this.tree.sendMessage(PolicyEvents.RECORD_UPDATE_BROADCAST, this.getStatus()); + this._updateStatus(id).then(); await this.delay(result.delay, result.index); } } @@ -333,7 +391,7 @@ export class Running { * @param id * @private */ - private isRunning(id: number): boolean { + private isRunning(id: string): boolean { return this._id === id && this._status === RunningStatus.Running; } @@ -341,6 +399,7 @@ export class Running { * Create delay * @param time * @param index + * @param action * @private */ private async delay(time: number, index: number): Promise { @@ -394,15 +453,14 @@ export class Running { return null; } case RecordAction.SetBlockData: { - const doc = await this.getActionDocument(action); const block = PolicyComponentsUtils.GetBlockByTag(this.policyId, action.target); - if (block && (await block.isAvailable(userFull))) { - if (typeof block.setData === 'function') { - await block.setData(userFull, doc); - return null; - } + if (await this.isAvailable(block, userFull)) { + const doc = await this.getActionDocument(action); + await block.setData(userFull, doc); + return null; + } else { + return `Block (${action.target}) not available.`; } - return `Block (${action.target}) not available.`; } case RecordAction.SetExternalData: { const doc = await this.getActionDocument(action); @@ -433,7 +491,8 @@ export class Running { username, userDID, newAccountId.toString(), - newPrivateKey.toString() + newPrivateKey.toString(), + false ); const instanceDB = this.policyInstance.components.databaseServer; @@ -498,6 +557,25 @@ export class Running { } } + /** + * Check available + * @param block + * @param user + * @private + */ + private async isAvailable(block: any, user: PolicyUser): Promise { + if (!block || typeof block.setData !== 'function') { + return false; + } + for (const i of this._eventIterationDelay) { + if (await block.isAvailable(user)) { + return true; + } + await this.delay(i * 1000, this._actions?.index); + } + return false; + } + /** * Replace DID * @param did @@ -532,34 +610,61 @@ export class Running { private async replaceRow(obj: any): Promise { const result = Utils.findAllDocuments(obj); for (const row of result) { - if (row.type === 'vc') { - const item = await this.policyInstance.databaseServer.getVcDocument(row.filters); - obj = row.replace(obj, item); - } - if (row.type === 'vp') { - const item = await this.policyInstance.databaseServer.getVpDocument(row.filters); - obj = row.replace(obj, item); - } + const item = await this.findRowDocument(row); + obj = row.replace(obj, item); } return obj; } + /** + * Find row document + * @param row + * @private + */ + private async findRowDocument(row: RowDocument): Promise { + for (const i of this._eventIterationDelay) { + const item = await this.getRowDocument(row); + if (item) { + return item; + } + await this.delay(i * 1000, this._actions?.index); + } + return undefined; + } + + /** + * Find row document + * @param row + * @private + */ + private async getRowDocument(row: RowDocument): Promise { + if (row.type === 'vc') { + return await this.policyInstance.databaseServer.getVcDocument(row.filters); + } else if (row.type === 'vp') { + return await this.policyInstance.databaseServer.getVpDocument(row.filters); + } else { + return undefined; + } + } + /** * Get next action * @private */ private async next() { - const result = { + const result: IActionResult = { index: -1, delay: -1, code: 0, - error: null + error: null, + action: null }; try { const action = this._actions.current; if (!action) { return result; } + result.action = action.action; const error = await this.runAction(action); if (error) { @@ -644,9 +749,9 @@ export class Running { * Get full status * @public */ - public getStatus() { + public getStatus(id?: string) { return { - id: this._id, + id: id || this._id, type: this.type, policyId: this.policyId, status: this._status, @@ -670,7 +775,8 @@ export class Running { */ public async getResults(): Promise { if (this._id) { - const results = await RecordImportExport.loadRecordResults(this.policyId, this._startTime, this._endTime); + const results = await RecordImportExport + .loadRecordResults(this.policyId, this._startTime, this._endTime); return { documents: results, recorded: this._results diff --git a/policy-service/src/policy-engine/record/utils.ts b/policy-service/src/policy-engine/record/utils.ts index 773c3eac6f..970b25e448 100644 --- a/policy-service/src/policy-engine/record/utils.ts +++ b/policy-service/src/policy-engine/record/utils.ts @@ -280,12 +280,38 @@ export class RecordItemStack { * Current index */ private _index: number; + /** + * List of actions + */ + private _source: RecordItem[]; constructor() { this._items = []; + this._source = []; this._index = 0; } + /** + * Copy actions + * @param items + */ + private _copy(items: RecordItem[]): RecordItem[] { + if (Array.isArray(items)) { + const result = new Array(items.length); + for (let i = 0; i < items.length; i++) { + const item = items[i]; + if (item && typeof item === 'object') { + result[i] = JSON.parse(JSON.stringify(item)); + } else { + result[i] = item; + } + } + return result; + } else { + return []; + } + } + /** * Set actions * @param items @@ -293,10 +319,20 @@ export class RecordItemStack { */ public setItems(items: RecordItem[]): void { if (Array.isArray(items)) { - this._items = items; + this._source = items; } else { - this._items = []; + this._source = []; } + this._items = this._copy(this._source);; + this._index = 0; + } + + /** + * Clear + * @public + */ + public clear(): void { + this._items = this._copy(this._source);; this._index = 0; } diff --git a/queue-service/configs/.env.queue b/queue-service/configs/.env.queue index 9f51f5f06c..a4ebcd57c1 100644 --- a/queue-service/configs/.env.queue +++ b/queue-service/configs/.env.queue @@ -10,3 +10,19 @@ MQ_ADDRESS="localhost" DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" #MQ_MESSAGE_CHUNK=5000000 + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/queue-service/configs/.env.queue.develop b/queue-service/configs/.env.queue.develop index 9f51f5f06c..a4ebcd57c1 100644 --- a/queue-service/configs/.env.queue.develop +++ b/queue-service/configs/.env.queue.develop @@ -10,3 +10,19 @@ MQ_ADDRESS="localhost" DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" #MQ_MESSAGE_CHUNK=5000000 + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/queue-service/configs/.env.queue.template b/queue-service/configs/.env.queue.template index 9f51f5f06c..bf560bce3b 100644 --- a/queue-service/configs/.env.queue.template +++ b/queue-service/configs/.env.queue.template @@ -10,3 +10,19 @@ MQ_ADDRESS="localhost" DB_HOST="localhost" MQ_MAX_PAYLOAD="1048576" #MQ_MESSAGE_CHUNK=5000000 + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/queue-service/environments/environment.prod.ts b/queue-service/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/queue-service/environments/environment.prod.ts +++ b/queue-service/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/queue-service/package.json b/queue-service/package.json index 7a0c5af7d7..99885e2110 100644 --- a/queue-service/package.json +++ b/queue-service/package.json @@ -2,8 +2,8 @@ "author": "Envision Blockchain Solutions ", "dependencies": { "@filebase/client": "^0.0.5", - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@hashgraph/sdk": "2.34.1", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", @@ -66,5 +66,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/queue-service/src/app.ts b/queue-service/src/app.ts index e36ec2a7cb..546b9bfa15 100644 --- a/queue-service/src/app.ts +++ b/queue-service/src/app.ts @@ -1,4 +1,4 @@ -import { ApplicationState, COMMON_CONNECTION_CONFIG, DataBaseHelper, Logger, MessageBrokerChannel, NotificationService } from '@guardian/common'; +import { ApplicationState, COMMON_CONNECTION_CONFIG, DataBaseHelper, MessageBrokerChannel, mongoForLoggingInitialization, NotificationService, PinoLogger, pinoLoggerInitialization } from '@guardian/common'; import { ApplicationStates, GenerateUUIDv4 } from '@guardian/interfaces'; import { MikroORM } from '@mikro-orm/core'; import { MongoDriver } from '@mikro-orm/mongodb'; @@ -36,14 +36,16 @@ Promise.all([ ] }, }), + mongoForLoggingInitialization() ]).then(async values => { - const [db, cn, app] = values; + const [db, cn, app, loggerMongo] = values; DataBaseHelper.orm = db; app.listen(); - const channel = new MessageBrokerChannel(cn, 'worker'); - const logger = new Logger(); - logger.setConnection(cn); + // new MessageBrokerChannel(cn, 'worker'); + + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); + const state = new ApplicationState(); await state.setServiceName('QUEUE').setConnection(cn).init(); await state.updateState(ApplicationStates.STARTED); @@ -51,7 +53,7 @@ Promise.all([ await new QueueService().setConnection(cn).init(); await state.updateState(ApplicationStates.READY); - logger.info('Queue service started', ['QUEUE_SERVICE']) + await logger.info('Queue service started', ['QUEUE_SERVICE']) }, (reason) => { console.log(reason); diff --git a/queue-service/src/config.ts b/queue-service/src/config.ts index ccf56d6ce4..5fd0a99cc9 100644 --- a/queue-service/src/config.ts +++ b/queue-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false') { } } } -console.log('Charged Environment', process.env, '\r\n___ . ___'); diff --git a/queue-service/src/queue-service/queue-service.ts b/queue-service/src/queue-service/queue-service.ts index 4969d24553..f54485d67d 100644 --- a/queue-service/src/queue-service/queue-service.ts +++ b/queue-service/src/queue-service/queue-service.ts @@ -7,7 +7,7 @@ export class QueueService extends NatsService{ public messageQueueName = 'queue-service'; public replySubject = 'reply-queue-service-' + GenerateUUIDv4(); - private refreshInterval = 1 * 1000; // 1s + private readonly refreshInterval = 1 * 1000; // 1s public async init() { await super.init(); diff --git a/swagger-indexer.yaml b/swagger-indexer.yaml new file mode 100644 index 0000000000..7a4b6ad2c5 --- /dev/null +++ b/swagger-indexer.yaml @@ -0,0 +1,6086 @@ +openapi: 3.0.0 +paths: + /search: + get: + operationId: SearchApi_search + summary: Search + description: Full-text indexer search + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: search + required: true + in: query + description: Search phrase + example: Project + schema: + type: string + responses: + '200': + description: Search results + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/SearchItemDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - search + /entities/registries: + get: + operationId: EntityApi_getRegistries + summary: Get standard registries + description: Returns standard registries + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: >- + Search registries, which are related to specific topic + identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Global topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.did + required: false + in: query + description: Registry did + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: options.registrantTopicId + required: false + in: query + description: Registry user topic identifier + example: 0.0.4481265 + schema: + type: string + responses: + '200': + description: Registries + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RegistryDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_0 + - entities + /entities/registries/{messageId}: + get: + operationId: EntityApi_getRegistry + summary: Get registry + description: Returns registry + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Registry details + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/registry-users: + get: + operationId: EntityApi_getRegistryUsers + summary: Get registry users + description: Returns registry users + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: >- + Search registry users, which are related to specific topic + identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: User topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Registry users + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RegistryUserGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/registry-users/{messageId}: + get: + operationId: EntityApi_getRegistryUser + summary: Get registry user + description: Returns registry user + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Registry user details + content: + application/json: + schema: + $ref: '#/components/schemas/RegistryUserDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/policies: + get: + operationId: EntityApi_getPolicies + summary: Get policies + description: Returns policies + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search policies, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Policy owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.tools + required: false + in: query + description: Tool + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Policies + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/PolicyDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/policies/{messageId}: + get: + operationId: EntityApi_getPolicy + summary: Get policy + description: Returns policy + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Policy details + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tools: + get: + operationId: EntityApi_getTools + summary: Get tools + description: Returns tools + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search tools, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.owner + required: false + in: query + description: Tool owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Tools + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ToolDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tools/{messageId}: + get: + operationId: EntityApi_getTool + summary: Get tool + description: Returns tool + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Tool details + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/modules: + get: + operationId: EntityApi_getModules + summary: Get modules + description: Returns modules + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search modules, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.owner + required: false + in: query + description: Module owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Modules + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ModuleDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/modules/{messageId}: + get: + operationId: EntityApi_getModule + summary: Get module + description: Returns module + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Module details + content: + application/json: + schema: + $ref: '#/components/schemas/ModuleDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas: + get: + operationId: EntityApi_getSchemas + summary: Get schemas + description: Returns schemas + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search schemas, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Policy topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.owner + required: false + in: query + description: Schema owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: Schemas + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/SchemaGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas/{messageId}: + get: + operationId: EntityApi_getSchema + summary: Get schema + description: Returns schema + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Schema details + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/schemas/{messageId}/tree: + get: + operationId: EntityApi_getSchemaTree + summary: Get schema tree + description: Returns schema tree + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Schema tree + content: + application/json: + schema: + $ref: '#/components/schemas/SchemaTreeDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tokens: + get: + operationId: EntityApi_getTokens + summary: Get tokens + description: Returns tokens + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: tokenId + required: false + in: query + description: Token identifier + example: 0.0.1960 + schema: + type: string + - name: treasury + required: false + in: query + description: Treasury + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Tokens + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/TokenDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/tokens/{tokenId}: + get: + operationId: EntityApi_getToken + summary: Get token + description: Returns token + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Token details + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/roles: + get: + operationId: EntityApi_getRoles + summary: Get roles + description: Returns roles + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search roles, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Roles + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/RoleDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/roles/{messageId}: + get: + operationId: EntityApi_getRole + summary: Get role + description: Returns role + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Role details + content: + application/json: + schema: + $ref: '#/components/schemas/RoleDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents: + get: + operationId: EntityApi_getDidDocuments + summary: Get DIDs + description: Returns DIDs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search DIDs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.did + required: false + in: query + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + responses: + '200': + description: DIDs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/DIDGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents/{messageId}: + get: + operationId: EntityApi_getDidDocument + summary: Get DID + description: Returns DID + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: DID details + content: + application/json: + schema: + $ref: '#/components/schemas/DIDDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/did-documents/{messageId}/relationships: + get: + operationId: EntityApi_getDidRelationships + summary: Get DID relationships + description: Returns DID relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: DID relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents: + get: + operationId: EntityApi_getVpDocuments + summary: Get VPs + description: Returns VPs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VPs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaIds + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VPs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VPGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents/{messageId}: + get: + operationId: EntityApi_getVpDocument + summary: Get VP + description: Returns VP + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VP details + content: + application/json: + schema: + $ref: '#/components/schemas/VPDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vp-documents/{messageId}/relationships: + get: + operationId: EntityApi_getVpRelationships + summary: Get VP relationships + description: Returns VP relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VP relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents: + get: + operationId: EntityApi_getVcDocuments + summary: Get VCs + description: Returns VCs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search VCs, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: options.issuer + required: false + in: query + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + schema: + type: string + - name: analytics.policyId + required: false + in: query + description: Policy identifier + example: '1706823227.586179534' + schema: + type: string + - name: analytics.schemaId + required: false + in: query + description: Schema identifier + example: '1706823227.586179534' + schema: + type: string + - name: options.relationships + required: false + in: query + description: Relationships + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VCs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/VCGridDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents/{messageId}: + get: + operationId: EntityApi_getVcDocument + summary: Get VC + description: Returns VC + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VC details + content: + application/json: + schema: + $ref: '#/components/schemas/VCDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/vc-documents/{messageId}/relationships: + get: + operationId: EntityApi_getVcRelationships + summary: Get VC relationships + description: Returns VC relationships + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: VC relationships + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/nfts: + get: + operationId: EntityApi_getNFTs + summary: Get NFTs + description: Returns NFTs + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: tokenId + required: false + in: query + description: Token identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: NFTs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/NFTDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/nfts/{tokenId}/{serialNumber}: + get: + operationId: EntityApi_getNFT + summary: Get NFT + description: Returns NFT + parameters: + - name: tokenId + required: true + in: path + description: Token identifier + example: 0.0.1960 + schema: + type: string + - name: serialNumber + required: true + in: path + description: Serial number + example: '1' + schema: + type: string + responses: + '200': + description: NFT details + content: + application/json: + schema: + $ref: '#/components/schemas/NFTDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/topics: + get: + operationId: EntityApi_getTopics + summary: Get topics + description: Returns topics + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search topics, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: options.parentId + required: false + in: query + description: Parent topic identifier + example: 0.0.1960 + schema: + type: string + responses: + '200': + description: Topics + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/TopicDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/topics/{topicId}: + get: + operationId: EntityApi_getTopic + summary: Get topic + description: Returns topic + parameters: + - name: topicId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Topic details + content: + application/json: + schema: + $ref: '#/components/schemas/TopicDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/contracts: + get: + operationId: EntityApi_getContracts + summary: Get contracts + description: Returns contracts + parameters: + - name: pageIndex + required: false + in: query + description: Page index + example: 0 + schema: + type: number + - name: pageSize + required: false + in: query + description: Page size + example: 10 + schema: + type: number + maximum: 100 + - name: orderField + required: false + in: query + description: Order field + example: consensusTimestamp + schema: + type: string + - name: orderDir + required: false + in: query + description: Order direction + examples: + ASC: + value: ASC + description: Ascending ordering + DESC: + value: DESC + description: Descending ordering + schema: + type: string + - name: keywords + required: false + in: query + description: Keywords to search + examples: + 0.0.1960: + description: Search contracts, which are related to specific topic identifier + value: '["0.0.1960"]' + schema: + type: string + - name: topicId + required: false + in: query + description: Topic identifier + example: 0.0.1960 + schema: + type: string + - name: owner + required: false + in: query + description: Owner + example: 0.0.2160 + schema: + type: string + responses: + '200': + description: Contracts + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PageDTO' + - properties: + items: + type: array + items: + $ref: '#/components/schemas/ContractDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /entities/contracts/{messageId}: + get: + operationId: EntityApi_getContract + summary: Get contract + description: Returns contract + parameters: + - name: messageId + required: true + in: path + description: Message identifier + example: '1706823227.586179534' + schema: + type: string + responses: + '200': + description: Contract details + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDetailsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_0 + /landing/analytics: + get: + operationId: LandingApi_getOnboardingStat + summary: Get landing page analytics + description: >- + Returns count of registries, methodologies, projects, totalIssuance, + date + parameters: [] + responses: + '200': + description: Landing page analytics result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LandingAnalyticsDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: &ref_1 + - landing + /landing/projects-coordinates: + get: + operationId: LandingApi_getProjectCoordinates + summary: Get projects coordinates + description: Returns all project coordinates + parameters: [] + responses: + '200': + description: Projects coordinates result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ProjectCoordinatesDTO' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_1 + /analytics/search/policy: + post: + operationId: AnalyticsApi_search + summary: Search policy + description: Returns search policy result + parameters: [] + requestBody: + required: true + description: Search policy parameters + content: + application/json: + schema: + $ref: '#/components/schemas/SearchPolicyParamsDTO' + responses: + '200': + description: Search policy result + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SearchPolicyResultDTO' + '422': + description: Unprocessable entity + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: + - analytics +info: + title: Guardian + description: >- + The Guardian is a modular open-source solution that includes best-in-class + identity management and decentralized ledger technology (DLT) libraries. At + the heart of the Guardian solution is a sophisticated Policy Workflow Engine + (PWE) that enables applications to offer a requirements-based tokenization + implementation. + version: 2.26.2 + contact: + name: API developer + url: https://envisionblockchain.com + email: info@envisionblockchain.com + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +tags: [] +servers: + - url: /api/v1 + description: version 1.0 +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + PageDTO: + type: object + properties: + pageIndex: + type: number + description: Page index + example: '0' + pageSize: + type: number + description: Page size + example: '10' + total: + type: number + description: Total size + example: '100' + order: + type: object + description: Order + required: + - pageIndex + - pageSize + - total + - order + SearchItemDTO: + type: object + properties: + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + type: + type: string + description: Message type + example: VC-Document + required: + - consensusTimestamp + - type + InternalServerErrorDTO: + type: object + properties: + code: + type: number + example: 500 + message: + type: string + example: Error message + required: + - code + - message + RegistryOptionsDTO: + type: object + properties: + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + registrantTopicId: + type: string + description: Registrant topic id + lang: + type: string + description: Lang + attributes: + type: object + description: Attributes + required: + - did + - registrantTopicId + - lang + - attributes + RegistryAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + RegistryDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: &ref_2 + - QmYtKEVfpbDwn7XLHjnjap224ESi3vLiYpkbWoabnxs6cX + type: array + items: + type: string + topics: + description: Topics + example: &ref_3 + - 0.0.4481265 + type: array + items: + type: string + tokens: + description: Tokens + example: &ref_4 + - 0.0.4481265 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Standard Registry + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: Init + options: + $ref: '#/components/schemas/RegistryOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RawMessageDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + status: + type: string + description: Status + example: LOADED + lastUpdate: + type: number + description: Last update + example: 1716755852055 + message: + type: string + description: Message + example: >- + eyJpZCI6ImVhYTYyOWZmLWM4NmItNDEyZS1iYzYwLWM4NDk2OTJkMDBiYiIsInN0YXR1cyI6IklTU1VFIiwidHlwZSI6IlN0YW5kYXJkIFJlZ2lzdHJ5IiwiYWN0aW9uIjoiSW5pdCIsImxhbmciOiJlbi1VUyIsImRpZCI6ImRpZDpoZWRlcmE6dGVzdG5ldDpBYkd6Q3hpRzRlZ0xibldCUERpaHdMUVIza0tLcnNGNmJnSDdUdmVGYjI3bl8wLjAuMjE3NiIsInRvcGljSWQiOiIwLjAuMjE3NiIsImF0dHJpYnV0ZXMiOnsiZ2VvZ3JhcGh5IjoidGVzdCIsImxhdyI6InRlc3R0ZXMiLCJ0YWdzIjoidGVzdCJ9fQ + sequenceNumber: + type: number + description: Sequence number + example: 2 + owner: + type: string + description: Owner + example: 0.0.1914 + chunkId: + type: string + description: Chunk identifier + example: '1706817694.014944860' + chunkNumber: + type: number + description: Chunk number + example: 1 + chunkTotal: + type: number + description: Chunk total + example: 1 + type: + type: string + description: Type + example: Message + data: + type: string + description: Data + example: >- + `{"id":"eaa629ff-c86b-412e-bc60-c849692d00bb","status":"ISSUE","type":"Standard + Registry","action":"Init","lang":"en-US","did":"did:hedera:testnet:AbGzCxiG4egLbnWBPDihwLQR3kKKrsF6bgH7TveFb27n_0.0.2176","topicId":"0.0.2176","attributes":{"geography":"test","law":"testtes","tags":"test"}}` + required: + - id + - consensusTimestamp + - topicId + - status + - lastUpdate + - message + - sequenceNumber + - owner + - chunkId + - chunkNumber + - chunkTotal + - type + - data + RegistryActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + policies: + type: number + description: Policies + example: 10 + roles: + type: number + description: Roles + example: 10 + tools: + type: number + description: Tools + example: 10 + modules: + type: number + description: Modules + example: 10 + tokens: + type: number + description: Tokens + example: 10 + users: + type: number + description: Registry users + example: 10 + contracts: + type: number + description: Contracts + example: 10 + required: + - vcs + - vps + - policies + - roles + - tools + - modules + - tokens + - users + - contracts + RegistryDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RegistryDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RegistryActivityDTO' + required: + - id + - uuid + - item + - row + - activity + RegistryUserOptionsDTO: + type: object + properties: + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - did + RegistryUserAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + RegistryUserGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/RegistryUserOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryUserAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RegistryUserDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/RegistryUserOptionsDTO' + analytics: + $ref: '#/components/schemas/RegistryUserAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + RegistryUserActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - vcs + - vps + - roles + RegistryUserDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RegistryUserDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RegistryUserActivityDTO' + required: + - id + - uuid + - item + - row + - activity + PolicyOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Verra REDD + description: + type: string + description: Description + example: Verra REDD Policy + topicDescription: + type: string + description: Topic description + example: Verra REDD Policy Topic + version: + type: string + description: Version + example: 1.0.0 + policyTag: + type: string + description: Policy tag + example: Verra_REDD + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + policyTopicId: + type: string + description: Policy topic identifier + example: 0.0.4481265 + instanceTopicId: + type: string + description: Policy instance topic identifier + example: 0.0.4481265 + synchronizationTopicId: + type: string + description: Synchronization topic identifier + example: 0.0.4481265 + discontinuedDate: + type: string + description: Discontinued date + example: '2024-02-27T16:32:08.513Z' + required: + - uuid + - name + - description + - topicDescription + - version + - policyTag + - owner + - policyTopicId + - instanceTopicId + - synchronizationTopicId + - discontinuedDate + PolicyAnalyticsDTO: + type: object + properties: + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + tokens: + description: Tokens + example: + - 0.0.4481265 + type: array + items: + type: string + vcCount: + type: number + description: VC count + example: 10 + vpCount: + type: number + description: VP count + example: 10 + tokensCount: + type: number + description: Tokens count + example: 10 + tags: + description: Tags + example: + - iRec + type: array + items: + type: string + hash: + type: string + description: Hash + example: DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or + hashMap: + type: object + description: Hash map + tools: + description: Tools + example: + - '1706823227.586179534' + type: array + items: + type: string + registryId: + type: string + description: Registry identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - owner + - tokens + - vcCount + - vpCount + - tokensCount + - tags + - hash + - hashMap + - tools + - registryId + - textSearch + PolicyDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Policy + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-policy + options: + $ref: '#/components/schemas/PolicyOptionsDTO' + analytics: + $ref: '#/components/schemas/PolicyAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + PolicyActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - schemas + - vcs + - vps + - roles + PolicyDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/PolicyDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/PolicyActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ToolOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Tool 16 + description: + type: string + description: Description + example: Tool 16 + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + hash: + type: string + description: Hash + example: 71ZWDSX2cUPsye4AuMUqXUhgk1XBDnpi4Ky1mtjYqYom + toolTopicId: + type: string + description: Tool topic identifier + example: 0.0.4481265 + tagsTopicId: + type: string + description: Tags topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - hash + - toolTopicId + - tagsTopicId + ToolAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ToolDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Tool + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-tool + options: + $ref: '#/components/schemas/ToolOptionsDTO' + analytics: + $ref: '#/components/schemas/ToolAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + ToolActivityDTO: + type: object + properties: + schemas: + type: number + description: Schemas + example: 10 + policies: + type: number + description: Policies + example: 10 + required: + - schemas + - policies + ToolDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ToolDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/ToolActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ModuleOptionsDTO: + type: object + properties: + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Grid module + description: + type: string + description: Description + example: Grid module + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + moduleTopicId: + type: string + description: Module topic identifier + example: 0.0.4481265 + required: + - uuid + - name + - description + - owner + - moduleTopicId + ModuleAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ModuleDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Module + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-module + options: + $ref: '#/components/schemas/ModuleOptionsDTO' + analytics: + $ref: '#/components/schemas/ModuleAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + ModuleDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ModuleDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + required: + - id + - uuid + - item + - row + SchemaOptionsDTO: + type: object + properties: + name: + type: string + description: Name + example: Monitoring report + description: + type: string + description: Description + example: Monitoring report schema + entity: + type: string + description: Entity + example: VC + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + version: + type: string + description: Version + example: 1.0.0 + codeVersion: + type: string + description: Code version + example: 1.0.0 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + required: + - name + - description + - entity + - owner + - uuid + - version + - codeVersion + - relationships + SchemaGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Schema + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-schema + options: + $ref: '#/components/schemas/SchemaOptionsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + ChildSchemaDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + name: + type: string + description: Name + example: Project Details + required: + - id + - name + SchemaAnalyticsDTO: + type: object + properties: + policyIds: + description: Policy message identifiers + example: + - '1706823227.586179534' + type: array + items: + type: string + childSchemas: + $ref: '#/components/schemas/ChildSchemaDTO' + properties: + description: Schema properties + example: + - ActivityImpactModule.projectScope + type: array + items: + type: string + textSearch: + type: string + description: Text search + required: + - policyIds + - childSchemas + - properties + - textSearch + SchemaDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Schema + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: publish-schema + options: + $ref: '#/components/schemas/SchemaOptionsDTO' + analytics: + $ref: '#/components/schemas/SchemaAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + {"$id":"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0","$comment":"{ + \"@id\": \"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\", + \"term\": \"d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0\" + }","title":"tagSchemaAPI339404","description":"tagSchemaAPI339404","type":"object","properties":{"@context":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"readOnly":true},"id":{"type":"string","readOnly":true}},"required":["@context","type"],"additionalProperties":false,"$defs":{}} + - >- + {"@context":{"@version":1.1,"@vocab":"https://w3id.org/traceability/#undefinedTerm","id":"@id","type":"@type","d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0":{"@id":"#d0e99e70-3511-486668e-bf6f-10041e9a0cb7669080&1.0.0","@context":{}}}} + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + SchemaActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + required: + - vcs + - vps + SchemaDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/SchemaDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/SchemaActivityDTO' + required: + - id + - uuid + - item + - row + - activity + SchemaTreeNodeDataDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + color: + type: string + description: Color + example: '#FFFFFF' + required: + - id + - color + SchemaTreeNodeDTO: + type: object + properties: + label: + type: string + description: Label + example: Monitoring Report + expanded: + type: boolean + description: Expanded + example: true + data: + $ref: '#/components/schemas/SchemaTreeNodeDataDTO' + children: + type: object + description: Schema tree node children + required: + - label + - expanded + - data + - children + SchemaTreeDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/SchemaGridDTO' + root: + $ref: '#/components/schemas/SchemaTreeNodeDTO' + required: + - id + - item + - root + TokenDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + tokenId: + type: string + description: Token identifier + example: 0.0.4481265 + status: + type: string + description: Status + example: UPDATED + lastUpdate: + type: number + description: Last update + example: 1716755852055 + serialNumber: + type: number + description: Serial number + example: 1 + hasNext: + type: boolean + description: Has next + example: false + name: + type: string + description: Name + example: iRec Token + symbol: + type: string + description: Symbol + example: iRec + type: + type: string + description: Symbol + enum: + - NON_FUNGIBLE_UNIQUE + - FUNGIBLE_COMMON + treasury: + type: string + description: Treasury + example: 0.0.1 + memo: + type: string + description: Memo + example: 0.0.2952745 + totalSupply: + type: object + description: Total supply + example: '77' + decimals: + type: string + description: Decimals + example: '2' + required: + - id + - tokenId + - status + - lastUpdate + - serialNumber + - hasNext + - name + - symbol + - type + - treasury + - memo + - totalSupply + - decimals + TokenDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + row: + $ref: '#/components/schemas/TokenDTO' + required: + - id + - row + RoleOptionsDTO: + type: object + properties: + role: + type: string + description: Role + example: Registrant + group: + type: string + description: Role + example: Registrants + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - role + - group + - issuer + RoleAnalyticsDTO: + type: object + properties: + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - policyId + - textSearch + RoleDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Role-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vc-document + options: + $ref: '#/components/schemas/RoleOptionsDTO' + analytics: + $ref: '#/components/schemas/RoleAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RoleActivityDTO: + type: object + properties: + vcs: + type: number + description: VCs + example: 10 + required: + - vcs + RoleDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/RoleDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + activity: + $ref: '#/components/schemas/RoleActivityDTO' + required: + - id + - uuid + - item + - row + - activity + DIDOptionsDTO: + type: object + properties: + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + did: + type: string + description: DID + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - relationships + - did + DIDAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + DIDGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/DIDOptionsDTO' + analytics: + $ref: '#/components/schemas/DIDAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + DIDDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: DID-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-did-document + options: + $ref: '#/components/schemas/DIDOptionsDTO' + analytics: + $ref: '#/components/schemas/DIDAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"@context":"https://www.w3.org/ns/did/v1","id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","verificationMethod":[{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key","type":"Ed25519VerificationKey2018","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"8WkE4uKLN7i9RnzeoUJfxSH9Jw8M1yTzKk6rtwVa6uGP"},{"id":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key-bbs","type":"Bls12381G2Key2020","controller":"did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438","publicKeyBase58":"237NDsUq7LAmSMzE6CEBFyuz9s2sscSz2M6cn4zUKPmJ5Q6rMh6SLRGC3EDdna7vSKwHMCGjhCiLKM6qYU7ZeYKRPNnRMcadoJbSQ44SGAAiyrpmhX8aaoTZpMdHmGFVXdqC"}],"authentication":["did:hedera:testnet:C37cfiAMHeToXMiy1V5rAVJdhd182QJRGxwsWQpu2dN2_0.0.1533438#did-root-key"],"assertionMethod":["#did-root-key","#did-root-key-bbs"]}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + DIDDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/DIDDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/DIDDetailsItemDTO' + required: + - id + - uuid + - item + - row + - history + MessageDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + RelationshipDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + category: + type: number + description: Category + example: 1 + name: + type: string + description: Name + example: Monitoring Report Document + required: + - id + - uuid + - type + - category + - name + RelationshipLinkDTO: + type: object + properties: + source: + type: string + description: Source message identifier + example: '1706823227.586179534' + target: + type: string + description: Target message identifier + example: '1706823227.586179534' + required: + - source + - target + RelationshipsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + item: + $ref: '#/components/schemas/MessageDTO' + target: + $ref: '#/components/schemas/RelationshipDTO' + relationships: + type: array + items: + $ref: '#/components/schemas/RelationshipDTO' + links: + type: array + items: + $ref: '#/components/schemas/RelationshipLinkDTO' + categories: + description: Categories + example: + - name: Registry + - name: Policy + - name: Schema + - name: Role + - name: VC + - name: VP + type: array + items: + type: string + required: + - id + - item + - target + - relationships + - links + - categories + VPOptionsDTO: + type: object + properties: + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + required: + - issuer + - relationships + VPGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VP-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vp-document + options: + $ref: '#/components/schemas/VPOptionsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + VPAnalyticsDTO: + type: object + properties: + schemaIds: + description: Schema message identifiers + example: + - '1706823227.586179534' + type: array + items: + type: string + schemaNames: + description: Schema names + example: + - Monitoring Report + type: array + items: + type: string + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + textSearch: + type: string + description: Text search + required: + - schemaIds + - schemaNames + - policyId + - textSearch + VPDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VP-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vp-document + options: + $ref: '#/components/schemas/VPOptionsDTO' + analytics: + $ref: '#/components/schemas/VPAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"id":"urn:uuid:2c374b67-fda5-4023-97c2-c0782624573f","type":["VerifiablePresentation"],"@context":["https://www.w3.org/2018/credentials/v1"],"verifiableCredential":[{"id":"urn:uuid:ff0aecbd-d358-4e5b-b99b-7a87ba38a3b2","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438","issuanceDate":"2024-02-06T05:40:37.795Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi"],"credentialSubject":[{"finalMintAmount":5,"policyId":"65bc691d2ae9d0f1ef2db3bc","ref":"urn:uuid:11b1ad6f-8b4f-4d61-a63a-cc9e6532625f","@context":["ipfs://bafkreib6arvz7hltf2yqoyb7iqlkrojur7lqqcsuuhvcfvyrtkncm6pqhi"],"id":"urn:uuid:5d253a1d-456a-4fb1-8b45-257e1db2e668","type":"601a68c4-66c3-407c-bc88-1b5841e6d1da&1.0.0"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:37Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..UvTeKVUVUxH1SFNNoyu_VXf4kFqDIFzFPJaaq5adiSHrBePLQMQv7dM_Fq23z7UGHSmXlodBen1Ujcdi-am5DQ"}},{"id":"urn:uuid:b76fbd72-48b7-45fb-b152-7ec13d11eafb","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438","issuanceDate":"2024-02-06T05:40:45.066Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu"],"credentialSubject":[{"date":"2024-02-06T05:40:45.021Z","tokenId":"0.0.1621155","amount":"5","@context":["ipfs://bafkreigd6nhj5auxobzu4qzlakzcaizh6wux2gq43qft4rwpri7msn2geu"],"type":"MintToken"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:45Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..5hWYO3NA0Q9zI0oS1lLOpofQI-DTQVM0sd4GUQV-UUSlBug3EgYYBm7247LCzlCRt9VpYsUh7SxIrsgHzsSRDA"}}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-06T05:40:45Z","verificationMethod":"did:hedera:testnet:C5YaWT128KGmtivag99VbSeKrzxP8P8H7FbL2KQ9VQEB_0.0.1533438#did-root-key","proofPurpose":"authentication","challenge":"123","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Mu5BaQ34idnqG6d-aMqufQOXcuWHMkv6N9Z2zhBi9Yfd7jU9FFkwi-Xjyf-Kastr7vVWBNLwGxB-bPRf4UEHAg"}}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + VPDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/VPDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/VPDetailsItemDTO' + required: + - id + - uuid + - item + - row + - history + VCOptionsDTO: + type: object + properties: + issuer: + type: string + description: Issuer + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + relationships: + description: Relationships + example: + - '1706823227.586179534' + type: array + items: + type: string + documentStatus: + type: string + description: Document status + example: Approved + encodedData: + type: boolean + description: Encoded EVC data + required: + - issuer + - relationships + - documentStatus + - encodedData + VCAnalyticsDTO: + type: object + properties: + policyId: + type: string + description: Policy message identifier + example: '1706823227.586179534' + schemaId: + type: string + description: Schema message identifier + example: '1706823227.586179534' + schemaName: + type: string + description: Schema name + example: Monitoring Report + textSearch: + type: string + description: Text search + required: + - policyId + - schemaId + - schemaName + - textSearch + VCGridDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VC-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vc-document + options: + $ref: '#/components/schemas/VCOptionsDTO' + analytics: + $ref: '#/components/schemas/VCAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + VCDetailsItemDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: VC-Document + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-vc-document + options: + $ref: '#/components/schemas/VCOptionsDTO' + analytics: + $ref: '#/components/schemas/VCAnalyticsDTO' + documents: + type: array + description: Documents + items: + type: string + example: + - >- + "{"id":"urn:uuid:229f8416-db6b-4d68-90da-38a5355126f5","type":["VerifiableCredential"],"issuer":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223","issuanceDate":"2024-02-02T10:06:53.300Z","@context":["https://www.w3.org/2018/credentials/v1","ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"credentialSubject":[{"@context":["ipfs://bafkreiam7a2vox6q7yweh4xsebpp4vnonasxlzcdsaxt2cicviax4f7ruq"],"id":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223","type":"StandardRegistry"}],"proof":{"type":"Ed25519Signature2018","created":"2024-02-02T10:06:53Z","verificationMethod":"did:hedera:testnet:4dKeEsD5qLq5DB5KhA6qyh61XMHtm94FdQFTJsDYRaSa_0.0.2195223#did-root-key","proofPurpose":"assertionMethod","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YElNPdCNkj8wzABUNgWYo3Yge0qrGA2KbxBWDKBzACJJe70ItIZsgbIQUHMnFbcKpXB1cSnHQ-H5WH_7uZ_3CQ"}}" + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + - documents + VCDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/VCDetailsItemDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + history: + type: array + items: + $ref: '#/components/schemas/VCDetailsItemDTO' + schema: + type: object + description: VC Schema + example: + $id: '#StandardRegistry' + $comment: '{ "@id": "#StandardRegistry", "term": "StandardRegistry" }' + title: StandardRegistry + description: StandardRegistry + type: object + properties: + '@context': + oneOf: + - type: string + - type: array + items: + type: string + readOnly: true + type: + oneOf: + - type: string + - type: array + items: + type: string + readOnly: true + id: + type: string + readOnly: true + geography: + $comment: '{"term": "geography", "@id": "https://www.schema.org/text"}' + title: geography + description: geography + type: string + readOnly: false + law: + $comment: '{"term": "law", "@id": "https://www.schema.org/text"}' + title: law + description: law + type: string + readOnly: false + tags: + $comment: '{"term": "tags", "@id": "https://www.schema.org/text"}' + title: tags + description: tags + type: string + readOnly: false + ISIC: + $comment: '{"term": "ISIC", "@id": "https://www.schema.org/text"}' + title: ISIC + description: ISIC + type: string + readOnly: false + required: + - geography + - law + - tags + additionalProperties: false + required: + - id + - uuid + - item + - row + - history + - schema + NFTDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + tokenId: + type: string + description: Token identifier + example: 0.0.4481265 + lastUpdate: + type: number + description: Last update + example: 1716755852055 + serialNumber: + type: number + description: Serial number + example: 1 + metadata: + type: string + description: metadata + example: '1706823227.586179534' + required: + - id + - tokenId + - lastUpdate + - serialNumber + - metadata + NFTDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + row: + $ref: '#/components/schemas/NFTDTO' + history: + type: array + description: NFT transaction history + items: + type: object + example: + - consensus_timestamp: '1707292471.903596642' + nonce: 0 + transaction_id: 0.0.1533323-1707292459-175375906 + type: CRYPTOTRANSFER + is_approval: false + receiver_account_id: 0.0.1842221 + sender_account_id: 0.0.1533323 + - consensus_timestamp: '1707292470.199625477' + nonce: 0 + transaction_id: 0.0.1533323-1707292458-093221893 + type: TOKENMINT + is_approval: false + receiver_account_id: 0.0.1533323 + sender_account_id: null + required: + - id + - row + - history + TopicOptionsDTO: + type: object + properties: + name: + type: string + description: Name + example: Policy topic + description: + type: string + description: Name + example: Verra REDD Policy topic + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + messageType: + type: string + description: Message type + enum: + - USER_TOPIC + - POLICY_TOPIC + - INSTANCE_POLICY_TOPIC + - DYNAMIC_TOPIC + - SCHEMA_TOPIC + - SYNCHRONIZATION_TOPIC + - RETIRE_TOPIC + - TOKEN_TOPIC + - MODULE_TOPIC + - CONTRACT_TOPIC + - TOOL_TOPIC + - TAGS_TOPIC + childId: + type: string + description: Child topic identifier + example: 0.0.4481265 + parentId: + type: string + description: Parent topic identifier + example: 0.0.4481265 + rationale: + type: string + description: Rationale + example: '1706895596.736882433' + required: + - name + - description + - owner + - messageType + - childId + - parentId + - rationale + TopicAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + TopicDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Topic + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-topic + options: + $ref: '#/components/schemas/TopicOptionsDTO' + analytics: + $ref: '#/components/schemas/TopicAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + RawTopicDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + lastUpdate: + type: number + description: Last update + example: 1716755852055 + messages: + type: number + description: Messages + example: 25 + hasNext: + type: boolean + description: Has next + example: false + required: + - id + - topicId + - lastUpdate + - messages + - hasNext + TopicActivityDTO: + type: object + properties: + registries: + type: number + description: Registries + example: 10 + topics: + type: number + description: Topics + example: 10 + policies: + type: number + description: Policies + example: 10 + tools: + type: number + description: Tools + example: 10 + modules: + type: number + description: Modules + example: 10 + tokens: + type: number + description: Tokens + example: 10 + dids: + type: number + description: DIDs + example: 10 + contracts: + type: number + description: Contracts + example: 10 + schemas: + type: number + description: Schemas + example: 10 + vcs: + type: number + description: VCs + example: 10 + vps: + type: number + description: VPs + example: 10 + roles: + type: number + description: Roles + example: 10 + required: + - registries + - topics + - policies + - tools + - modules + - tokens + - dids + - contracts + - schemas + - vcs + - vps + - roles + TopicDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/TopicDTO' + row: + $ref: '#/components/schemas/RawTopicDTO' + activity: + $ref: '#/components/schemas/TopicActivityDTO' + required: + - id + - uuid + - item + - row + - activity + ContractOptionsDTO: + type: object + properties: + contractId: + type: string + description: Contract identifier + example: 0.0.4481265 + description: + type: string + description: Description + example: Wipe contract + contractType: + type: string + description: Contract type + enum: + - WIPE + - RETIRE + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + required: + - contractId + - description + - contractType + - owner + ContractAnalyticsDTO: + type: object + properties: + textSearch: + type: string + description: Text search + required: + - textSearch + ContractDTO: + type: object + properties: + id: + type: string + description: Identifier + example: 667c240639282050117a1985 + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + consensusTimestamp: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: 0.0.1 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + status: + type: string + description: Status + example: NEW + statusReason: + type: string + description: Status + example: Revoked + lang: + type: string + description: Lang + example: en-US + responseType: + type: string + description: Response type + example: str + statusMessage: + type: string + description: Status message + files: + description: Files + example: *ref_2 + type: array + items: + type: string + topics: + description: Topics + example: *ref_3 + type: array + items: + type: string + tokens: + description: Tokens + example: *ref_4 + type: array + items: + type: string + type: + type: string + description: Type + enum: + - EVC-Document + - VC-Document + - DID-Document + - Schema + - schema-document + - Policy + - Instance-Policy + - VP-Document + - Standard Registry + - Topic + - Token + - Module + - Tool + - Tag + - Role-Document + - Synchronization Event + - Contract + example: Contract + action: + type: string + description: Action + enum: + - create-did-document + - create-vc-document + - create-policy + - publish-policy + - delete-policy + - create-schema + - publish-schema + - delete-schema + - create-topic + - create-vp-document + - publish-system-schema + - Init + - change-message-status + - revoke-document + - delete-document + - token-issue + - create-token + - create-multi-policy + - mint + - publish-module + - publish-tag + - delete-tag + - publish-tool + - create-tool + - create-contract + - discontinue-policy + - deferred-discontinue-policy + - migrate-vc-document + - migrate-vp-document + example: create-contract + options: + $ref: '#/components/schemas/ContractOptionsDTO' + analytics: + $ref: '#/components/schemas/ContractAnalyticsDTO' + required: + - id + - topicId + - consensusTimestamp + - owner + - uuid + - status + - statusReason + - lang + - responseType + - statusMessage + - files + - topics + - tokens + - type + - action + - options + - analytics + ContractDetailsDTO: + type: object + properties: + id: + type: string + description: Message identifier + example: '1706823227.586179534' + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + item: + $ref: '#/components/schemas/ContractDTO' + row: + $ref: '#/components/schemas/RawMessageDTO' + required: + - id + - uuid + - item + - row + LandingAnalyticsDTO: + type: object + properties: + registries: + type: number + description: Registries count + example: '10' + methodologies: + type: number + description: Methodologies count + example: '10' + projects: + type: number + description: Projects count + example: '10' + totalIssuance: + type: number + description: Total issuance + example: '10' + date: + format: date-time + type: string + description: ISO Date + example: '2024-06-12T14:17:26.689Z' + required: + - registries + - methodologies + - projects + - totalIssuance + - date + ProjectCoordinatesDTO: + type: object + properties: + coordinates: + type: string + description: Coordinates of project + example: 33.33|77.77 + projectId: + type: string + description: Project message identifier + example: '1706823227.586179534' + required: + - coordinates + - projectId + SearchPolicyBlocksDTO: + type: object + properties: + hash: + type: string + description: Hash + example: DdQweGpEqbWgQUZcQjySQn2qYPd3yACGnSoRXiuLt5or + hashMap: + type: object + description: Hash map + threshold: + type: number + description: Threshold + example: 10 + required: + - hash + - hashMap + - threshold + SearchPolicyParamsDTO: + type: object + properties: + text: + type: string + description: Text + minVcCount: + type: number + description: Mint VC count + example: 10 + minVpCount: + type: number + description: Mint VP count + example: 10 + minTokensCount: + type: number + description: Mint tokens count + example: 10 + threshold: + type: number + description: Threshold + example: 10 + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + blocks: + $ref: '#/components/schemas/SearchPolicyBlocksDTO' + required: + - text + - minVcCount + - minVpCount + - minTokensCount + - threshold + - owner + - blocks + SearchPolicyResultDTO: + type: object + properties: + type: + type: string + description: Type + example: Global + topicId: + type: string + description: Topic identifier + example: 0.0.4481265 + uuid: + type: string + description: UUID + example: 93938a10-d032-4a9b-9425-092e58bffbf7 + name: + type: string + description: Name + example: Verra REDD + description: + type: string + description: Description + example: Verra REDD Policy + version: + type: string + description: Version + example: 1.0.0 + status: + type: string + description: Status + example: PUBLISH + messageId: + type: string + description: Message identifier + example: '1706823227.586179534' + owner: + type: string + description: Owner + example: >- + did:hedera:testnet:8Go53QCUXZ4nzSQMyoWovWCxseogGTMLDiHg14Fkz4VN_0.0.4481265 + textSearch: + type: string + description: Text search + registryId: + type: string + description: Registry identifier + example: '1706823227.586179534' + vcCount: + type: number + description: VC count + example: 10 + vpCount: + type: number + description: VP count + example: 10 + tokensCount: + type: number + description: Token count + example: 10 + rate: + type: number + description: Rate + example: 50 + minimum: 0 + maximum: 100 + tags: + description: tags + example: + - iRec + type: array + items: + type: string + required: + - type + - topicId + - uuid + - name + - description + - version + - status + - messageId + - owner + - textSearch + - registryId + - vcCount + - vpCount + - tokensCount + - rate + - tags diff --git a/swagger.yaml b/swagger.yaml index e1f69ede76..71a7b53bf4 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -2540,11 +2540,43 @@ paths: tags: *ref_6 security: - bearer: [] + /logs/seq: + get: + operationId: LoggerApi_getSeqUrl + summary: Return url on seq store. + description: >- + Return url on seq store. Only users with the Standard Registry role are + allowed to make the request. + parameters: [] + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: object + properties: + seq_url: + type: string + example: http://localhost:5341 + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_6 + security: + - bearer: [] /map/key: get: operationId: MapApi_getKey - summary: Return map key. - description: Return map key. + summary: Get map API key. + description: Return map API key. parameters: [] responses: '200': @@ -2553,6 +2585,10 @@ paths: application/json: schema: type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: @@ -2561,11 +2597,13 @@ paths: $ref: '#/components/schemas/InternalServerErrorDTO' tags: &ref_7 - map + security: + - bearer: [] /map/sh: get: operationId: MapApi_getSentinelKey - summary: Return map key. - description: Return map key. + summary: Get sentinel API key. + description: Return sentinel API key. parameters: [] responses: '200': @@ -2574,6 +2612,10 @@ paths: application/json: schema: type: string + '401': + description: Unauthorized. + '403': + description: Forbidden. '500': description: Internal server error. content: @@ -2581,6 +2623,8 @@ paths: schema: $ref: '#/components/schemas/InternalServerErrorDTO' tags: *ref_7 + security: + - bearer: [] /metrics: get: operationId: MetricsApi_getMetrics @@ -5101,12 +5145,12 @@ paths: tags: *ref_11 security: - bearer: [] - /policies/{policyId}/tag-block-map: + /policies/{policyId}/virtual-keys: get: - operationId: PolicyApi_getTagBlockMap - summary: Get policy tag block map. + operationId: PolicyApi_downloadVirtualKeys + summary: Get policy virtual keys. description: >- - Get policy tag block map. Only users with the Standard Registry role are + Get policy virtual keys. Only users with the Standard Registry role are allowed to make the request. parameters: - name: policyId @@ -5118,11 +5162,12 @@ paths: type: string responses: '200': - description: Policy tag block map. + description: Policy virtual keys. content: application/json: schema: - type: object + type: string + format: binary '401': description: Unauthorized. '403': @@ -5136,13 +5181,12 @@ paths: tags: *ref_11 security: - bearer: [] - /policies/{policyId}/virtual-keys: - get: - operationId: PolicyApi_downloadVirtualKeys - summary: Get policy virtual keys. + post: + operationId: PolicyApi_uploadVirtualKeys + summary: Upload policy virtual keys. description: >- - Get policy virtual keys. Only users with the Standard Registry role are - allowed to make the request. + Upload policy virtual keys. Only users with the Standard Registry role + are allowed to make the request. parameters: - name: policyId required: true @@ -5151,14 +5195,17 @@ paths: example: '000000000000000000000001' schema: type: string + requestBody: + required: true + description: Virtual keys file + content: + application/json: + schema: + type: string + format: binary responses: '200': - description: Policy virtual keys. - content: - application/json: - schema: - type: string - format: binary + description: Operation completed. '401': description: Unauthorized. '403': @@ -5172,12 +5219,13 @@ paths: tags: *ref_11 security: - bearer: [] - post: - operationId: PolicyApi_uploadVirtualKeys - summary: Upload policy virtual keys. + /policies/{policyId}/tag-block-map: + get: + operationId: PolicyApi_getTagBlockMap + summary: Get policy tag block map. description: >- - Upload policy virtual keys. Only users with the Standard Registry role - are allowed to make the request. + Get policy tag block map. Only users with the Standard Registry role are + allowed to make the request. parameters: - name: policyId required: true @@ -5186,17 +5234,13 @@ paths: example: '000000000000000000000001' schema: type: string - requestBody: - required: true - description: Virtual keys file - content: - application/json: - schema: - type: string - format: binary responses: '200': - description: Operation completed. + description: Policy tag block map. + content: + application/json: + schema: + type: object '401': description: Unauthorized. '403': @@ -5507,6 +5551,30 @@ paths: tags: *ref_11 security: - bearer: [] + /policies/blocks/about: + get: + operationId: PolicyApi_getBlockAbout + summary: Returns block descriptions. + description: >- + Returns block descriptions. Only users with the Standard Registry role + are allowed to make the request. + parameters: [] + responses: + '200': + description: Block descriptions. + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] /policies/{policyId}/export/file: get: operationId: PolicyApi_getPolicyExportFile @@ -5637,6 +5705,13 @@ paths: example: 0.0.00000001 schema: type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean requestBody: required: true description: Message. @@ -5682,6 +5757,13 @@ paths: example: 0.0.00000001 schema: type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean requestBody: required: true description: Message. @@ -5795,6 +5877,13 @@ paths: example: 0.0.00000001 schema: type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean requestBody: required: true description: A zip file containing policy config. @@ -5840,6 +5929,13 @@ paths: example: 0.0.00000001 schema: type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean requestBody: required: true description: Form data with policy file and metadata. @@ -5892,6 +5988,13 @@ paths: example: 0.0.00000001 schema: type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean requestBody: required: true description: A zip file containing policy config. @@ -5935,6 +6038,13 @@ paths: example: 0.0.00000001 schema: type: string + - name: demo + required: false + in: query + description: Import policy in demo mode. + example: true + schema: + type: boolean requestBody: required: true description: Form data with policy file and metadata. @@ -6127,30 +6237,6 @@ paths: tags: *ref_11 security: - bearer: [] - /policies/blocks/about: - get: - operationId: PolicyApi_getBlockAbout - summary: Returns block descriptions. - description: >- - Returns block descriptions. Only users with the Standard Registry role - are allowed to make the request. - parameters: [] - responses: - '200': - description: Block descriptions. - '401': - description: Unauthorized. - '403': - description: Forbidden. - '500': - description: Internal server error. - content: - application/json: - schema: - $ref: '#/components/schemas/InternalServerErrorDTO' - tags: *ref_11 - security: - - bearer: [] /policies/{policyId}/dry-run/users: get: operationId: PolicyApi_getDryRunUsers @@ -6531,6 +6617,265 @@ paths: tags: *ref_11 security: - bearer: [] + /policies/{policyId}/test: + post: + operationId: PolicyApi_addPolicyTest + summary: Add policy test. + description: >- + Add policy test. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + requestBody: + required: true + description: Form data with tests. + content: + multipart/form-data: + schema: + type: array + items: + type: object + properties: + tests: + type: string + format: binary + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}: + get: + operationId: PolicyApi_getPolicyTest + summary: Get policy test. + description: >- + Get policy test. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + delete: + operationId: PolicyApi_deletePolicyTest + summary: Delete policy test. + description: >- + Delete policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + type: boolean + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/start: + post: + operationId: PolicyApi_startPolicyTest + summary: Start policy test. + description: >- + Start policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/stop: + post: + operationId: PolicyApi_stopPolicyTest + summary: Stop policy test. + description: >- + Stop policy test. Only users with the Standard Registry role are + allowed to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyTestDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] + /policies/{policyId}/test/{testId}/details: + get: + operationId: PolicyApi_getTestDetails + summary: Get test details. + description: >- + Get test details. Only users with the Standard Registry role are allowed + to make the request. + parameters: + - name: policyId + required: true + in: path + description: Policy Id + example: '000000000000000000000001' + schema: + type: string + - name: testId + required: true + in: path + description: Test Id + example: '000000000000000000000001' + schema: + type: string + responses: + '200': + description: Successful operation. + content: + application/json: + schema: + $ref: '#/components/schemas/RunningDetailsDTO' + '401': + description: Unauthorized. + '403': + description: Forbidden. + '500': + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerErrorDTO' + tags: *ref_11 + security: + - bearer: [] /policies/methodologies/categories: get: operationId: PolicyApi_getPolicyCategoriesAsync @@ -10552,11 +10897,11 @@ paths: type: string responses: '200': - description: Successful operation. + description: Record UUID. content: application/json: schema: - type: boolean + type: string '401': description: Unauthorized. '403': @@ -11277,12 +11622,12 @@ paths: example: Active schema: enum: - - ALL - - DRAFT - DRY-RUN + - DRAFT - PUBLISH_ERROR - - DISCONTINUED - PUBLISH + - DISCONTINUED + - DEMO type: string responses: '200': @@ -11707,6 +12052,71 @@ components: - '@context' - credentialSubject - proof + PolicyTestDTO: + type: object + properties: + id: + type: string + description: Test ID + example: '000000000000000000000001' + uuid: + type: string + description: Test UUID + example: 00000000-0000-0000-0000-000000000000 + name: + type: string + description: Test Name + example: Test Name + policyId: + type: string + description: Policy ID + example: '000000000000000000000001' + owner: + type: string + description: Test owner + example: >- + #did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001 + status: + type: string + description: Test status + enum: + - New + - Running + - Stopped + - Success + - Failure + example: New + date: + type: string + description: Last start date + example: '1900-01-01T00:00:00.000Z' + duration: + type: string + description: Test duration + example: 0 + progress: + type: string + description: Test progress + example: 0 + resultId: + type: string + description: Test result + example: 00000000-0000-0000-0000-000000000000 + result: + type: string + description: Test result + required: + - id + - uuid + - name + - policyId + - owner + - status + - date + - duration + - progress + - resultId + - result PolicyDTO: type: object properties: @@ -11736,6 +12146,7 @@ components: - PUBLISH_ERROR - PUBLISH - DISCONTINUED + - DEMO example: DRAFT creator: type: string @@ -11848,6 +12259,10 @@ components: projectSchema: type: string example: 00000000-0000-0000-0000-000000000000 + tests: + type: array + items: + $ref: '#/components/schemas/PolicyTestDTO' required: - id - uuid @@ -11875,6 +12290,7 @@ components: - policyGroups - categories - projectSchema + - tests AggregatedDTOItem: type: object properties: @@ -12016,6 +12432,7 @@ components: - PUBLISH_ERROR - PUBLISH - DISCONTINUED + - DEMO example: DRAFT owner: type: string @@ -12880,6 +13297,7 @@ components: - PUBLISHED - UNPUBLISHED - ERROR + - DEMO example: DRAFT topicId: type: string @@ -13475,6 +13893,22 @@ components: - schemas - tags - moduleTopicId + RunningDetailsDTO: + type: object + properties: + left: + type: object + right: + type: object + total: + type: number + documents: + type: object + required: + - left + - right + - total + - documents PolicyCategoryDTO: type: object properties: @@ -14424,22 +14858,6 @@ components: - info - total - documents - RunningDetailsDTO: - type: object - properties: - left: - type: object - right: - type: object - total: - type: number - documents: - type: object - required: - - left - - right - - total - - documents RoleDTO: type: object properties: diff --git a/topic-viewer/package.json b/topic-viewer/package.json index f83f90d8cf..253473e488 100644 --- a/topic-viewer/package.json +++ b/topic-viewer/package.json @@ -30,5 +30,5 @@ "start": "node dist/index.js" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/tree-viewer/package.json b/tree-viewer/package.json index 01faf5c40d..c21a87da98 100644 --- a/tree-viewer/package.json +++ b/tree-viewer/package.json @@ -28,5 +28,5 @@ "start": "node dist/index.js" }, "type": "module", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/web-proxy/Dockerfile.ci b/web-proxy/Dockerfile.ci index a5a7b3c666..91c38327e7 100644 --- a/web-proxy/Dockerfile.ci +++ b/web-proxy/Dockerfile.ci @@ -25,10 +25,10 @@ RUN npm install interfaces.tgz && npm run build:prod FROM nginxinc/nginx-unprivileged:1.25.4-alpine as image # Copy config and built application from the build stage into the image -COPY --link ./web-proxy/configs/default.conf /etc/nginx/conf.d/default.conf +COPY --link ./web-proxy/configs/image.conf /etc/nginx/templates/default.conf.template COPY --link --from=build /usr/local/app/dist/guardian /usr/share/nginx/html # Change the user to nginx USER nginx -EXPOSE 80 \ No newline at end of file +EXPOSE 80 diff --git a/web-proxy/Dockerfile.demo b/web-proxy/Dockerfile.demo index c729eec869..d8e8669664 100644 --- a/web-proxy/Dockerfile.demo +++ b/web-proxy/Dockerfile.demo @@ -25,10 +25,10 @@ RUN npm install interfaces.tgz && npm run build:demo FROM nginxinc/nginx-unprivileged:1.25.4-alpine as image # Copy config and built application from the build stage into the image -COPY --link ./web-proxy/configs/default.conf /etc/nginx/conf.d/default.conf +COPY --link ./web-proxy/configs/demo.conf /etc/nginx/templates/default.conf.template COPY --link --from=build /usr/local/app/dist/guardian /usr/share/nginx/html # Change the user to nginx USER nginx -EXPOSE 80 \ No newline at end of file +EXPOSE 80 diff --git a/worker-service/configs/.env.worker b/worker-service/configs/.env.worker index ff61adf1ba..def542160e 100644 --- a/worker-service/configs/.env.worker +++ b/worker-service/configs/.env.worker @@ -18,6 +18,7 @@ IPFS_TIMEOUT="720" IPFS_PROVIDER="web3storage" # 'filebase', 'web3storage' or 'local' IPFS_PUBLIC_GATEWAY='https://ipfs.eth.aragon.network/ipfs/${cid}' IPFS_NODE_ADDRESS="http://localhost:5001" +ANALYTICS_SERVICE="http://localhost:3021" IPFS_STORAGE_KEY="..." IPFS_STORAGE_PROOF="..." MAX_HEDERA_TIMEOUT="600" @@ -49,3 +50,19 @@ HASHICORP_TOKEN="1234" HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" HASHICORP_ENCRIPTION_ALG="sha512" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/worker-service/configs/.env.worker.develop b/worker-service/configs/.env.worker.develop index 038631b206..a0de5cbade 100644 --- a/worker-service/configs/.env.worker.develop +++ b/worker-service/configs/.env.worker.develop @@ -18,6 +18,7 @@ IPFS_TIMEOUT="720" IPFS_PROVIDER="web3storage" # 'filebase', 'web3storage' or 'local' IPFS_PUBLIC_GATEWAY='https://w3s.link/ipfs/${cid}' IPFS_NODE_ADDRESS="http://localhost:5001" +ANALYTICS_SERVICE="http://localhost:3021" IPFS_STORAGE_KEY="..." IPFS_STORAGE_PROOF="..." MAX_HEDERA_TIMEOUT="600" @@ -49,3 +50,19 @@ HASHICORP_TOKEN="1234" HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" HASHICORP_ENCRIPTION_ALG="sha512" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="logger_db" +DB_LOGGER_HOST="localhost" +DB_LOGGER_COLLECTION="log" +LOG_FILE_PATH="./logs/app.log" +LOG_LEVEL="info" +SEQ_SERVER_URL="http://localhost:5341" +SEQ_UI_URL="http://localhost:5341" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="1" +MAX_POOL_SIZE="5" +MAX_IDLE_TIME_MS="30000" \ No newline at end of file diff --git a/worker-service/configs/.env.worker.template b/worker-service/configs/.env.worker.template index 663aa2392b..8649205268 100644 --- a/worker-service/configs/.env.worker.template +++ b/worker-service/configs/.env.worker.template @@ -18,6 +18,7 @@ IPFS_TIMEOUT="720" IPFS_PROVIDER="web3storage" # 'filebase', 'web3storage' or 'local' IPFS_PUBLIC_GATEWAY='https://ipfs.io/ipfs/${cid}' IPFS_NODE_ADDRESS="http://localhost:5001" +ANALYTICS_SERVICE="http://localhost:3021" MAX_HEDERA_TIMEOUT="" MQ_MAX_PAYLOAD="" #LOG_LEVEL="2" @@ -48,3 +49,19 @@ VAULT_PROVIDER="" HASHICORP_TOKEN="" HASHICORP_ADDRESS="http://localhost:8200" HASHICORP_NAMESPACE="admin" + +#PINO_LOGGER +TRANSPORTS="CONSOLE, MONGO" +DB_LOGGER_NAME="" +DB_LOGGER_HOST="" +DB_LOGGER_COLLECTION="" +LOG_FILE_PATH="" +LOG_LEVEL="" +SEQ_SERVER_URL="" +SEQ_UI_URL="" +SEQ_API_KEY="" + +#MONGO_INIT +MIN_POOL_SIZE="" +MAX_POOL_SIZE="" +MAX_IDLE_TIME_MS="" \ No newline at end of file diff --git a/worker-service/environments/environment.prod.ts b/worker-service/environments/environment.prod.ts index 73022f0364..799c6dc1ff 100644 --- a/worker-service/environments/environment.prod.ts +++ b/worker-service/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const ApplicationEnvironment = { - demoMode: true + demoMode: false } diff --git a/worker-service/package.json b/worker-service/package.json index a0bc2ce613..f7bf7a2b04 100644 --- a/worker-service/package.json +++ b/worker-service/package.json @@ -2,8 +2,8 @@ "author": "Envision Blockchain Solutions ", "dependencies": { "@filebase/client": "^0.0.5", - "@guardian/common": "^2.26.2", - "@guardian/interfaces": "^2.26.2", + "@guardian/common": "^2.27.0", + "@guardian/interfaces": "^2.27.0", "@hashgraph/sdk": "2.46.0", "@nestjs/common": "^9.4.1", "@nestjs/core": "^9.4.1", @@ -54,6 +54,9 @@ "license": "Apache-2.0", "main": "dist/index.js", "name": "worker-service", + "imports": { + "#constants": "./dist/constants/index.js" + }, "scripts": { "build": "tsc && tsc-alias", "build:prod": "tsc --project tsconfig.production.json && tsc-alias", @@ -66,5 +69,5 @@ }, "type": "module", "types": "dist/index.d.ts", - "version": "2.26.2" + "version": "2.27.0" } diff --git a/worker-service/src/api/worker.ts b/worker-service/src/api/worker.ts index e62af88d82..013df2f632 100644 --- a/worker-service/src/api/worker.ts +++ b/worker-service/src/api/worker.ts @@ -1,4 +1,4 @@ -import { Logger, MessageBrokerChannel, MessageResponse, NatsService, NotificationHelper, SecretManager, Users, } from '@guardian/common'; +import { MessageBrokerChannel, MessageResponse, NatsService, NotificationHelper, PinoLogger, SecretManager, Users } from '@guardian/common'; import { ExternalMessageEvents, GenerateUUIDv4, ISignOptions, ITask, ITaskResult, WorkerEvents, WorkerTaskType } from '@guardian/interfaces'; import { HederaSDKHelper, NetworkOptions } from './helpers/hedera-sdk-helper.js'; import { IpfsClientClass } from './ipfs-client-class.js'; @@ -23,12 +23,6 @@ function rejectTimeout(t: number): Promise { * Worker class */ export class Worker extends NatsService { - /** - * Logger instance - * @private - */ - private readonly logger: Logger; - /** * Message queue name */ @@ -112,7 +106,8 @@ export class Worker extends NatsService { private w3cKey: string, private w3cProof: string, private readonly filebaseKey: string, - private readonly workerID: string + private readonly workerID: string, + private readonly logger: PinoLogger ) { super(); //this.workerID = this._workerID; @@ -121,7 +116,6 @@ export class Worker extends NatsService { this.w3cProof, this.filebaseKey ); - this.logger = new Logger(); this.analyticsService = process.env.ANALYTICS_SERVICE; this.minPriority = parseInt(process.env.MIN_PRIORITY, 10); diff --git a/worker-service/src/app.ts b/worker-service/src/app.ts index d61e16c090..111b0fc245 100644 --- a/worker-service/src/app.ts +++ b/worker-service/src/app.ts @@ -1,4 +1,4 @@ -import { ApplicationState, LargePayloadContainer, Logger, MessageBrokerChannel, NotificationService, OldSecretManager, SecretManager, Users, ValidateConfiguration } from '@guardian/common'; +import { ApplicationState, LargePayloadContainer, MessageBrokerChannel, mongoForLoggingInitialization, NotificationService, OldSecretManager, PinoLogger, pinoLoggerInitialization, SecretManager, Users, ValidateConfiguration } from '@guardian/common'; import { Worker } from './api/worker.js'; import { HederaSDKHelper } from './api/helpers/hedera-sdk-helper.js'; import { ApplicationStates, GenerateUUIDv4 } from '@guardian/interfaces'; @@ -27,12 +27,14 @@ Promise.all([ ] }, }), + mongoForLoggingInitialization() ]).then(async values => { - const [cn, app] = values; + const [cn, app, loggerMongo] = values; app.listen(); const channel = new MessageBrokerChannel(cn, 'worker'); - const logger = new Logger(); - logger.setConnection(cn); + + const logger: PinoLogger = pinoLoggerInitialization(loggerMongo); + await new Users().setConnection(cn).init(); const state = new ApplicationState(); await state.setServiceName('WORKER').setConnection(cn).init(); @@ -48,7 +50,7 @@ Promise.all([ } if (process.env.IPFS_PROVIDER === 'local' && !process.env.IPFS_NODE_ADDRESS) { - logger.error('IPFS_NODE_ADDRESS must be set if IPFS_PROVIDER is `local`', [channelName, 'WORKER']); + await logger.error('IPFS_NODE_ADDRESS must be set if IPFS_PROVIDER is `local`', [channelName, 'WORKER']); return false } @@ -85,7 +87,7 @@ Promise.all([ }); await state.updateState(ApplicationStates.INITIALIZING); - const w = new Worker(IPFS_STORAGE_KEY, IPFS_STORAGE_PROOF, IPFS_STORAGE_API_KEY, channelName); + const w = new Worker(IPFS_STORAGE_KEY, IPFS_STORAGE_PROOF, IPFS_STORAGE_API_KEY, channelName, logger); await w.setConnection(cn).init(); return true; diff --git a/worker-service/src/config.ts b/worker-service/src/config.ts index c687c68151..196dee2fa0 100644 --- a/worker-service/src/config.ts +++ b/worker-service/src/config.ts @@ -23,4 +23,3 @@ if (!process.env.OVERRIDE || process.env.OVERRIDE === 'false'){ } } } -console.log('Charged Environment',process.env,'\r\n___ . ___'); diff --git a/worker-service/src/constants/index.ts b/worker-service/src/constants/index.ts new file mode 100644 index 0000000000..ff7349ebb3 --- /dev/null +++ b/worker-service/src/constants/index.ts @@ -0,0 +1 @@ +export { DEFAULT as DEFAULT_MONGO } from './mongo.js'; \ No newline at end of file diff --git a/worker-service/src/constants/mongo.ts b/worker-service/src/constants/mongo.ts new file mode 100644 index 0000000000..65aef2dde1 --- /dev/null +++ b/worker-service/src/constants/mongo.ts @@ -0,0 +1,5 @@ +export const DEFAULT = { + MIN_POOL_SIZE: '1', + MAX_POOL_SIZE: '5', + MAX_IDLE_TIME_MS: '30000', +}; \ No newline at end of file diff --git a/worker-service/src/helpers/mongo-initialization.ts b/worker-service/src/helpers/mongo-initialization.ts new file mode 100644 index 0000000000..41da29f83f --- /dev/null +++ b/worker-service/src/helpers/mongo-initialization.ts @@ -0,0 +1,27 @@ +import { MikroORM } from '@mikro-orm/core'; +import { MongoDriver } from '@mikro-orm/mongodb'; + +import process from 'process'; + +//helpers +import { COMMON_CONNECTION_CONFIG } from '@guardian/common'; + +//constants +import { DEFAULT_MONGO } from '#constants'; + +export async function mongoInitialization() { + if (!process.env.DB_DATABASE) { + return null; + } + + return MikroORM.init({ + ...COMMON_CONNECTION_CONFIG, + driverOptions: { + useUnifiedTopology: true, + minPoolSize: parseInt(process.env.MIN_POOL_SIZE ?? DEFAULT_MONGO.MIN_POOL_SIZE, 10), + maxPoolSize: parseInt(process.env.MAX_POOL_SIZE ?? DEFAULT_MONGO.MAX_POOL_SIZE, 10), + maxIdleTimeMS: parseInt(process.env.MAX_IDLE_TIME_MS ?? DEFAULT_MONGO.MAX_IDLE_TIME_MS, 10), + }, + ensureIndexes: true, + }); +} \ No newline at end of file diff --git a/worker-service/tsconfig.json b/worker-service/tsconfig.json index a4f3088515..22126f3743 100644 --- a/worker-service/tsconfig.json +++ b/worker-service/tsconfig.json @@ -13,7 +13,9 @@ "esModuleInterop": true, "skipLibCheck": true, "baseUrl": "./src", - "paths": {} + "paths": { + "#constants": ["constants/index.js"] + } }, "include": [ "src/**/*", diff --git a/worker-service/tsconfig.production.json b/worker-service/tsconfig.production.json index bc28eaee1a..bb1615e5e7 100644 --- a/worker-service/tsconfig.production.json +++ b/worker-service/tsconfig.production.json @@ -14,6 +14,7 @@ "skipLibCheck": true, "baseUrl": "./src", "paths": { + "#constants": ["constants/index.js"] } }, "include": [