SimplyStaking/panic

CRUD - API & Types Definition Update 2/2 (Settings > Channels)

dillu24 opened this issue · 0 comments

Technical Story

As a PANIC UI developer, I want to have proper “types” (TS interfaces, classes and types) and API calls (made to the real endpoints), so I can understand the code better and finish off each step in the installer.

Description

We tackled the work in the new installer in a very asynchronous way, meaning that when we were implementing parts of the frontend we didn't have real endpoints & types available to be consumed, and basically we had to mock logic (types, API calls, etc.) as necessary to get the ticket requirements done.

Now we have our types (TS interfaces, classes and types) ready to be consumed across the UI logic, so we need to go end-to-end in the installer code and update the props/vars/consts/params/etc to use the proper type's definition located at panic/entities/ts. This ticket covers the Settings > Channels step only.

  • types: check panic/entities/ts folder
  • API: check the swagger.json file under panic/api/src

If you spot anything "off" in the data types and/or API, please make a note and raise your concern asap, so we discuss and fix it accordingly.

Requirements

  • Ticket scope: Settings > Channels step only
  • Update all type definitions for entities to use the equivalent present at panic/entities/ts
  • Update all API calls as necessary
  • Everything related to code being updated/amended must be hard-tested, to ensure that the functionality remains stable. Any issue/bug must be resolved before merging this ticket.

Type update example
image

Acceptance criteria

Checking PANIC UI source code
Given: The PANIC developer checks the source code for the Settings > Channels component
When: The code is shown
Then: The developer can verify that all types definitions are using the ones present at panic/entities/ts and all API calls are being made to the real endpoints