-
Notifications
You must be signed in to change notification settings - Fork 0
add authData to polyCustom with typings
#49
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
Conversation
templates/index.d.ts.hbs
Outdated
| tenant: schemas.Tenant; | ||
| environment: schemas.Environment; | ||
| application: schemas.Application | null; | ||
| user: schemas.User | null; | ||
| permissions: schemas.Permissions; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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;
// ...
}
templates/index.d.ts.hbs
Outdated
| export type schemas = schemas.Schemas | ||
|
|
||
| interface AuthData { | ||
| key: string; // unencrypted api key |
There was a problem hiding this comment.
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.
| key: string; // unencrypted api key |
aarongoin
left a comment
There was a problem hiding this 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:
- Bump the version of the library in the package.json to say:
0.25.10 npm install --ignore-scriptsto update the lock file.
This will trigger the deployment of these changes once we merge this branch.
AuthDatainterfaceauthDatatoPolyCustominterface{}