Skip to content

Conversation

@lellimecnar
Copy link
Contributor

  • Created AuthData interface
  • Added authData to PolyCustom interface
  • Default it to {}

@lellimecnar lellimecnar self-assigned this Dec 11, 2025
@lellimecnar lellimecnar marked this pull request as ready for review December 11, 2025 17:20
Comment on lines 81 to 85
tenant: schemas.Tenant;
environment: schemas.Environment;
application: schemas.Application | null;
user: schemas.User | null;
permissions: schemas.Permissions;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this the correct understanding of what the schemas type contains?

Copy link
Member

Choose a reason for hiding this comment

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

No, schemas is an autogenerated thing in the SDK. We probably need to make explicit types of these things in here pulling from the types we find in poly-alpha.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this?

interface AuthData {
  // ...
  tenant: poly.Oob.Polyapi.Tenant.Get.ReturnType;
  environment: poly.Oob.Polyapi.Environments.Get.ReturnType;
  application: poly.Oob.Polyapi.Applications.Get.ReturnType | null;
  user: poly.Oob.Polyapi.Users.Get.ReturnType | null;
  permissions: poly.Oob.Polyapi.PermissionPolicies.Get.ReturnType;
  // ...
}

export type schemas = schemas.Schemas

interface AuthData {
key: string; // unencrypted api key
Copy link
Member

Choose a reason for hiding this comment

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

Per my other comments about not passing along the actual api key: let's remove this line form the type.

Suggested change
key: string; // unencrypted api key

Copy link
Member

@aarongoin aarongoin left a comment

Choose a reason for hiding this comment

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

Okay, just a few changes to be made here, nothing crazy.

Also we'll want to:

  1. Bump the version of the library in the package.json to say: 0.25.10
  2. npm install --ignore-scripts to update the lock file.

This will trigger the deployment of these changes once we merge this branch.

@lellimecnar lellimecnar merged commit 15bcd2d into develop Dec 19, 2025
@lellimecnar lellimecnar deleted the lance/add-authData-to-polyCustom branch December 19, 2025 16:04
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.

3 participants