Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EdgeDB and Role Management Functionality in Client-side TypeScript SDK #13

Open
moonlightnexus opened this issue Mar 30, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@moonlightnexus
Copy link
Contributor

Client-side GitHub Issue

Description:

We need to implement the EdgeDB and role management functionality in the client-side TypeScript SDK, similar to the Python SDK implementation. This includes the following features:

  1. Role Management: Implement methods for retrieving all roles, adding/deleting roles, and adding/deleting permissions for roles. These methods should make API calls to the server-side SDK and handle the responses accordingly.

  2. Response Classes: Implement separate response classes for each method in the role management functionality, such as GetAllRolesResponse, AddRoleResponse, DeleteRoleResponse, AddPermissionResponse, and DeletePermissionResponse. These classes should match the response formats expected from the corresponding methods.

  3. Documentation: Update the client-side TypeScript SDK documentation to include detailed information about the new classes, methods, and usage examples.

Implementation Steps:

  1. Create a new branch for this feature implementation.
  2. Implement methods for retrieving all roles, adding/deleting roles, and adding/deleting permissions for roles. These methods should make API calls to the server-side SDK and handle the responses accordingly.
  3. Create separate response classes for each method in the role management functionality, following the expected response formats.
  4. Update the client-side TypeScript SDK documentation with detailed information about the new classes, methods, and usage examples.
  5. Test the implementation thoroughly, ensuring it works as expected.
  6. Create a pull request for review and merge the changes into the main branch once approved.

Recommendations:

For the client-side TypeScript SDK, I recommend using IndexedDB or localStorage as the database solution for storing roles and permissions locally. Both options are well-supported in modern web browsers and can be used to store data on the client-side.

IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs, and provides features like indexes and transactions for efficient data access and management. However, it has a steeper learning curve compared to localStorage.

@moonlightnexus moonlightnexus added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant