Skip to content

Add main Permissio SDK client and permission checks#1

Merged
gjovanovicst merged 1 commit into
permissio:mainfrom
gjovanovicst:main
Nov 29, 2025
Merged

Add main Permissio SDK client and permission checks#1
gjovanovicst merged 1 commit into
permissio:mainfrom
gjovanovicst:main

Conversation

@gjovanovicst

Copy link
Copy Markdown
Member

Implement the main Permissio SDK client with functionalities for permission checks, user management, and role assignments. Introduce types for permissions and users, along with bulk checking and synchronization features. Enhance API key management and add debug logging for improved traceability. Update references from "Permis.io" to "Permissio.io" throughout the documentation and codebase.

- Implement main Permissio SDK client with methods for checking permissions, managing users, and assigning roles.
- Introduce types for permission checks, user roles, and resources.
- Add bulk permission checking and user synchronization functionalities.
- Ensure scope initialization for API key management.
- Include debug logging for better traceability during permission evaluations.
Copilot AI review requested due to automatic review settings November 29, 2025 19:18
@gjovanovicst gjovanovicst merged commit 7352df4 into permissio:main Nov 29, 2025
3 of 7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the branding from "Permis.io" to "Permissio.io" across the entire codebase, including renaming the main SDK class, interfaces, error classes, and updating all documentation and examples. The changes affect SDK initialization, API clients, configuration, examples, and supporting documentation.

Key Changes:

  • Renamed main SDK class from Permis to Permissio
  • Updated all interface names (e.g., IPermisConfigIPermissioConfig)
  • Renamed error class from PermisApiError to PermissioApiError
  • Updated API URL defaults from api.permis.io to api.permissio.io
  • Updated all documentation, examples, and package metadata

Reviewed changes

Copilot reviewed 14 out of 30 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/permissio.ts Renamed main SDK class and updated documentation; contains typo in example code
src/index.ts Updated exports and package documentation with new branding; example code has inconsistent variable names
src/config/index.ts Renamed configuration interfaces and updated API URL default
src/api/base.ts Renamed error class and updated logger messages
src/api/index.ts Updated error class export
package.json Updated package metadata with new branding
README.md Comprehensive documentation updates; contains inconsistent variable and type names in examples
examples/browser-demo/* Updated demo application with new SDK naming
LICENSE, CONTRIBUTING.md, CHANGELOG.md Updated branding references
Files not reviewed (1)
  • examples/browser-demo/package-lock.json: Language not supported
Comments suppressed due to low confidence (4)

src/permissio.ts:435

  • Inconsistent variable naming. The variable permis should be renamed to permissio throughout all example code blocks in this documentation to match the new SDK class name Permissio.
    src/permissio.ts:42
  • Typo in the example code: new Permissiosio should be new Permissio (extra "sio" in the middle).
    src/permissio.ts:49
  • Inconsistent variable naming in examples. The variable name is permis (old naming convention) but should be permissio to match the new class name Permissio and maintain consistency throughout the documentation.
    src/permissio.ts:68
  • Inconsistent variable naming in examples. Multiple instances use permis instead of permissio. All example code should use permissio to match the new SDK class name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.ts
Comment on lines +23 to +34
* const allowed = await permis.check({
* user: 'user@example.com',
* action: 'read',
* resource: 'document',
* });
*
* if (allowed) {
* console.log('Access granted!');
* } else {
* console.log('Access denied!');
* }
* ```

Copilot AI Nov 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable naming. Example code uses permis but should use permissio to match the new SDK branding.

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +423 to +432
Permis,
IPermisConfig,
ICheckRequest,
ICheckResponse,
IUserCreate,
IUserRead,
IRoleAssignmentCreate,
} from 'permissio';

const config: IPermisConfig = {

Copilot AI Nov 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent type name reference. The example imports IPermisConfig which should be IPermissioConfig to match the renamed interface.

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +432 to +436
const config: IPermisConfig = {
token: 'permis_key_...',
projectId: 'my-project',
environmentId: 'production',
};

Copilot AI Nov 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent interface name. The type IPermisConfig should be renamed to IPermissioConfig to match the new SDK branding. The variable assignment also uses the old type name.

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +508 to +511
export class PermisGuard implements CanActivate {
constructor(
private reflector: Reflector,
private permis: Permis

Copilot AI Nov 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable name. The example uses permis and the old interface reference Permis, but should use permissio and Permissio to match the new SDK branding.

Suggested change
export class PermisGuard implements CanActivate {
constructor(
private reflector: Reflector,
private permis: Permis
export class PermissioGuard implements CanActivate {
constructor(
private reflector: Reflector,
private permissio: Permissio

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants